diff --git a/doc/api/bezier_api.rst b/doc/api/bezier_api.rst new file mode 100644 index 000000000000..b3764ad04b5a --- /dev/null +++ b/doc/api/bezier_api.rst @@ -0,0 +1,8 @@ +********************* +``matplotlib.bezier`` +********************* + +.. automodule:: matplotlib.bezier + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/index.rst b/doc/api/index.rst index d96c22de75c8..859db9c64311 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -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 diff --git a/doc/api/next_api_changes/removals.rst b/doc/api/next_api_changes/removals.rst index 3df9d032f19a..13a8a14d13f5 100644 --- a/doc/api/next_api_changes/removals.rst +++ b/doc/api/next_api_changes/removals.rst @@ -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 ~~~~~~~~ diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index eb08525f17ed..d4a05a8ce2c8 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -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, @@ -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, @@ -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): """ diff --git a/lib/matplotlib/bezier.py b/lib/matplotlib/bezier.py index b6c688337e60..9e347ce87f29 100644 --- a/lib/matplotlib/bezier.py +++ b/lib/matplotlib/bezier.py @@ -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): """ @@ -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): """ @@ -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 @@ -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. @@ -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: diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index c2da079f213c..ff964053899c 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -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: diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 9d23ffb87c88..78fb5c57f7e2 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -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',