Skip to content

render_shapes() - problem with cmap alpha #251

@roynov01

Description

@roynov01

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions