Skip to content

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

@snavidi

Description

@snavidi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions