Skip to content

[Bug]: Suptitle not visible with subfigures #24910

@mwaskom

Description

@mwaskom

Bug summary

In a fairly basic example using subfigures, a suptitle added to the parent figure is not visible:

Code for reproduction

f = plt.figure(figsize=(4, 3))
sf1, sf2 = f.subfigures(1, 2)
sf1.subplots()
sf2.subplots()
f.suptitle("It's a bird, it's a plane, it's a suptitle")

Actual outcome

test

Expected outcome

Visible suptitle.

Additional information

It looks like this is happening because the subfigures have a solid facecolor that obscure the suptitle:

f = plt.figure(figsize=(4, 3))
sf1, sf2 = f.subfigures(1, 2)
sf1.subplots()
sf2.subplots()
sf1.set_facecolor((.8, 0, 0, .3))
f.suptitle("It's a bird, it's a plane, it's a suptitle")

test

Setting the zorder of the suptitle to a large number has no apparent effect.

Matplotlib Version

3.6.2

Matplotlib Backend

module://matplotlib_inline.backend_inline

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions