@@ -791,13 +791,21 @@ def test_plot_scatter_with_norm(self):
791
791
# added while fixing GH 45809
792
792
import matplotlib as mpl
793
793
794
- ax = self .hexbin_df .plot .scatter (x = "A" , y = "B" , c = "C" , norm = mpl .colors .LogNorm ())
795
- assert ax .collections [0 ].norm ._scale
794
+ df = DataFrame (np .random .random ((10 , 3 )) * 100 , columns = ["a" , "b" , "c" ])
795
+ norm = mpl .colors .LogNorm ()
796
+ ax = df .plot .scatter (x = "a" , y = "b" , c = "c" , norm = norm )
797
+ assert ax .collections [0 ].norm is norm
796
798
797
799
def test_plot_scatter_without_norm (self ):
798
800
# added while fixing GH 45809
799
- ax = self .hexbin_df .plot .scatter (x = "A" , y = "B" , c = "C" )
800
- assert ax .collections [0 ].norm ._scale is None
801
+ import matplotlib as mpl
802
+
803
+ df = DataFrame (np .random .random ((10 , 3 )) * 100 , columns = ["a" , "b" , "c" ])
804
+ ax = df .plot .scatter (x = "a" , y = "b" , c = "c" )
805
+ color_min_max = (df .c .min (), df .c .max ())
806
+ default_norm = mpl .colors .Normalize (* color_min_max )
807
+ for c in range (100 ):
808
+ assert ax .collections [0 ].norm (c ) == default_norm (c )
801
809
802
810
def test_plot_bar (self ):
803
811
df = DataFrame (
0 commit comments