File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -285,18 +285,18 @@ def func(good_name): ...
285
285
signature = inspect .signature (func )
286
286
assert old not in signature .parameters , (
287
287
f"Matplotlib internal error: { old !r} cannot be a parameter for "
288
- "{func.__name__}()" )
288
+ f "{ func .__name__ } ()" )
289
289
assert new in signature .parameters , (
290
290
f"Matplotlib internal error: { new !r} must be a parameter for "
291
- "{func.__name__}()" )
291
+ f "{ func .__name__ } ()" )
292
292
293
293
@functools .wraps (func )
294
294
def wrapper (* args , ** kwargs ):
295
295
if old in kwargs :
296
296
warn_deprecated (
297
297
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} since Matplotlib { since } ; support "
299
+ f"for the old name will be dropped %(removal)s." )
300
300
kwargs [new ] = kwargs .pop (old )
301
301
return func (* args , ** kwargs )
302
302
Original file line number Diff line number Diff line change @@ -1719,6 +1719,17 @@ def test_hist2d_transpose():
1719
1719
ax .hist2d (x , y , bins = 10 , rasterized = True )
1720
1720
1721
1721
1722
+ def test_hist2d_density_normed ():
1723
+ x , y = np .random .random ((2 , 100 ))
1724
+ ax = plt .figure ().subplots ()
1725
+ for obj in [ax , plt ]:
1726
+ obj .hist2d (x , y , density = True )
1727
+ with pytest .warns (MatplotlibDeprecationWarning ):
1728
+ obj .hist2d (x , y , normed = True )
1729
+ with pytest .warns (MatplotlibDeprecationWarning ):
1730
+ obj .hist2d (x , y , density = True , normed = True )
1731
+
1732
+
1722
1733
class TestScatter (object ):
1723
1734
@image_comparison (baseline_images = ['scatter' ],
1724
1735
style = 'mpl20' , remove_text = True )
You can’t perform that action at this time.
0 commit comments