Skip to content

FontProperties are shared by all three titles of an Axes object #3327

Closed
@fcolas

Description

@fcolas

When defining center, left and right title, the font size and weight will be set for all of them.
For example:

import matplotlib.pyplot as plt
ax1 = plt.subplot(121)
ax1.set_title('center', loc='center', fontsize=20, fontweight=700)
ax1.set_title('left', loc='left', fontsize=10, fontweight=400)
ax2 = plt.subplot(122)
ax2.set_title('left', loc='left', fontsize=10, fontweight=400)
ax2.set_title('center', loc='center', fontsize=20, fontweight=700)
plt.show()

Left plot will have both titles small whereas right one will have both of them large and bold.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions