Skip to content

Expire the _rename_parameters API changes. #16491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/api/bezier_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*********************
``matplotlib.bezier``
*********************

.. automodule:: matplotlib.bezier
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Matplotlib consists of the following submodules:
backend_managers_api.rst
backend_tools_api.rst
index_backend_api.rst
bezier_api.rst
blocking_input_api.rst
category_api.rst
cbook_api.rst
Expand Down
6 changes: 6 additions & 0 deletions doc/api/next_api_changes/removals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ Arguments
- Passing a ``wx.EvtHandler`` as the first argument to ``backend_wx.TimerWx``
is not supported anymore; the signature of ``TimerWx`` is now consistent with
`.TimerBase`.
- The ``manage_xticks`` parameter of `~.Axes.boxplot` and `~.Axes.bxp` has been
renamed to ``manage_ticks``.
- The ``normed`` parameter of `~.Axes.hist2d` has been renamed to ``density``.
- The ``s`` parameter of `.Annotation` has been renamed to ``text``.
- For all functions in `.bezier` that supported a ``tolerence`` parameter, this
parameter has been renamed to ``tolerance``.

rcParams
~~~~~~~~
Expand Down
3 changes: 0 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,6 @@ def extract_err(err, data):

return errorbar_container # (l0, caplines, barcols)

@cbook._rename_parameter("3.1", "manage_xticks", "manage_ticks")
@_preprocess_data()
def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
positions=None, widths=None, patch_artist=None,
Expand Down Expand Up @@ -3745,7 +3744,6 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
manage_ticks=manage_ticks, zorder=zorder)
return artists

@cbook._rename_parameter("3.1", "manage_xticks", "manage_ticks")
def bxp(self, bxpstats, positions=None, widths=None, vert=True,
patch_artist=False, shownotches=False, showmeans=False,
showcaps=True, showbox=True, showfliers=True,
Expand Down Expand Up @@ -6874,7 +6872,6 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
return tops, bins, cbook.silent_list('Lists of Patches', patches)

@_preprocess_data(replace_names=["x", "y", "weights"])
@cbook._rename_parameter("3.1", "normed", "density")
def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
cmin=None, cmax=None, **kwargs):
"""
Expand Down
10 changes: 3 additions & 7 deletions lib/matplotlib/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def split_de_casteljau(beta, t):
return left_beta, right_beta


@cbook._rename_parameter("3.1", "tolerence", "tolerance")
def find_bezier_t_intersecting_with_closedpath(
bezier_point_at_t, inside_closedpath, t0=0., t1=1., tolerance=0.01):
"""
Expand Down Expand Up @@ -191,7 +190,6 @@ def point_at_t(self, t):
self._px @ (((1 - t) ** self._orders)[::-1] * t ** self._orders))


@cbook._rename_parameter("3.1", "tolerence", "tolerance")
def split_bezier_intersecting_with_closedpath(
bezier, inside_closedpath, tolerance=0.01):
"""
Expand Down Expand Up @@ -227,7 +225,6 @@ def split_bezier_intersecting_with_closedpath(
# matplotlib specific


@cbook._rename_parameter("3.1", "tolerence", "tolerance")
def split_path_inout(path, inside, tolerance=0.01, reorder_inout=False):
"""
Divide a path into two segments at the point where ``inside(x, y)`` becomes
Expand Down Expand Up @@ -318,7 +315,6 @@ def get_cos_sin(x0, y0, x1, y1):
return dx / d, dy / d


@cbook._rename_parameter("3.1", "tolerence", "tolerance")
def check_if_parallel(dx1, dy1, dx2, dy2, tolerance=1.e-5):
"""
Check if two lines are parallel.
Expand Down Expand Up @@ -486,9 +482,9 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):

def make_path_regular(p):
"""
If the :attr:`codes` attribute of `Path` *p* is None, return a copy of *p*
with the :attr:`codes` set to (MOVETO, LINETO, LINETO, ..., LINETO);
otherwise return *p* itself.
If the ``codes`` attribute of `.Path` *p* is None, return a copy of *p*
with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
return *p* itself.
"""
c = p.codes
if c is None:
Expand Down
6 changes: 1 addition & 5 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1961,15 +1961,11 @@ def test_hist2d_transpose():
ax.hist2d(x, y, bins=10, rasterized=True)


def test_hist2d_density_normed():
def test_hist2d_density():
x, y = np.random.random((2, 100))
ax = plt.figure().subplots()
for obj in [ax, plt]:
obj.hist2d(x, y, density=True)
with pytest.warns(MatplotlibDeprecationWarning):
obj.hist2d(x, y, normed=True)
with pytest.warns(MatplotlibDeprecationWarning):
obj.hist2d(x, y, density=True, normed=True)


class TestScatter:
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,6 @@ class Annotation(Text, _AnnotationBase):
def __str__(self):
return "Annotation(%g, %g, %r)" % (self.xy[0], self.xy[1], self._text)

@cbook._rename_parameter("3.1", "s", "text")
def __init__(self, text, xy,
xytext=None,
xycoords='data',
Expand Down