saw this from @LucaMarconato tutorial on visium HD scverse/spatialdata-tutorials#93
importmatplotlib.cmascmimportmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlib.colorsimportLinearSegmentedColormap# modify the viridis colormap, so that the top color is a green (better visible on the H&E pink), and such that# the value 0 leads to a transparent colorviridis=cm.get_cmap("viridis", 256)
# using 0.8 instead of 1.0 truncates the colormapcolors=viridis(np.linspace(0, 0.8, 256))
# set the color of zero to be transparentcolors[0, :] = [1.0, 1.0, 1.0, 0.0]
new_cmap=LinearSegmentedColormap.from_list("truncated_viridis", colors)it's actually really nice and result to this

I think it could just be an option to do this modification internally? with an argument like alpha_value_zero: bool = True or so, wdyt?
saw this from @LucaMarconato tutorial on visium HD scverse/spatialdata-tutorials#93
it's actually really nice and result to this
I think it could just be an option to do this modification internally? with an argument like
alpha_value_zero: bool = Trueor so, wdyt?