◐ Shell
clean mode source ↗

[Bug]: Font kwargs for pyplot.title only work in certain order

Bug summary

If font and font_size kwargs are passed into pyplot.title, kwargs have to be passed in in a certain order to work

Code for reproduction

pyplot.title("foo", font="Times New Roman", fontsize=20)  # this works - font size is changed to 20
pyplot.title("foo", fontsize=20, font="Times New Roman")  # this doesn't work - font size remains at ~8 or 10

Actual outcome

Title font size remains at ~ 8 or 10

Expected outcome

Title font size changed to value passed in with fontsize argument

Additional information

No response

Operating system

Windows

Matplotlib Version

3.8.2

Matplotlib Backend

No response

Python version

3.12.0

Jupyter version

Jupyter IPython version: 8.19.0

Installation

pip