I am using scanpy, who uses matplotlib under the hood. I am basically creating a dotplot with this package. I would like to change the y axis label size, how can I do this?
Using this works for enlarging all font sizes for the entire plot, as expected:
import scanpy as sc
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import rcParams
#generate the dotplot
plt.rcParams['font.size'] = 50
sc.pl.dotplot(df, ["gene"], 'CellType',figsize=(5,15), dendrogram=False)
But if I try to do this for the y axis only, it doesn't work:
plt.rcParams['ytick.labelsize']: 5
sc.pl.dotplot(df, ["gene"], 'CellType',figsize=(5,15), dendrogram=False)
I also tried plt.rcParams.update({'ytick.labelsize': 50})
but that didn't work either. Any help is appreciated!
Changing the rcParams may only affect plots drawn after that command. Try adding
to your code. Here is a minimal working example: