Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff17bc3

Browse filesBrowse files
authored
Merge pull request #24905 from anntzer/dc
Remove some long-obsolete commented code in grid_helper_curvelinear.
2 parents 8dd1058 + c851323 commit ff17bc3
Copy full SHA for ff17bc3

File tree

4 files changed

+13
-32
lines changed
Filter options

4 files changed

+13
-32
lines changed

‎lib/mpl_toolkits/axisartist/axislines.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/axislines.py
+5-12Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -354,37 +354,30 @@ def new_fixed_axis(self, loc,
354354
offset=None,
355355
axes=None,
356356
):
357-
358357
if axes is None:
359358
_api.warn_external(
360359
"'new_fixed_axis' explicitly requires the axes keyword.")
361360
axes = self.axes
362-
363-
_helper = AxisArtistHelperRectlinear.Fixed(axes, loc, nth_coord)
364-
365361
if axis_direction is None:
366362
axis_direction = loc
367-
axisline = AxisArtist(axes, _helper, offset=offset,
368-
axis_direction=axis_direction,
369-
)
370363

364+
helper = AxisArtistHelperRectlinear.Fixed(axes, loc, nth_coord)
365+
axisline = AxisArtist(axes, helper, offset=offset,
366+
axis_direction=axis_direction)
371367
return axisline
372368

373369
def new_floating_axis(self, nth_coord, value,
374370
axis_direction="bottom",
375371
axes=None,
376372
):
377-
378373
if axes is None:
379374
_api.warn_external(
380375
"'new_floating_axis' explicitly requires the axes keyword.")
381376
axes = self.axes
382377

383-
_helper = AxisArtistHelperRectlinear.Floating(
378+
helper = AxisArtistHelperRectlinear.Floating(
384379
axes, nth_coord, value, axis_direction)
385-
386-
axisline = AxisArtist(axes, _helper, axis_direction=axis_direction)
387-
380+
axisline = AxisArtist(axes, helper, axis_direction=axis_direction)
388381
axisline.line.set_clip_on(True)
389382
axisline.line.set_clip_box(axisline.axes.bbox)
390383
return axisline

‎lib/mpl_toolkits/axisartist/floating_axes.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/floating_axes.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ def new_fixed_axis(self, loc,
167167
axis_direction = loc
168168
# This is not the same as the FixedAxisArtistHelper class used by
169169
# grid_helper_curvelinear.GridHelperCurveLinear.new_fixed_axis!
170-
_helper = FixedAxisArtistHelper(
170+
helper = FixedAxisArtistHelper(
171171
self, loc, nth_coord_ticks=nth_coord)
172-
axisline = AxisArtist(axes, _helper, axis_direction=axis_direction)
172+
axisline = AxisArtist(axes, helper, axis_direction=axis_direction)
173173
# Perhaps should be moved to the base class?
174174
axisline.line.set_clip_on(True)
175175
axisline.line.set_clip_box(axisline.axes.bbox)

‎lib/mpl_toolkits/axisartist/grid_helper_curvelinear.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/grid_helper_curvelinear.py
+4-16Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def new_fixed_axis(self, loc,
268268
axes = self.axes
269269
if axis_direction is None:
270270
axis_direction = loc
271-
_helper = FixedAxisArtistHelper(self, loc, nth_coord_ticks=nth_coord)
272-
axisline = AxisArtist(axes, _helper, axis_direction=axis_direction)
271+
helper = FixedAxisArtistHelper(self, loc, nth_coord_ticks=nth_coord)
272+
axisline = AxisArtist(axes, helper, axis_direction=axis_direction)
273273
# Why is clip not set on axisline, unlike in new_floating_axis or in
274274
# the floating_axig.GridHelperCurveLinear subclass?
275275
return axisline
@@ -279,27 +279,15 @@ def new_floating_axis(self, nth_coord,
279279
axes=None,
280280
axis_direction="bottom"
281281
):
282-
283282
if axes is None:
284283
axes = self.axes
285-
286-
_helper = FloatingAxisArtistHelper(
284+
helper = FloatingAxisArtistHelper(
287285
self, nth_coord, value, axis_direction)
288-
289-
axisline = AxisArtist(axes, _helper)
290-
291-
# _helper = FloatingAxisArtistHelper(self, nth_coord,
292-
# value,
293-
# label_direction=label_direction,
294-
# )
295-
296-
# axisline = AxisArtistFloating(axes, _helper,
297-
# axis_direction=axis_direction)
286+
axisline = AxisArtist(axes, helper)
298287
axisline.line.set_clip_on(True)
299288
axisline.line.set_clip_box(axisline.axes.bbox)
300289
# axisline.major_ticklabels.set_visible(True)
301290
# axisline.minor_ticklabels.set_visible(False)
302-
303291
return axisline
304292

305293
def _update_grid(self, x1, y1, x2, y2):

‎lib/mpl_toolkits/axisartist/tests/test_axis_artist.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/tests/test_axis_artist.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def test_axis_artist():
8787
ax.yaxis.set_visible(False)
8888

8989
for loc in ('left', 'right', 'bottom'):
90-
_helper = AxisArtistHelperRectlinear.Fixed(ax, loc=loc)
91-
axisline = AxisArtist(ax, _helper, offset=None, axis_direction=loc)
90+
helper = AxisArtistHelperRectlinear.Fixed(ax, loc=loc)
91+
axisline = AxisArtist(ax, helper, offset=None, axis_direction=loc)
9292
ax.add_artist(axisline)
9393

9494
# Settings for bottom AxisArtist.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.