Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4633cbd

Browse files
committed
And some more.
1 parent eb30e45 commit 4633cbd

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

lib/mpl_toolkits/axes_grid1/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def _select_locator(self, formatter):
583583
locator = ticker.MaxNLocator(nbins=5)
584584
else:
585585
b = self._boundaries[self._inside]
586-
locator = ticker.FixedLocator(b) # nbins=10)
586+
locator = ticker.FixedLocator(b)
587587

588588
self.cbar_axis.set_major_locator(locator)
589589

lib/mpl_toolkits/axisartist/angle_helper.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,6 @@ def __init__(self,
342342
lon_minmax = None,
343343
lat_minmax = (-90, 90)
344344
):
345-
# self.transform_xy = transform_xy
346-
# self.inv_transform_xy = inv_transform_xy
347345
self.nx, self.ny = nx, ny
348346
self.lon_cycle, self.lat_cycle = lon_cycle, lat_cycle
349347
self.lon_minmax = lon_minmax

lib/mpl_toolkits/axisartist/axislines.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ def _f(locs, labels):
247247

248248
# check if the tick point is inside axes
249249
c2 = tr2ax.transform_point(c)
250-
# delta=0.00001
251-
if 0. -self.delta1<= c2[self.nth_coord] <= 1.+self.delta2:
250+
if 0 - self.delta1 <= c2[self.nth_coord] <= 1 + self.delta2:
252251
yield c, angle_normal, angle_tangent, l
253252

254253
return _f(majorLocs, majorLabels), _f(minorLocs, minorLabels)

lib/mpl_toolkits/axisartist/floating_axes.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, grid_helper, side, nth_coord_ticks=None):
2828

2929
value, nth_coord = grid_helper.get_data_boundary(side) # return v= 0 , nth=1, extremes of the other coordinate.
3030
super().__init__(grid_helper, nth_coord, value, axis_direction=side)
31-
# self.grid_helper = grid_helper
3231
if nth_coord_ticks is None:
3332
nth_coord_ticks = nth_coord
3433
self.nth_coord_ticks = nth_coord_ticks
@@ -116,19 +115,17 @@ def transform_xy(x, y):
116115
xx0 = np.empty_like(yy0)
117116
xx0.fill(self.value)
118117

119-
# yy0_ = yy0.copy()
120-
121118
xx1, yy1 = transform_xy(xx0, yy0)
122119

123120
xx00 = xx0.astype(float, copy=True)
124-
xx00[xx0+dx>xmax] -= dx
121+
xx00[xx0 + dx > xmax] -= dx
125122
xx1a, yy1a = transform_xy(xx00, yy0)
126-
xx1b, yy1b = transform_xy(xx00+dx, yy0)
123+
xx1b, yy1b = transform_xy(xx00 + dx, yy0)
127124

128125
yy00 = yy0.astype(float, copy=True)
129-
yy00[yy0+dy>ymax] -= dy
126+
yy00[yy0 + dy > ymax] -= dy
130127
xx2a, yy2a = transform_xy(xx0, yy00)
131-
xx2b, yy2b = transform_xy(xx0, yy00+dy)
128+
xx2b, yy2b = transform_xy(xx0, yy00 + dy)
132129

133130
labels = self.grid_info["lat_labels"]
134131
labels = [l for l, m in zip(labels, mask) if m]
@@ -137,18 +134,17 @@ def transform_xy(x, y):
137134
yy0 = np.empty_like(xx0)
138135
yy0.fill(self.value)
139136

140-
# xx0_ = xx0.copy()
141137
xx1, yy1 = transform_xy(xx0, yy0)
142138

143139
yy00 = yy0.astype(float, copy=True)
144-
yy00[yy0+dy>ymax] -= dy
140+
yy00[yy0 + dy > ymax] -= dy
145141
xx1a, yy1a = transform_xy(xx0, yy00)
146-
xx1b, yy1b = transform_xy(xx0, yy00+dy)
142+
xx1b, yy1b = transform_xy(xx0, yy00 + dy)
147143

148144
xx00 = xx0.astype(float, copy=True)
149-
xx00[xx0+dx>xmax] -= dx
145+
xx00[xx0 + dx > xmax] -= dx
150146
xx2a, yy2a = transform_xy(xx00, yy0)
151-
xx2b, yy2b = transform_xy(xx00+dx, yy0)
147+
xx2b, yy2b = transform_xy(xx00 + dx, yy0)
152148

153149
labels = self.grid_info["lon_labels"]
154150
labels = [l for l, m in zip(labels, mask) if m]
@@ -440,8 +436,6 @@ def cla(self):
440436
self._original_patch = patch
441437

442438
def adjust_axes_lim(self):
443-
444-
# t = self.get_boundary()
445439
grid_helper = self.get_grid_helper()
446440
t = grid_helper.get_boundary()
447441
x, y = t[:,0], t[:,1]

0 commit comments

Comments
 (0)