@@ -70,26 +70,19 @@ def get_tick_iterators(self, axes):
7070 xx0 = lon_levs
7171 dx = 0.001
7272
73- _extremes = self .grid_helper ._extremes
74- xmin , xmax = sorted (_extremes [:2 ])
75- ymin , ymax = sorted (_extremes [2 :])
76- if self .nth_coord == 0 :
77- mask = (ymin <= yy0 ) & (yy0 <= ymax )
78- yy0 = yy0 [mask ]
79- elif self .nth_coord == 1 :
80- mask = (xmin <= xx0 ) & (xx0 <= xmax )
81- xx0 = xx0 [mask ]
73+ extremes = self .grid_helper ._extremes
74+ xmin , xmax = sorted (extremes [:2 ])
75+ ymin , ymax = sorted (extremes [2 :])
8276
8377 def transform_xy (x , y ):
8478 x1 , y1 = grid_finder .transform_xy (x , y )
85- x2y2 = axes .transData .transform (np .array ([x1 , y1 ]).transpose ())
86- x2 , y2 = x2y2 .transpose ()
79+ x2 , y2 = axes .transData .transform (np .array ([x1 , y1 ]).T ).T
8780 return x2 , y2
8881
89- # find angles
9082 if self .nth_coord == 0 :
83+ mask = (ymin <= yy0 ) & (yy0 <= ymax )
84+ yy0 = yy0 [mask ]
9185 xx0 = np .full_like (yy0 , self .value )
92-
9386 xx1 , yy1 = transform_xy (xx0 , yy0 )
9487
9588 xx00 = xx0 .astype (float , copy = True )
@@ -106,8 +99,9 @@ def transform_xy(x, y):
10699 labels = [l for l , m in zip (labels , mask ) if m ]
107100
108101 elif self .nth_coord == 1 :
102+ mask = (xmin <= xx0 ) & (xx0 <= xmax )
103+ xx0 = xx0 [mask ]
109104 yy0 = np .full_like (xx0 , self .value )
110-
111105 xx1 , yy1 = transform_xy (xx0 , yy0 )
112106
113107 yy00 = yy0 .astype (float , copy = True )
0 commit comments