You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent inset axes size when using transform='axes' with different projections #751
When creating a figure with two subplots using different projections (e.g., cart and cyl) and adding inset axes with identical relative bounding boxes (transform='axes'), the resulting inset axes have inconsistent physical sizes.
Since transform='axes' specifies the inset position and size as a fraction of the parent axes, the insets should visually occupy the same proportion of their respective parent axes, regardless of the parent's projection.
Both inset axes should have the exact same relative size and shape within their respective parent axes, as they are defined by the same [left, bottom, width, height] parameters in axes coordinates.
Actual Behavior
The inset axes appear to have different physical sizes on the rendered figure.
Yeah I checked, this is caused by Cartopy. You can see this by forcing square aspects. We are placing the axes exactly where it should be but cartopy is reshaping it to the size for the default range. You can see this by checking this:
ix=ax[1].inset([.7, .0, .3, .3], transform='axes', proj='cyl')
ix.format(lonlim=(0, 1), latlim=(0, 1)) # this would be square at the location
Activity
cvanelteren commentedon Jul 8, 2026
I think this is actually an issue with cartopy rather than with UltraPlot. Let me check.
cvanelteren commentedon Jul 8, 2026
Yeah I checked, this is caused by Cartopy. You can see this by forcing square aspects. We are placing the axes exactly where it should be but cartopy is reshaping it to the size for the default range. You can see this by checking this: