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

Skip to content

Commit c454983

Browse files
committed
MNT: rename get_index_y -> index_of
1 parent 1d00767 commit c454983

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import matplotlib
1616

1717
from matplotlib import cbook
18-
from matplotlib.cbook import _string_to_bool, iterable, get_index_y, get_label
18+
from matplotlib.cbook import _string_to_bool, iterable, index_of, get_label
1919
from matplotlib import docstring
2020
import matplotlib.colors as mcolors
2121
import matplotlib.lines as mlines
@@ -31,7 +31,7 @@
3131
import matplotlib.image as mimage
3232
from matplotlib.offsetbox import OffsetBox
3333
from matplotlib.artist import allow_rasterization
34-
from matplotlib.cbook import iterable, get_index_y
34+
from matplotlib.cbook import iterable, index_of
3535
from matplotlib.rcsetup import cycler
3636

3737
rcParams = matplotlib.rcParams
@@ -356,7 +356,7 @@ def _plot_args(self, tup, kwargs):
356356
x = np.atleast_1d(tup[0])
357357
y = np.atleast_1d(tup[-1])
358358
else:
359-
x, y = get_index_y(tup[-1])
359+
x, y = index_of(tup[-1])
360360

361361
x, y = self._xy_from_xy(x, y)
362362

lib/matplotlib/cbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2491,7 +2491,7 @@ def pts_to_midstep(x, *args):
24912491
'step-mid': pts_to_midstep}
24922492

24932493

2494-
def get_index_y(y):
2494+
def index_of(y):
24952495
"""
24962496
A helper function to get the index of an input to plot
24972497
against if x values are not explicitly given.

0 commit comments

Comments
 (0)