I am trying to plot some raster data with a different normalization (vmin, vmax) for the cmap. Both approaches I used unfortunately don't work, can you have a look at this please?
fromspatialdata.datasetsimportblobsimportspatialdata_plotimportmatplotlib.colorsimportmatplotlib.pyplotaspltsdata=blobs()
sdata['single_channel'] =sdata['blobs_image'].sel(c=slice(0, 0))
# originalsdata.pl.render_images('single_channel').pl.show()
plt.show()
# attempt 1, doesn't worksdata.pl.render_images('single_channel', vmin=0, vmax=0.4).pl.show()
plt.show()
# attempt 2, doesn't worknorm=matplotlib.colors.Normalize(vmin=0, vmax=0.4)
sdata.pl.render_images('single_channel', norm=norm).pl.show()
plt.show()
I am trying to plot some raster data with a different normalization (vmin, vmax) for the cmap. Both approaches I used unfortunately don't work, can you have a look at this please?