0

I have this code for my matplotlib initialization:

    import matplotlib.pylab as pylab
    params = {'legend.fontsize': 20,'figure.figsize': (8, 5),'axes.labelsize': 20,
    'axes.titlesize':'large','axes.labelpad': 12,'xtick.labelsize':20,
    'ytick.labelsize':20, 'font.family': 'Times New Roman'}
    pylab.rcParams.update(params)

However, the font on my sns.barplot axes titles and tick labels and legend labels are not changing. How do I fix this?

rorobae04
  • 23
  • 3
  • As per the matplotlib documentation, don't use pylab: see [Which is the recommended way to plot: matplotlib or pylab?](https://stackoverflow.com/q/16849483/7758804). As such, use `import matplotlib.pyplot as plt` and then `plt.rcParams.update(params)`, which worked as expected. I'm voting to close this as caused by a typo / not reproducible. – Trenton McKinney Jul 28 '21 at 21:56

0 Answers0