0

I am attempting to set the tick labels to regular weight (seems like defaults to bold), using tick_params(), yet the sole relevant argument for tweaking tick labels here are labelcolor as well as labelsize. Could you assist me with this? Many thanks.

plt.style.use('seaborn-notebook')
plt.rcParams['font.family'] = 'Times New Roman'

Figure1 = plt.figure('Scatter Plot', figsize=(5,6), dpi=300)
Subplot1 = Figure1.add_subplot(1,1,1)
Subplot1.bar([4,5,6,7], [6,5,9,8], width= 0.8, color='r')

Subplot1.tick_params(labelsize=13)
Subplot1.set_yticks([2,4,6,8,10,12])
Riccardo
  • 115
  • 11
  • 1
    Check https://stackoverflow.com/questions/54084806/matplotlib-tick-label-fontweight-is-limited-to-a-few-options, https://stackoverflow.com/questions/7257372/set-font-properties-to-tick-labels-with-matplot-lib and probably other questions as well. – ImportanceOfBeingErnest Aug 09 '19 at 01:34
  • Many thanks for your prompt reply. I'm going to be using `params = {'ytick.labelsize': 8}` ... along with `plt.rcParams.update(params)`, and to this end did 'print(plt.rcParams)' to get the relevant parameter that sets the font weight. Turns out the most relevant option for tick labels is `xtick.labelsize: 8` in rc.Params dictionary. Could you please give me a hint how to proceed from here? – Riccardo Aug 09 '19 at 02:33
  • I think I meant the `"font.weight"` parameter. It will apply to all text in the figure though. – ImportanceOfBeingErnest Aug 09 '19 at 02:49

0 Answers0