data_frame (DataFrame or array-like or dict) – This argument needs to be passed for column names (and not keywordnames) to be used. Array-like and dict are transformed internally to apandas DataFrame. Optional: if missing, a DataFrame gets constructedunder the hood using the other arguments.
x (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toposition marks along the x axis in cartesian coordinates. Eitherx
ory
can optionally be a list of column references or array_likes, inwhich case the data will be treated as if it were ‘wide’ rather than‘long’.y (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toposition marks along the y axis in cartesian coordinates. Eitherx
ory
can optionally be a list of column references or array_likes, inwhich case the data will be treated as if it were ‘wide’ rather than‘long’.color (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toassign color to marks.facet_row (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to facetted subplots in the vertical direction.facet_col (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to facetted subplots in the horizontal direction.facet_col_wrap (int) – Maximum number of facet columns. Wraps the column variable at thiswidth, so that the column facets span multiple rows. Ignored if 0, andforced to 0 if
facet_row
or amarginal
is set.facet_row_spacing (float between 0 and 1) – Spacing between facet rows, in paper units. Default is 0.03 or 0.0.7when facet_col_wrap is used.
facet_col_spacing (float between 0 and 1) – Spacing between facet columns, in paper units Default is 0.02.
hover_name (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like appear in boldin the hover tooltip.hover_data (str, or list of str or int, or Series or array-like, or dict) – Either a name or list of names of columns in
data_frame
, or pandasSeries, or array_like objects or a dict with column names as keys, withvalues True (for default formatting) False (in order to remove thiscolumn from hover information), or a formatting string, for example‘:.3f’ or ‘|%a’ or list-like data to appear in the hover tooltip ortuples with a bool or formatting string as first element, and list-likedata to appear in hover as second element Values from these columnsappear as extra data in the hover tooltip.custom_data (str, or list of str or int, or Series or array-like) – Either name or list of names of columns in
data_frame
, or pandasSeries, or array_like objects Values from these columns are extra data,to be used in widgets or Dash callbacks for example. This data is notuser-visible but is included in events emitted by the figure (lassoselection etc.)animation_frame (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to animation frames.animation_group (str or int or Series or array-like) – Either a name of a column in
data_frame
, or a pandas Series orarray_like object. Values from this column or array_like are used toprovide object-constancy across animation frames: rows with matching`animation_group`s will be treated as if they describe the same objectin each frame.category_orders (dict with str keys and list of str values (default
{}
)) – By default, in Python 3.6+, the order of categorical values in axes,legends and facets depends on the order in which these values are firstencountered indata_frame
(and no order is guaranteed by default inPython below 3.6). This parameter is used to force a specific orderingof values per column. The keys of this dict should correspond to columnnames, and the values should be lists of strings corresponding to thespecific display order desired.labels (dict with str keys and str values (default
{}
)) – By default, column names are used in the figure for axis titles, legendentries and hovers. This parameter allows this to be overridden. Thekeys of this dict should correspond to column names, and the valuesshould correspond to the desired label to be displayed.color_discrete_sequence (list of str) – Strings should define valid CSS-colors. When
color
is set and thevalues in the corresponding column are not numeric, values in thatcolumn are assigned colors by cycling throughcolor_discrete_sequence
in the order described incategory_orders
, unless the value ofcolor
is a key incolor_discrete_map
. Various useful colorsequences are available in theplotly.express.colors
submodules,specificallyplotly.express.colors.qualitative
.color_discrete_map (dict with str keys and str values (default
{}
)) – String values should define valid CSS-colors Used to overridecolor_discrete_sequence
to assign a specific colors to markscorresponding with specific values. Keys incolor_discrete_map
shouldbe values in the column denoted bycolor
. Alternatively, if thevalues ofcolor
are valid colors, the string'identity'
may bepassed to cause them to be used directly.orientation (str, one of
'h'
for horizontal or'v'
for vertical.) – (default'v'
ifx
andy
are provided and both continous or bothcategorical, otherwise'v'`(
‘h’) if `x`(`y
) is categorical andy`(`x
) is continuous, otherwise'v'`(
‘h’) if only `x`(`y
) isprovided)boxmode (str (default
'group'
)) – One of'group'
or'overlay'
In'overlay'
mode, boxes are on drawntop of one another. In'group'
mode, boxes are placed beside eachother.log_x (boolean (default
False
)) – IfTrue
, the x-axis is log-scaled in cartesian coordinates.log_y (boolean (default
False
)) – IfTrue
, the y-axis is log-scaled in cartesian coordinates.range_x (list of two numbers) – If provided, overrides auto-scaling on the x-axis in cartesiancoordinates.
range_y (list of two numbers) – If provided, overrides auto-scaling on the y-axis in cartesiancoordinates.
points (str or boolean (default
'outliers'
)) – One of'outliers'
,'suspectedoutliers'
,'all'
, orFalse
. If'outliers'
, only the sample points lying outside the whiskers areshown. If'suspectedoutliers'
, all outlier points are shown and thoseless than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted with themarker’s'outliercolor'
. If'outliers'
, only the sample pointslying outside the whiskers are shown. If'all'
, all sample points areshown. IfFalse
, no sample points are shown and the whiskers extendto the full range of the sample.notched (boolean (default
False
)) – IfTrue
, boxes are drawn with notches.title (str) – The figure title.
template (str or dict or plotly.graph_objects.layout.Template instance) – The figure template name (must be a key in plotly.io.templates) ordefinition.
width (int (default
None
)) – The figure width in pixels.height (int (default
None
)) – The figure height in pixels.
plotly.express.box — 5.22.0 documentation (2024)
References
- https://dash.plotly.com/annotations
- https://medium.com/plotly/introducing-plotly-express-808df010143d
- https://medium.com/plotly/plotly-py-4-0-is-here-offline-only-express-first-displayable-anywhere-fc444e5659ee
- https://plotly.com/python-api-reference/generated/plotly.express.box.html
Top Articles
Recipe: Yellow Butter Cake
Easy Stovetop Candied Pecans Recipe
M101 Bus Time
Secretive Email Addition
Beste zakelijke laptop | Laptopcentrum.nl | Asbas
True West 2017-12 - PDF Free Download
22 high-paying jobs without a degree to pursue in 2024
UK election latest: Starmer sets out 'urgent need for ceasefire' in first call with Israeli PM
There’s a Way to Watch ‘Hocus Pocus’ for Free This Halloween—& No, It’s Not Witchcraft
Showtimes now available for Hocus Pocus Villain Spelltacular at Mickey's Not-So-Scary Halloween Party
Volkswagen Beetle For Sale Craigslist
Why Greensboro is a North Carolina city you shouldn't skip - Lonely Planet
Latest Posts
Sausages and Onion Gravy: Bangers and Mash! [Recipe with Video]
5-Ingredient Appetizers With Quick & Easy Recipes
Article information
Author: Trent Wehner
Last Updated:
Views: 6046
Rating: 4.6 / 5 (56 voted)
Reviews: 95% of readers found this page helpful
Author information
Name: Trent Wehner
Birthday: 1993-03-14
Address: 872 Kevin Squares, New Codyville, AK 01785-0416
Phone: +18698800304764
Job: Senior Farming Developer
Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating
Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.