Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k

[Bug]: Autopositioned title overlaps with offset text #22062

Closed
@StefRe

Description

@StefRe

Bug summary

Autopositioned title overlaps with offset text of y axis.

Code for reproduction

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot([1e8, 2e8])
ax.set_title('Title', loc='left')
plt.show()

Actual outcome

old

Expected outcome

Title would move to not overlap with offset text (as it is the case for a top x axis).

Additional information

No response

Operating system

No response

Matplotlib Version

3.5.1

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

No response

Activity

dstansby

dstansby commented on Dec 29, 2021

@dstansby
Member

I'm not 100% sure we guarantee that artists won't be overlapping by default. If you do .tight_layout() or .constrained_layout(), does the title still overlap with the offset text?

StefRe

StefRe commented on Dec 29, 2021

@StefRe
ContributorAuthor

Yes, title overlaps with both layout='constrained' and layout='tight'. The title is moved up (if Axes._autotitlepos is True) to not overlap with a top x axis, but an y axis offset text is currently not taken into account.

added this to the v3.6.0 milestone on Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [Bug]: Autopositioned title overlaps with offset text · Issue #22062 · matplotlib/matplotlib