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

Skip to content

Commit b3c38d7

Browse files
authored
Merge pull request #25774 from anntzer/al
Small axislines.Axes cleanups.
2 parents cb7f649 + 68266ef commit b3c38d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Callable axisartist Axes
2+
~~~~~~~~~~~~~~~~~~~~~~~~
3+
Calling an axisartist Axes to mean `~pyplot.axis` is deprecated; explicitly
4+
call the method instead.

lib/mpl_toolkits/axisartist/axislines.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ def get_gridlines(self, which="major", axis="both"):
407407

408408
class Axes(maxes.Axes):
409409

410+
@_api.deprecated("3.8", alternative="ax.axis")
410411
def __call__(self, *args, **kwargs):
411412
return maxes.Axes.axis(self.axes, *args, **kwargs)
412413

@@ -440,7 +441,7 @@ def clear(self):
440441

441442
# Init gridlines before clear() as clear() calls grid().
442443
self.gridlines = gridlines = GridlinesCollection(
443-
[], transform=self.transData,
444+
[],
444445
colors=mpl.rcParams['grid.color'],
445446
linestyles=mpl.rcParams['grid.linestyle'],
446447
linewidths=mpl.rcParams['grid.linewidth'])

0 commit comments

Comments
 (0)