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

Commit d9c4f96

Browse files
strip plots
1 parent 7d088ba commit d9c4f96

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
@@ -23,6 +23,7 @@
2323
bar_polar,
2424
violin,
2525
box,
26+
strip,
2627
histogram,
2728
scatter_matrix,
2829
parallel_coordinates,
@@ -61,6 +62,7 @@
6162
"bar_polar",
6263
"violin",
6364
"box",
65+
"strip",
6466
"histogram",
6567
"choropleth",
6668
"data",

plotly_express/_chart_types.py

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

385385

386+
def strip(
387+
data_frame,
388+
x=None,
389+
y=None,
390+
color=None,
391+
facet_row=None,
392+
facet_col=None,
393+
hover_name=None,
394+
hover_data=None,
395+
animation_frame=None,
396+
animation_group=None,
397+
category_orders={},
398+
labels={},
399+
color_discrete_sequence=default_qualitative,
400+
color_discrete_map={},
401+
orientation="v",
402+
jitter=None,
403+
log_x=False,
404+
log_y=False,
405+
range_x=None,
406+
range_y=None,
407+
title=None,
408+
template=default_template,
409+
width=default_width,
410+
height=default_height,
411+
):
412+
"""
413+
In a strip plot each row of `data_frame` is represented as a jittered mark within categories.
414+
"""
415+
return make_figure(
416+
args=locals(),
417+
constructor=go.Box,
418+
trace_patch=dict(
419+
orientation=orientation,
420+
boxpoints="all",
421+
pointpos=0,
422+
hoveron="points",
423+
fillcolor="rgba(255,255,255,0)",
424+
line={"color": "rgba(255,255,255,0)"},
425+
jitter=jitter,
426+
x0=" ",
427+
y0=" ",
428+
),
429+
layout_patch=dict(boxmode="group"),
430+
)
431+
432+
433+
strip.__doc__ = make_docstring(strip)
434+
435+
386436
def scatter_3d(
387437
data_frame,
388438
x=None,

0 commit comments

Comments
 (0)