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 dc1f0d9

Browse filesBrowse files
authored
Merge pull request #16491 from anntzer/rename_parameters
Expire the _rename_parameters API changes.
2 parents ad877a0 + 6e0b093 commit dc1f0d9
Copy full SHA for dc1f0d9

File tree

Expand file treeCollapse file tree

7 files changed

+19
-16
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+19
-16
lines changed

‎doc/api/bezier_api.rst

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*********************
2+
``matplotlib.bezier``
3+
*********************
4+
5+
.. automodule:: matplotlib.bezier
6+
:members:
7+
:undoc-members:
8+
:show-inheritance:

‎doc/api/index.rst

Copy file name to clipboardExpand all lines: doc/api/index.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Matplotlib consists of the following submodules:
7676
backend_managers_api.rst
7777
backend_tools_api.rst
7878
index_backend_api.rst
79+
bezier_api.rst
7980
blocking_input_api.rst
8081
category_api.rst
8182
cbook_api.rst

‎doc/api/next_api_changes/removals.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/removals.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ Arguments
163163
- Passing a ``wx.EvtHandler`` as the first argument to ``backend_wx.TimerWx``
164164
is not supported anymore; the signature of ``TimerWx`` is now consistent with
165165
`.TimerBase`.
166+
- The ``manage_xticks`` parameter of `~.Axes.boxplot` and `~.Axes.bxp` has been
167+
renamed to ``manage_ticks``.
168+
- The ``normed`` parameter of `~.Axes.hist2d` has been renamed to ``density``.
169+
- The ``s`` parameter of `.Annotation` has been renamed to ``text``.
170+
- For all functions in `.bezier` that supported a ``tolerence`` parameter, this
171+
parameter has been renamed to ``tolerance``.
166172

167173
rcParams
168174
~~~~~~~~

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,6 @@ def extract_err(err, data):
34663466

34673467
return errorbar_container # (l0, caplines, barcols)
34683468

3469-
@cbook._rename_parameter("3.1", "manage_xticks", "manage_ticks")
34703469
@_preprocess_data()
34713470
def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
34723471
positions=None, widths=None, patch_artist=None,
@@ -3756,7 +3755,6 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
37563755
manage_ticks=manage_ticks, zorder=zorder)
37573756
return artists
37583757

3759-
@cbook._rename_parameter("3.1", "manage_xticks", "manage_ticks")
37603758
def bxp(self, bxpstats, positions=None, widths=None, vert=True,
37613759
patch_artist=False, shownotches=False, showmeans=False,
37623760
showcaps=True, showbox=True, showfliers=True,
@@ -6886,7 +6884,6 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
68866884
return tops, bins, cbook.silent_list('Lists of Patches', patches)
68876885

68886886
@_preprocess_data(replace_names=["x", "y", "weights"])
6889-
@cbook._rename_parameter("3.1", "normed", "density")
68906887
def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
68916888
cmin=None, cmax=None, **kwargs):
68926889
"""

‎lib/matplotlib/bezier.py

Copy file name to clipboardExpand all lines: lib/matplotlib/bezier.py
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def split_de_casteljau(beta, t):
9797
return left_beta, right_beta
9898

9999

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

193192

194-
@cbook._rename_parameter("3.1", "tolerence", "tolerance")
195193
def split_bezier_intersecting_with_closedpath(
196194
bezier, inside_closedpath, tolerance=0.01):
197195
"""
@@ -227,7 +225,6 @@ def split_bezier_intersecting_with_closedpath(
227225
# matplotlib specific
228226

229227

230-
@cbook._rename_parameter("3.1", "tolerence", "tolerance")
231228
def split_path_inout(path, inside, tolerance=0.01, reorder_inout=False):
232229
"""
233230
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):
318315
return dx / d, dy / d
319316

320317

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

487483
def make_path_regular(p):
488484
"""
489-
If the :attr:`codes` attribute of `Path` *p* is None, return a copy of *p*
490-
with the :attr:`codes` set to (MOVETO, LINETO, LINETO, ..., LINETO);
491-
otherwise return *p* itself.
485+
If the ``codes`` attribute of `.Path` *p* is None, return a copy of *p*
486+
with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
487+
return *p* itself.
492488
"""
493489
c = p.codes
494490
if c is None:

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,15 +1961,11 @@ def test_hist2d_transpose():
19611961
ax.hist2d(x, y, bins=10, rasterized=True)
19621962

19631963

1964-
def test_hist2d_density_normed():
1964+
def test_hist2d_density():
19651965
x, y = np.random.random((2, 100))
19661966
ax = plt.figure().subplots()
19671967
for obj in [ax, plt]:
19681968
obj.hist2d(x, y, density=True)
1969-
with pytest.warns(MatplotlibDeprecationWarning):
1970-
obj.hist2d(x, y, normed=True)
1971-
with pytest.warns(MatplotlibDeprecationWarning):
1972-
obj.hist2d(x, y, density=True, normed=True)
19731969

19741970

19751971
class TestScatter:

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,6 @@ class Annotation(Text, _AnnotationBase):
15731573
def __str__(self):
15741574
return "Annotation(%g, %g, %r)" % (self.xy[0], self.xy[1], self._text)
15751575

1576-
@cbook._rename_parameter("3.1", "s", "text")
15771576
def __init__(self, text, xy,
15781577
xytext=None,
15791578
xycoords='data',

0 commit comments

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