Skip to content

Commit

Permalink
Use Gridliner transform for inline labels also
Browse files Browse the repository at this point in the history
instead of hard-coding PlateCarree.
  • Loading branch information
QuLogic committed Oct 7, 2021
1 parent 1e652d6 commit ebf1f11
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit ebf1f11

Please sign in to comment.