You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I am trying to plot the MSG' Dust RGB composite
So far I am using Scene and I manage to get an image of the composite but I want to add coastilines and a grid as overlays, but I have not managed to do that.
The coastilines, and gridlines are fine but I want the colors of the first graph to be on the second, somehow I haven't managed to do that.
Can someone help me? I think it is something about how the colors are being adjudicated to the numbers in the imshow function but I do not know how to change that...
Any help would be highly appreciated!
Cheers,
Sofía
The text was updated successfully, but these errors were encountered:
The .show() method of the Scene is doing one extra step internally that you're missing in your own work. It is "enhancing" the image. You can perform this step manually by doing:
from satpy.writers import get_enhanced_image
data_arr = get_enhanced_image(scn["dust"]).data
Note the .data at the end. Then data_arr will be a xarray DataArray. Additionally, you could simplify your code by doing:
I don't remember if the origin= is needed with this. This is a shortcut that uses xarray to do semi-standard things for you (like your transpose call which could be removed if you used this).
Hi
I am trying to plot the MSG' Dust RGB composite
So far I am using Scene and I manage to get an image of the composite but I want to add coastilines and a grid as overlays, but I have not managed to do that.
First, how it is working:
Then, I tried to convert the scene file to a numpy array to plot with cartopy:
And for the plot:
The coastilines, and gridlines are fine but I want the colors of the first graph to be on the second, somehow I haven't managed to do that.
Can someone help me? I think it is something about how the colors are being adjudicated to the numbers in the imshow function but I do not know how to change that...
Any help would be highly appreciated!
Cheers,
Sofía
The text was updated successfully, but these errors were encountered: