From 5b50bd2cc6fcee7664678347675bd4b2eba6a1c9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 7 Oct 2021 16:27:21 -0400 Subject: [PATCH] Use Gridliner transform for inline labels also instead of hard-coding PlateCarree. --- lib/cartopy/mpl/gridliner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cartopy/mpl/gridliner.py b/lib/cartopy/mpl/gridliner.py index 986eb7732..16caae1dc 100644 --- a/lib/cartopy/mpl/gridliner.py +++ b/lib/cartopy/mpl/gridliner.py @@ -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, @@ -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: