Skip to content

Commit a4932c6

Browse files
committed
Test no error raised plotting categorical subset
1 parent 05c715f commit a4932c6

File tree

1 file changed

+8
-0
lines changed
  • packages/python/plotly/plotly/tests/test_optional/test_px

1 file changed

+8
-0
lines changed

Diff for: packages/python/plotly/plotly/tests/test_optional/test_px/test_colors.py

+8
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,11 @@ def test_r_colorscales():
5353
assert scale.replace("_r", "") in scale_names
5454
else:
5555
assert scale + "_r" in scale_names
56+
57+
58+
def test_color_categorical_dtype():
59+
df = px.data.tips()
60+
df["day"] = df["day"].astype("category")
61+
px.scatter(
62+
df[df.day != df.day.cat.categories[0]], x="total_bill", y="tip", facet_col="day"
63+
)

0 commit comments

Comments
 (0)