Skip to content

Commit 0340077

Browse files
facet_wrap percy tests
1 parent be875be commit 0340077

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/percy/plotly-express.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,33 @@
184184

185185
import plotly.express as px
186186

187+
tips = px.data.tips()
188+
fig = px.scatter(
189+
tips,
190+
x="day",
191+
y="tip",
192+
facet_col="day",
193+
facet_col_wrap=2,
194+
category_orders={"day": ["Thur", "Fri", "Sat", "Sun"]},
195+
)
196+
fig.write_html(os.path.join(dir_name, "facet_wrap_neat.html"))
197+
198+
import plotly.express as px
199+
200+
tips = px.data.tips()
201+
fig = px.scatter(
202+
tips,
203+
x="day",
204+
y="tip",
205+
color="sex",
206+
facet_col="day",
207+
facet_col_wrap=3,
208+
category_orders={"day": ["Thur", "Fri", "Sat", "Sun"]},
209+
)
210+
fig.write_html(os.path.join(dir_name, "facet_wrap_ragged.html"))
211+
212+
import plotly.express as px
213+
187214
gapminder = px.data.gapminder()
188215
fig = px.area(gapminder, x="year", y="pop", color="continent", line_group="country")
189216
fig.write_html(os.path.join(dir_name, "area.html"))

0 commit comments

Comments
 (0)