[ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective · Issue #31406 · matplotlib/matplotlib · GitHub
Skip to content

[ENH]: [Bug]: secondary_xaxes().set_xlim/xbound should warn or raise that it is ineffective #31406

Description

@anntzer

Problem

Changing the limits of a main axes will update the secondary axes' limits (at draw time), but changing the limits of a secondary axes has silently no effect (they get again overwritten by the (converted) main limits at draw time, in SecondaryAxes._set_lims). This should at least warn or raise.
Alternatively, secondary axes could set {x,y}lim_changed callbacks in both directions to fully keep limits in sync.

Proposed solution

Warn or raise on ineffective limits updates, or use callbacks to fully keep limits in sync.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions