Skip to content

Commit 5ee4bdd

Browse files
committed
TST: add test for norm scatter plot parameter (pandas-dev#45809)
1 parent 5bf346c commit 5ee4bdd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/plotting/frame/test_frame.py

+10
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,16 @@ def test_plot_scatter_with_s(self):
807807
ax = df.plot.scatter(x="a", y="b", s="c")
808808
tm.assert_numpy_array_equal(df["c"].values, right=ax.collections[0].get_sizes())
809809

810+
def test_plot_scatter_with_norm(self):
811+
import matplotlib as mpl
812+
813+
ax = self.hexbin_df.plot.scatter(x="A", y="B", c="C", norm=mpl.colors.LogNorm())
814+
assert ax.collections[0].norm._scale
815+
816+
def test_plot_scatter_without_norm(self):
817+
ax = self.hexbin_df.plot.scatter(x="A", y="B", c="C")
818+
assert ax.collections[0].norm._scale is None
819+
810820
def test_plot_bar(self):
811821
df = DataFrame(
812822
np.random.randn(6, 4),

0 commit comments

Comments
 (0)