Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Gridliner transform for inline labels also #1903

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/cartopy/mpl/gridliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,6 @@ def update_artist(artist, renderer):
# Cache a few things so they aren't re-calculated in the loops.
crs_transform = self._crs_transform().transform
inverse_data_transform = self.axes.transData.inverted().transform_point
if self.x_inline or self.y_inline:
pc_transform = PlateCarree()

for xylabel, lines, line_ticks, formatter, label_style in (
('x', lon_lines, lon_ticks,
Expand Down Expand Up @@ -899,7 +897,7 @@ def update_artist(artist, renderer):
# Initial text specs
x0, y0 = pt0
if x_inline or y_inline:
kw = {'rotation': 0, 'transform': pc_transform,
kw = {'rotation': 0, 'transform': self.crs,
'ha': 'center', 'va': 'center'}
loc = 'inline'
else:
Expand Down