Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 8a9f251

Browse files
strip plots
1 parent e72a8cf commit 8a9f251

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

plotly_express/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
bar_polar,
2323
violin,
2424
box,
25+
strip,
2526
histogram,
2627
scatter_matrix,
2728
parallel_coordinates,
@@ -54,6 +55,7 @@
5455
"bar_polar",
5556
"violin",
5657
"box",
58+
"strip",
5759
"histogram",
5860
"choropleth",
5961
"data",

plotly_express/_chart_types.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,56 @@ def box(
340340
box.__doc__ = make_docstring(box)
341341

342342

343+
def strip(
344+
data_frame,
345+
x=None,
346+
y=None,
347+
color=None,
348+
facet_row=None,
349+
facet_col=None,
350+
hover_name=None,
351+
hover_data=None,
352+
animation_frame=None,
353+
animation_group=None,
354+
category_orders={},
355+
labels={},
356+
color_discrete_sequence=default_qualitative,
357+
color_discrete_map={},
358+
orientation="v",
359+
jitter=None,
360+
log_x=False,
361+
log_y=False,
362+
range_x=None,
363+
range_y=None,
364+
title=None,
365+
template=default_template,
366+
width=default_width,
367+
height=default_height,
368+
):
369+
"""
370+
In a strip plot each row of `data_frame` is represented as a jittered mark within categories.
371+
"""
372+
return make_figure(
373+
args=locals(),
374+
constructor=go.Box,
375+
trace_patch=dict(
376+
orientation=orientation,
377+
boxpoints="all",
378+
pointpos=0,
379+
hoveron="points",
380+
fillcolor="rgba(255,255,255,0)",
381+
line={"color": "rgba(255,255,255,0)"},
382+
jitter=jitter,
383+
x0=" ",
384+
y0=" ",
385+
),
386+
layout_patch=dict(boxmode="group"),
387+
)
388+
389+
390+
strip.__doc__ = make_docstring(strip)
391+
392+
343393
def scatter_3d(
344394
data_frame,
345395
x=None,

0 commit comments

Comments
 (0)