Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit90b0f4d

Browse files
committed
Add test.
1 parent77d5e8e commit90b0f4d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

‎lib/matplotlib/cbook/deprecation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,18 +285,18 @@ def func(good_name): ...
285285
signature=inspect.signature(func)
286286
assertoldnotinsignature.parameters, (
287287
f"Matplotlib internal error:{old!r} cannot be a parameter for "
288-
"{func.__name__}()")
288+
f"{func.__name__}()")
289289
assertnewinsignature.parameters, (
290290
f"Matplotlib internal error:{new!r} must be a parameter for "
291-
"{func.__name__}()")
291+
f"{func.__name__}()")
292292

293293
@functools.wraps(func)
294294
defwrapper(*args,**kwargs):
295295
ifoldinkwargs:
296296
warn_deprecated(
297297
since,message=f"The{old!r} parameter of{func.__name__}() "
298-
f"has been renamed{new!r} since{since}; support for the old "
299-
f"name will be dropped %(removal)s.")
298+
f"has been renamed{new!r} sinceMatplotlib{since}; support "
299+
f"for the oldname will be dropped %(removal)s.")
300300
kwargs[new]=kwargs.pop(old)
301301
returnfunc(*args,**kwargs)
302302

‎lib/matplotlib/tests/test_axes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,17 @@ def test_hist2d_transpose():
17391739
ax.hist2d(x,y,bins=10,rasterized=True)
17401740

17411741

1742+
deftest_hist2d_density_normed():
1743+
x,y=np.random.random((2,100))
1744+
ax=plt.figure().subplots()
1745+
forobjin [ax,plt]:
1746+
obj.hist2d(x,y,density=True)
1747+
withpytest.warns(MatplotlibDeprecationWarning):
1748+
obj.hist2d(x,y,normed=True)
1749+
withpytest.warns(MatplotlibDeprecationWarning):
1750+
obj.hist2d(x,y,density=True,normed=True)
1751+
1752+
17421753
classTestScatter(object):
17431754
@image_comparison(baseline_images=['scatter'],
17441755
style='mpl20',remove_text=True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp