spatialdata-plot icon indicating copy to clipboard operation
spatialdata-plot copied to clipboard

render_shapes() - problem with cmap alpha

Open roynov01 opened this issue 10 months ago • 4 comments

The alpha doesn't work for me, what am I missing? viridis = cm.get_cmap("viridis", 256) colors = viridis(np.linspace(0, 0.8, 256)) colors[0, :] = [1, 1, 1, 0] new_cmap = LinearSegmentedColormap.from_list("truncated_viridis", colors)

sdata_small.pl.render_images("Visium_HD_Mouse_Small_Intestine_full_image").pl.render_shapes( f"Visium_HD_Mouse_Small_Intestine_square_016um", color=gene_name, cmap=new_cmap).pl.show( coordinate_systems="global", title=gene_name, figsize=(10, 10))

image

The alpha doesn't work even when I use custon cmap with low alpha all over: image

roynov01 avatar Apr 22 '24 15:04 roynov01