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

Skip to content

Commit eb30e45

Browse files
committed
Kill some commented out code.
1 parent 8280954 commit eb30e45

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

lib/mpl_toolkits/axisartist/floating_axes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,11 @@ def f1():
159159
mm = ((yy1b-yy1a)==0.) & ((xx1b-xx1a)==0.) # mask where dd1 is not defined
160160
dd[mm] = dd2[mm] + np.pi / 2
161161

162-
# dd += np.pi
163-
# dd = np.arctan2(xx2-xx1, angle_tangent-yy1)
164162
trans_tick = self.get_tick_transform(axes)
165163
tr2ax = trans_tick + axes.transAxes.inverted()
166164
for x, y, d, d2, lab in zip(xx1, yy1, dd, dd2, labels):
167165
c2 = tr2ax.transform_point((x, y))
168-
delta=0.00001
166+
delta = 0.00001
169167
if 0-delta <= c2[0] <= 1+delta and 0-delta <= c2[1] <= 1+delta:
170168
d1, d2 = np.rad2deg([d, d2])
171169
yield [x, y], d1, d2, lab
@@ -356,8 +354,7 @@ def _update_grid(self, x1, y1, x2, y2):
356354
lon_lines, lat_lines = grid_finder._get_raw_grid_lines(extremes[:2],
357355
extremes[2:],
358356
*extremes)
359-
# lon_min, lon_max,
360-
# lat_min, lat_max)
357+
# lon_min, lon_max, lat_min, lat_max)
361358

362359
grid_info["lon_lines0"] = lon_lines
363360
grid_info["lat_lines0"] = lat_lines

lib/mpl_toolkits/axisartist/grid_helper_curvelinear.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def update_lim(self, axes):
138138

139139
grid_finder = self.grid_helper.grid_finder
140140

141-
# e1, e2 = self._extremes # ranges of other coordinates
142141
if self.nth_coord == 0:
143142
xx0 = np.linspace(self.value, self.value, self._line_num_points)
144143
yy0 = np.linspace(extremes[2], extremes[3], self._line_num_points)
@@ -270,21 +269,14 @@ def transform_xy(x, y):
270269
def f1():
271270
dd = np.arctan2(yy1b-yy1a, xx1b-xx1a) # angle normal
272271
dd2 = np.arctan2(yy2b-yy2a, xx2b-xx2a) # angle tangent
273-
mm = ((yy1b-yy1a)==0.) & ((xx1b-xx1a)==0.) # mask where dd1 is not defined
272+
mm = (yy1b-yy1a == 0) & (xx1b-xx1a == 0) # mask where dd1 is not defined
274273
dd[mm] = dd2[mm] + np.pi / 2
275-
# dd = np.arctan2(yy2-yy1, xx2-xx1) # angle normal
276-
# dd2 = np.arctan2(yy3-yy1, xx3-xx1) # angle tangent
277-
# mm = ((yy2-yy1)==0.) & ((xx2-xx1)==0.) # mask where dd1 is not defined
278-
# dd[mm] = dd2[mm] + np.pi / 2
279274

280-
# dd += np.pi
281-
282-
# dd = np.arctan2(xx2-xx1, angle_tangent-yy1)
283275
trans_tick = self.get_tick_transform(axes)
284276
tr2ax = trans_tick + axes.transAxes.inverted()
285277
for x, y, d, d2, lab in zip(xx1, yy1, dd, dd2, labels):
286278
c2 = tr2ax.transform_point((x, y))
287-
delta=0.00001
279+
delta = 0.00001
288280
if 0-delta <= c2[0] <= 1+delta and 0-delta <= c2[1] <= 1+delta:
289281
d1, d2 = np.rad2deg([d, d2])
290282
yield [x, y], d1, d2, lab

0 commit comments

Comments
 (0)