Skip to content

[MNT]: new public method to help title positioning #29385

Open
@rcomer

Description

@rcomer

Summary

  1. The change that broke [Bug]: title position incorrect for polar plot #29381 would have been fine if the logic that calculates top within Axes._update_title_position only needed to work for ordinary Axes instances.
  2. Cartopy has artists separate from the XAxis and YAxis which must be considered for title placement. Currently, it does that by overriding _update_title_position. Overriding a private method is not ideal, neither is repeating some of the code that is already in the parent method.

Proposed fix

Factor out a public method that returns top. Making it public means it can safely be overridden in subclasses such as PolarAxes and Cartopy's GeoAxes. Knowing it can/should be overridden in subclasses means that in the parent Axes we can use the most efficient approach that works for Axes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions