Suggestions for improving plots

Anyone know of any tutorials to learn more about how to use this sort of strategy?

Define a nice colour map for gene expression

colors2 = plt.cm.Reds(np.linspace(0, 1, 128))
colors3 = plt.cm.Greys_r(np.linspace(0.7, 0.8, 20))
colorsComb = np.vstack([colors3, colors2])
mymap = colors.LinearSegmentedColormap.from_list(‘my_colormap’, colorsComb)

This was taken from the"best practices" islab jupyter notebook.

you can use mymap directly as a cmap in the plotting functions. For example

adata = sc.datasets.pbmc68k_reduced()
sc.pl.umap(adata, color='CST3', cmap=mymap )

or

adata = sc.datasets.pbmc68k_reduced()
sc.pl.dotplot(adata, ['CST3', 'CD3D', 'CD79A'], 'bulk_labels', cmap=mymap )

I will add this to the visualization tutorial

I see. I guess what I’m trying to get at is I really don’t know how to personalize or use any of these sorts of method. I was wondering if there’s a solid tutorial out there that comprehensively explains how to start learning the basics of creating/customizing these sorts of single cell plots in python.

The “best practices” tutorial was really nicely done btw.