Skip to content

Fix shared GeoAxes zoom not propagating to sibling subplots#2652

Open
guillermodotn wants to merge 1 commit intoSciTools:mainfrom
guillermodotn:fix/shared-axes-zoom
Open

Fix shared GeoAxes zoom not propagating to sibling subplots#2652
guillermodotn wants to merge 1 commit intoSciTools:mainfrom
guillermodotn:fix/shared-axes-zoom

Conversation

@guillermodotn
Copy link

Rationale

When using sharex/sharey on cartopy GeoAxes, interactive zoom does not propagate to sibling subplots after adding features. _draw_preprocess() calls autoscale_view() on every draw, resetting all shared limits to full extent. _get_extent_geom() compounds this by calling autoscale_view() inside hold_limits(), which propagates resets to siblings but only restores the current axes.

issue_fix

Closes #2637

Implications

  • _draw_preprocess(): clear ignore_existing_data_limits after the first autoscale_view(), matching matplotlib's own pattern.
  • _get_extent_geom(): read viewLim directly instead of calling autoscale_view(). A dataLim fallback handles the pre-draw case.
  • No test added.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared axes not sharing zoom after features are added

1 participant