From 9c67c46555080ff89611f4b63efef5be717b2c33 Mon Sep 17 00:00:00 2001 From: "Philipp S. Sommer" Date: Mon, 18 May 2020 01:11:33 +0200 Subject: [PATCH] minor fix for add2format_coord to account for https://github.com/psyplot/psy-simple/pull/17 --- psy_maps/plotters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/psy_maps/plotters.py b/psy_maps/plotters.py index 37b1f92..757d093 100755 --- a/psy_maps/plotters.py +++ b/psy_maps/plotters.py @@ -1701,6 +1701,7 @@ def remove(self, *args, **kwargs): del self._wrapped_plot def add2format_coord(self, x, y): + xorig, yorig = x, y x, y = self.transform.projection.transform_point( x, y, self.ax.projection) # shift if necessary @@ -1713,7 +1714,8 @@ def add2format_coord(self, x, y): if 'rad' in coord.attrs.get('units', '').lower(): x = np.deg2rad(x) y = np.deg2rad(y) - return super(MapPlot2D, self).add2format_coord(x, y) + return super(MapPlot2D, self).add2format_coord(x, y, xorig=xorig, + yorig=yorig) class MapDataGrid(psyps.DataGrid):