plotly_express

plotly_express is a terse, consistent, high-level wrapper around plotly for rapid data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express

Sub-modules

plotly_express.colors

Built-in qualitative color sequences and sequential, diverging and cyclical color scales.

plotly_express.data

Built-in datasets for demonstration, educational and test purposes.

Functions

def scatter(data_frame, x=None, y=None, color=None, symbol=None, size=None, hover_name=None, hover_data=None, text=None, facet_row=None, facet_col=None, error_x=None, error_x_minus=None, error_y=None, error_y_minus=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map={}, opacity=None, size_max=None, marginal_x=None, marginal_y=None, trendline=None, trendline_color_override=None, log_x=False, log_y=False, range_x=None, range_y=None, render_mode='auto', title=None, template=None, width=None, height=None)

In a scatter plot, each row of data_frame is represented by a symbol mark in 2D space.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
symbol
(string: name of column in data_frame) Values from this column are used to assign symbols to marks.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
error_x
(string: name of column in data_frame) Values from this column are used to size x-axis error bars. If error_x_minus is None, error bars will be symmetrical, otherwise error_x is used for the positive direction only.
error_x_minus
(string: name of column in data_frame) Values from this column are used to size x-axis error bars in the negative direction. Ignored if error_x is None.
error_y
(string: name of column in data_frame) Values from this column are used to size y-axis error bars. If error_y_minus is None, error bars will be symmetrical, otherwise error_y is used for the positive direction only.
error_y_minus
(string: name of column in data_frame) Values from this column are used to size y-axis error bars in the negative direction. Ignored if error_y is None.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
symbol_sequence
(list of strings defining plotly.js symbols) When symbol is set, values in that column are assigned symbols by cycling through symbol_sequence in the order described in category_orders, unless the value of symbol is a key in symbol_map.
symbol_map
(dict with string keys and values that are strings defining plotly.js symbols, default {}) Used to override symbol_sequence to assign a specific symbols to marks corresponding with specific values. Keys in symbol_map should be values in the column denoted by symbol.
opacity
(number, between 0 and 1) Sets the opacity for markers.
size_max
(integer, default 20) Set the maximum mark size when using size.
marginal_x
(string, one of 'rug', 'box', 'violin', 'histogram') If set, a horizontal subplot is drawn above the main plot, visulizing the x-distribution.
marginal_y
(string, one of 'rug', 'box', 'violin', 'histogram') If set, a vertical subplot is drawn to the right of the main plot, visulizing the y-distribution.
trendline
(string, one of 'ols' or 'lowess', default None) If 'ols', an Ordinary Least Squares regression line will be drawn for each discrete-color/symbol group. If 'lowess', a Locally Weighted Scatterplot Smoothing line will be drawn for each discrete-color/symbol group.
trendline_color_override
(string, valid CSS color) If provided, and if trendline is set, all trendlines will be drawn in this color.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
render_mode
(string, one of 'auto', 'svg' or 'webgl', default 'auto') Controls the browser API used to draw marks. 'svg' is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output. 'webgl' is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. 'auto' uses heuristics to choose the mode.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_3d(data_frame, x=None, y=None, z=None, color=None, symbol=None, size=None, text=None, hover_name=None, hover_data=None, error_x=None, error_x_minus=None, error_y=None, error_y_minus=None, error_z=None, error_z_minus=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, size_max=None, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map={}, opacity=None, log_x=False, log_y=False, log_z=False, range_x=None, range_y=None, range_z=None, title=None, template=None, width=None, height=None)

In a 3D scatter plot, each row of data_frame is represented by a symbol mark in 3D space.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
z
(string: name of column in data_frame) Values from this column are used to position marks along the z axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
symbol
(string: name of column in data_frame) Values from this column are used to assign symbols to marks.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
error_x
(string: name of column in data_frame) Values from this column are used to size x-axis error bars. If error_x_minus is None, error bars will be symmetrical, otherwise error_x is used for the positive direction only.
error_x_minus
(string: name of column in data_frame) Values from this column are used to size x-axis error bars in the negative direction. Ignored if error_x is None.
error_y
(string: name of column in data_frame) Values from this column are used to size y-axis error bars. If error_y_minus is None, error bars will be symmetrical, otherwise error_y is used for the positive direction only.
error_y_minus
(string: name of column in data_frame) Values from this column are used to size y-axis error bars in the negative direction. Ignored if error_y is None.
error_z
(string: name of column in data_frame) Values from this column are used to size z-axis error bars. If error_z_minus is None, error bars will be symmetrical, otherwise error_z is used for the positive direction only.
error_z_minus
(string: name of column in data_frame) Values from this column are used to size z-axis error bars in the negative direction. Ignored if error_z is None.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
size_max
(integer, default 20) Set the maximum mark size when using size.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
symbol_sequence
(list of strings defining plotly.js symbols) When symbol is set, values in that column are assigned symbols by cycling through symbol_sequence in the order described in category_orders, unless the value of symbol is a key in symbol_map.
symbol_map
(dict with string keys and values that are strings defining plotly.js symbols, default {}) Used to override symbol_sequence to assign a specific symbols to marks corresponding with specific values. Keys in symbol_map should be values in the column denoted by symbol.
opacity
(number, between 0 and 1) Sets the opacity for markers.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
log_z
(boolean, default False) If True, the z-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
range_z
(2-element list of numbers) If provided, overrides auto-scaling on the z-axis in cartesian coordinates.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_polar(data_frame, r=None, theta=None, color=None, symbol=None, size=None, hover_name=None, hover_data=None, text=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map={}, opacity=None, direction='clockwise', start_angle=90, size_max=None, range_r=None, log_r=False, render_mode='auto', title=None, template=None, width=None, height=None)

In a polar scatter plot, each row of data_frame is represented by a symbol mark in polar coordinates.

Arguments

data_frame
A 'tidy' pandas.DataFrame
r
(string: name of column in data_frame) Values from this column are used to position marks along the radial axis in polar coordinates.
theta
(string: name of column in data_frame) Values from this column are used to position marks along the angular axis in polar coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
symbol
(string: name of column in data_frame) Values from this column are used to assign symbols to marks.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
symbol_sequence
(list of strings defining plotly.js symbols) When symbol is set, values in that column are assigned symbols by cycling through symbol_sequence in the order described in category_orders, unless the value of symbol is a key in symbol_map.
symbol_map
(dict with string keys and values that are strings defining plotly.js symbols, default {}) Used to override symbol_sequence to assign a specific symbols to marks corresponding with specific values. Keys in symbol_map should be values in the column denoted by symbol.
opacity
(number, between 0 and 1) Sets the opacity for markers.
direction
(string, one of 'counterclockwise', 'clockwise'. Default is 'clockwise') Sets the direction in which increasing values of the angular axis are drawn.
start_angle
(integer, default is 90) Sets start angle for the angular axis, with 0 being due east and 90 being due north.
size_max
(integer, default 20) Set the maximum mark size when using size.
range_r
(2-element list of numbers) If provided, overrides auto-scaling on the radial axis in polar coordinates.
log_r
(boolean, default False) If True, the radial axis is log-scaled in polar coordinates.
render_mode
(string, one of 'auto', 'svg' or 'webgl', default 'auto') Controls the browser API used to draw marks. 'svg' is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output. 'webgl' is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. 'auto' uses heuristics to choose the mode.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_ternary(data_frame, a=None, b=None, c=None, color=None, symbol=None, size=None, text=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map={}, opacity=None, size_max=None, title=None, template=None, width=None, height=None)

In a ternary scatter plot, each row of data_frame is represented by a symbol mark in ternary coordinates.

Arguments

data_frame
A 'tidy' pandas.DataFrame
a
(string: name of column in data_frame) Values from this column are used to position marks along the a axis in ternary coordinates.
b
(string: name of column in data_frame) Values from this column are used to position marks along the b axis in ternary coordinates.
c
(string: name of column in data_frame) Values from this column are used to position marks along the c axis in ternary coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
symbol
(string: name of column in data_frame) Values from this column are used to assign symbols to marks.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
symbol_sequence
(list of strings defining plotly.js symbols) When symbol is set, values in that column are assigned symbols by cycling through symbol_sequence in the order described in category_orders, unless the value of symbol is a key in symbol_map.
symbol_map
(dict with string keys and values that are strings defining plotly.js symbols, default {}) Used to override symbol_sequence to assign a specific symbols to marks corresponding with specific values. Keys in symbol_map should be values in the column denoted by symbol.
opacity
(number, between 0 and 1) Sets the opacity for markers.
size_max
(integer, default 20) Set the maximum mark size when using size.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_mapbox(data_frame, lat=None, lon=None, color=None, text=None, hover_name=None, hover_data=None, size=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, opacity=None, size_max=None, zoom=8, title=None, template=None, width=None, height=None)

In a Mapbox scatter plot, each row of data_frame is represented by a symbol mark on a Mapbox map.

Arguments

data_frame
A 'tidy' pandas.DataFrame
lat
(string: name of column in data_frame) Values from this column are used to position marks according to latitude on a map.
lon
(string: name of column in data_frame) Values from this column are used to position marks according to longitude on a map.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
opacity
(number, between 0 and 1) Sets the opacity for markers.
size_max
(integer, default 20) Set the maximum mark size when using size.
zoom
(integer between 0 and 20, default is 8) Sets map zoom level.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_geo(data_frame, lat=None, lon=None, locations=None, locationmode=None, color=None, text=None, hover_name=None, hover_data=None, size=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, opacity=None, size_max=None, projection=None, scope=None, center=None, title=None, template=None, width=None, height=None)

In a geographic scatter plot, each row of data_frame is represented by a symbol mark on a map.

Arguments

data_frame
A 'tidy' pandas.DataFrame
lat
(string: name of column in data_frame) Values from this column are used to position marks according to latitude on a map.
lon
(string: name of column in data_frame) Values from this column are used to position marks according to longitude on a map.
locations
(string: name of column in data_frame) Values from this column are be interpreted according to locationmode and mapped to longitude/latitude.
locationmode
(string, one of 'ISO-3', 'USA-states', 'country names') Determines the set of locations used to match entries in locations to regions on the map.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
opacity
(number, between 0 and 1) Sets the opacity for markers.
size_max
(integer, default 20) Set the maximum mark size when using size.
projection
(string, one of 'equirectangular', 'mercator', 'orthographic', 'natural earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4', 'azimuthal equal area', 'azimuthal equidistant', 'conic equal area', 'conic conformal', 'conic equidistant', 'gnomonic', 'stereographic', 'mollweide', 'hammer', 'transverse mercator', 'albers usa', 'winkel tripel', 'aitoff', 'sinusoidal')Default depends on scope.
scope
(string, one of 'world', 'usa', 'europe', 'asia', 'africa', 'north america', 'south america')Default is 'world' unless projection is set to 'albers usa', which forces 'usa'.
center
(dict with lat and lon keys) Sets the center point of the map.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def scatter_matrix(data_frame, dimensions=None, color=None, symbol=None, size=None, hover_name=None, hover_data=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map={}, opacity=None, size_max=None, title=None, template=None, width=None, height=None)

In a scatter plot matrix (or SPLOM), each row of data_frame is represented by a multiple symbol marks, one in each cell of a grid of 2D scatter plots, which plot each pair of dimensions against each other.

Arguments

data_frame
A 'tidy' pandas.DataFrame
dimensions
(list of strings, names of columns in data_frame) Columns to be used in multidimensional visualization.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
symbol
(string: name of column in data_frame) Values from this column are used to assign symbols to marks.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
symbol_sequence
(list of strings defining plotly.js symbols) When symbol is set, values in that column are assigned symbols by cycling through symbol_sequence in the order described in category_orders, unless the value of symbol is a key in symbol_map.
symbol_map
(dict with string keys and values that are strings defining plotly.js symbols, default {}) Used to override symbol_sequence to assign a specific symbols to marks corresponding with specific values. Keys in symbol_map should be values in the column denoted by symbol.
opacity
(number, between 0 and 1) Sets the opacity for markers.
size_max
(integer, default 20) Set the maximum mark size when using size.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def density_contour(data_frame, x=None, y=None, color=None, facet_row=None, facet_col=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, marginal_x=None, marginal_y=None, trendline=None, trendline_color_override=None, log_x=False, log_y=False, range_x=None, range_y=None, title=None, template=None, width=None, height=None)

In a density contour plot, rows of data_frame are grouped together into contour marks to visualize the density of their distribution in 2D space.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
marginal_x
(string, one of 'rug', 'box', 'violin', 'histogram') If set, a horizontal subplot is drawn above the main plot, visulizing the x-distribution.
marginal_y
(string, one of 'rug', 'box', 'violin', 'histogram') If set, a vertical subplot is drawn to the right of the main plot, visulizing the y-distribution.
trendline
(string, one of 'ols' or 'lowess', default None) If 'ols', an Ordinary Least Squares regression line will be drawn for each discrete-color/symbol group. If 'lowess', a Locally Weighted Scatterplot Smoothing line will be drawn for each discrete-color/symbol group.
trendline_color_override
(string, valid CSS color) If provided, and if trendline is set, all trendlines will be drawn in this color.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def line(data_frame, x=None, y=None, line_group=None, color=None, line_dash=None, hover_name=None, hover_data=None, text=None, facet_row=None, facet_col=None, error_x=None, error_x_minus=None, error_y=None, error_y_minus=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, line_dash_sequence=None, line_dash_map={}, log_x=False, log_y=False, range_x=None, range_y=None, line_shape=None, render_mode='auto', title=None, template=None, width=None, height=None)

In a 2D line plot, each row of data_frame is represented as vertex of a polyline mark in 2D space.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
line_dash
(string: name of column in data_frame) Values from this column are used to assign dash-patterns to lines.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
error_x
(string: name of column in data_frame) Values from this column are used to size x-axis error bars. If error_x_minus is None, error bars will be symmetrical, otherwise error_x is used for the positive direction only.
error_x_minus
(string: name of column in data_frame) Values from this column are used to size x-axis error bars in the negative direction. Ignored if error_x is None.
error_y
(string: name of column in data_frame) Values from this column are used to size y-axis error bars. If error_y_minus is None, error bars will be symmetrical, otherwise error_y is used for the positive direction only.
error_y_minus
(string: name of column in data_frame) Values from this column are used to size y-axis error bars in the negative direction. Ignored if error_y is None.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
line_dash_sequence
(list of strings defining plotly.js dash-patterns) When line_dash is set, values in that column are assigned dash-patterns by cycling through line_dash_sequence in the order described in category_orders, unless the value of line_dash is a key in line_dash_map.
line_dash_map
(dict with string keys and values that are strings defining plotly.js dash-patterns, default {})Used to override line_dash_sequences to assign a specific dash-patterns to lines corresponding with specific values. Keys in line_dash_map should be values in the column denoted by line_dash.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
line_shape
(string, one of 'linear' or 'spline') Default is 'linear'.
render_mode
(string, one of 'auto', 'svg' or 'webgl', default 'auto') Controls the browser API used to draw marks. 'svg' is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output. 'webgl' is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. 'auto' uses heuristics to choose the mode.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def line_polar(data_frame, r=None, theta=None, color=None, line_dash=None, hover_name=None, hover_data=None, line_group=None, text=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, line_dash_sequence=None, line_dash_map={}, direction='clockwise', start_angle=90, line_close=False, line_shape=None, render_mode='auto', range_r=None, log_r=False, title=None, template=None, width=None, height=None)

In a polar line plot, each row of data_frame is represented as vertex of a polyline mark in polar coordinates.

Arguments

data_frame
A 'tidy' pandas.DataFrame
r
(string: name of column in data_frame) Values from this column are used to position marks along the radial axis in polar coordinates.
theta
(string: name of column in data_frame) Values from this column are used to position marks along the angular axis in polar coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
line_dash
(string: name of column in data_frame) Values from this column are used to assign dash-patterns to lines.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
line_dash_sequence
(list of strings defining plotly.js dash-patterns) When line_dash is set, values in that column are assigned dash-patterns by cycling through line_dash_sequence in the order described in category_orders, unless the value of line_dash is a key in line_dash_map.
line_dash_map
(dict with string keys and values that are strings defining plotly.js dash-patterns, default {})Used to override line_dash_sequences to assign a specific dash-patterns to lines corresponding with specific values. Keys in line_dash_map should be values in the column denoted by line_dash.
direction
(string, one of 'counterclockwise', 'clockwise'. Default is 'clockwise') Sets the direction in which increasing values of the angular axis are drawn.
start_angle
(integer, default is 90) Sets start angle for the angular axis, with 0 being due east and 90 being due north.
line_close
(boolean, default False) If True, an extra line segment is drawn between the first and last point.
line_shape
(string, one of 'linear' or 'spline') Default is 'linear'.
render_mode
(string, one of 'auto', 'svg' or 'webgl', default 'auto') Controls the browser API used to draw marks. 'svg' is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output. 'webgl' is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. 'auto' uses heuristics to choose the mode.
range_r
(2-element list of numbers) If provided, overrides auto-scaling on the radial axis in polar coordinates.
log_r
(boolean, default False) If True, the radial axis is log-scaled in polar coordinates.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def line_ternary(data_frame, a=None, b=None, c=None, color=None, line_dash=None, line_group=None, hover_name=None, hover_data=None, text=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, line_dash_sequence=None, line_dash_map={}, line_shape=None, title=None, template=None, width=None, height=None)

In a ternary line plot, each row of data_frame is represented as vertex of a polyline mark in ternary coordinates.

Arguments

data_frame
A 'tidy' pandas.DataFrame
a
(string: name of column in data_frame) Values from this column are used to position marks along the a axis in ternary coordinates.
b
(string: name of column in data_frame) Values from this column are used to position marks along the b axis in ternary coordinates.
c
(string: name of column in data_frame) Values from this column are used to position marks along the c axis in ternary coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
line_dash
(string: name of column in data_frame) Values from this column are used to assign dash-patterns to lines.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
line_dash_sequence
(list of strings defining plotly.js dash-patterns) When line_dash is set, values in that column are assigned dash-patterns by cycling through line_dash_sequence in the order described in category_orders, unless the value of line_dash is a key in line_dash_map.
line_dash_map
(dict with string keys and values that are strings defining plotly.js dash-patterns, default {})Used to override line_dash_sequences to assign a specific dash-patterns to lines corresponding with specific values. Keys in line_dash_map should be values in the column denoted by line_dash.
line_shape
(string, one of 'linear' or 'spline') Default is 'linear'.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def line_mapbox(data_frame, lat=None, lon=None, color=None, text=None, hover_name=None, hover_data=None, line_group=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, zoom=8, title=None, template=None, width=None, height=None)

In a Mapbox line plot, each row of data_frame is represented as vertex of a polyline mark on a Mapbox map.

Arguments

data_frame
A 'tidy' pandas.DataFrame
lat
(string: name of column in data_frame) Values from this column are used to position marks according to latitude on a map.
lon
(string: name of column in data_frame) Values from this column are used to position marks according to longitude on a map.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
zoom
(integer between 0 and 20, default is 8) Sets map zoom level.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def line_geo(data_frame, lat=None, lon=None, locations=None, locationmode=None, color=None, line_dash=None, text=None, hover_name=None, hover_data=None, line_group=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, line_dash_sequence=None, line_dash_map={}, projection=None, scope=None, center=None, title=None, template=None, width=None, height=None)

In a geographic line plot, each row of data_frame is represented as vertex of a polyline mark on a map.

Arguments

data_frame
A 'tidy' pandas.DataFrame
lat
(string: name of column in data_frame) Values from this column are used to position marks according to latitude on a map.
lon
(string: name of column in data_frame) Values from this column are used to position marks according to longitude on a map.
locations
(string: name of column in data_frame) Values from this column are be interpreted according to locationmode and mapped to longitude/latitude.
locationmode
(string, one of 'ISO-3', 'USA-states', 'country names') Determines the set of locations used to match entries in locations to regions on the map.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
line_dash
(string: name of column in data_frame) Values from this column are used to assign dash-patterns to lines.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
line_dash_sequence
(list of strings defining plotly.js dash-patterns) When line_dash is set, values in that column are assigned dash-patterns by cycling through line_dash_sequence in the order described in category_orders, unless the value of line_dash is a key in line_dash_map.
line_dash_map
(dict with string keys and values that are strings defining plotly.js dash-patterns, default {})Used to override line_dash_sequences to assign a specific dash-patterns to lines corresponding with specific values. Keys in line_dash_map should be values in the column denoted by line_dash.
projection
(string, one of 'equirectangular', 'mercator', 'orthographic', 'natural earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4', 'azimuthal equal area', 'azimuthal equidistant', 'conic equal area', 'conic conformal', 'conic equidistant', 'gnomonic', 'stereographic', 'mollweide', 'hammer', 'transverse mercator', 'albers usa', 'winkel tripel', 'aitoff', 'sinusoidal')Default depends on scope.
scope
(string, one of 'world', 'usa', 'europe', 'asia', 'africa', 'north america', 'south america')Default is 'world' unless projection is set to 'albers usa', which forces 'usa'.
center
(dict with lat and lon keys) Sets the center point of the map.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def parallel_coordinates(data_frame, dimensions=None, color=None, labels={}, color_continuous_scale=None, color_continuous_midpoint=None, title=None, template=None, width=None, height=None)

In a parallel coordinates plot, each row of data_frame is represented by a polyline mark which traverses a set of parallel axes, one for each of the dimensions.

Arguments

data_frame
A 'tidy' pandas.DataFrame
dimensions
(list of strings, names of columns in data_frame) Columns to be used in multidimensional visualization.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def parallel_categories(data_frame, dimensions=None, color=None, labels={}, color_continuous_scale=None, color_continuous_midpoint=None, title=None, template=None, width=None, height=None)

In a parallel categories (or parallel sets) plot, each row of data_frame is grouped with other rows that share the same values of dimensions and then plotted as a polyline mark through a set of parallel axes, one for each of the dimensions.

Arguments

data_frame
A 'tidy' pandas.DataFrame
dimensions
(list of strings, names of columns in data_frame) Columns to be used in multidimensional visualization.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def area(data_frame, x=None, y=None, line_group=None, color=None, hover_name=None, hover_data=None, text=None, facet_row=None, facet_col=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, orientation='v', groupnorm=None, log_x=False, log_y=False, range_x=None, range_y=None, line_shape=None, render_mode='auto', title=None, template=None, width=None, height=None)

In a stacked area plot, each row of data_frame is represented as vertex of a polyline mark in 2D space. The area between successive polylines is filled.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
line_group
(string: name of column in data_frame) Values from this column are used to group rows of data_frame into lines.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
orientation
(string, one of 'h' for horizontal or 'v' for vertical) Default is 'v'.
groupnorm
(string, one of 'fraction' or 'percent', default is None) If set to 'fraction', the value of each point is divided by the sum of all values at that location coordinate. 'percent' is the same but multiplied by 100 to show percentages.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
line_shape
(string, one of 'linear' or 'spline') Default is 'linear'.
render_mode
(string, one of 'auto', 'svg' or 'webgl', default 'auto') Controls the browser API used to draw marks. 'svg' is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output. 'webgl' is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. 'auto' uses heuristics to choose the mode.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def bar(data_frame, x=None, y=None, color=None, facet_row=None, facet_col=None, hover_name=None, hover_data=None, text=None, error_x=None, error_x_minus=None, error_y=None, error_y_minus=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, color_continuous_midpoint=None, opacity=None, orientation='v', barmode='relative', log_x=False, log_y=False, range_x=None, range_y=None, title=None, template=None, width=None, height=None)

In a bar plot, each row of data_frame is represented as a rectangular mark.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
text
(string: name of column in data_frame) Values from this column appear in the figure as text labels.
error_x
(string: name of column in data_frame) Values from this column are used to size x-axis error bars. If error_x_minus is None, error bars will be symmetrical, otherwise error_x is used for the positive direction only.
error_x_minus
(string: name of column in data_frame) Values from this column are used to size x-axis error bars in the negative direction. Ignored if error_x is None.
error_y
(string: name of column in data_frame) Values from this column are used to size y-axis error bars. If error_y_minus is None, error bars will be symmetrical, otherwise error_y is used for the positive direction only.
error_y_minus
(string: name of column in data_frame) Values from this column are used to size y-axis error bars in the negative direction. Ignored if error_y is None.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
opacity
(number, between 0 and 1) Sets the opacity for markers.
orientation
(string, one of 'h' for horizontal or 'v' for vertical) Default is 'v'.
barmode
(string, one of 'group', 'overlay' or 'relative'. Default is 'relative') In 'relative' mode, bars are stacked above zero for positive values and below zero for negative values. In 'overlay' mode, bars are on drawn top of one another. In 'group' mode, bars are placed beside each other.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def bar_polar(data_frame, r=None, theta=None, color=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, barnorm='', barmode='relative', direction='clockwise', start_angle=90, range_r=None, log_r=False, title=None, template=None, width=None, height=None)

In a polar bar plot, each row of data_frame is represented as a wedge mark in polar coordinates.

Arguments

data_frame
A 'tidy' pandas.DataFrame
r
(string: name of column in data_frame) Values from this column are used to position marks along the radial axis in polar coordinates.
theta
(string: name of column in data_frame) Values from this column are used to position marks along the angular axis in polar coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
barnorm
(string, one of 'fraction' or 'percent', default is None) If set to 'fraction', the value of each bar is divided by the sum of all values at that location coordinate. 'percent' is the same but multiplied by 100 to show percentages.
barmode
(string, one of 'group', 'overlay' or 'relative'. Default is 'relative') In 'relative' mode, bars are stacked above zero for positive values and below zero for negative values. In 'overlay' mode, bars are on drawn top of one another. In 'group' mode, bars are placed beside each other.
direction
(string, one of 'counterclockwise', 'clockwise'. Default is 'clockwise') Sets the direction in which increasing values of the angular axis are drawn.
start_angle
(integer, default is 90) Sets start angle for the angular axis, with 0 being due east and 90 being due north.
range_r
(2-element list of numbers) If provided, overrides auto-scaling on the radial axis in polar coordinates.
log_r
(boolean, default False) If True, the radial axis is log-scaled in polar coordinates.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def violin(data_frame, x=None, y=None, color=None, facet_row=None, facet_col=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, orientation='v', violinmode='group', log_x=False, log_y=False, range_x=None, range_y=None, points=None, box=False, title=None, template=None, width=None, height=None)

In a violin plot, rows of data_frame are grouped together into a curved mark to visualize their distribution.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
orientation
(string, one of 'h' for horizontal or 'v' for vertical) Default is 'v'.
violinmode
(string, one of 'group' or 'overlay'. Default is 'group') In 'overlay' mode, violins are on drawn top of one another. In 'group' mode, violins are placed beside each other.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
points
(string or boolean, one of 'all', 'outliers', or False. Default is 'outliers') If 'outliers', only the sample points lying outside the whiskers are shown. If 'all', all sample points are shown. If False, no sample points are shown
box()
(boolean, default False) If True, boxes are drawn inside the violins.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def box(data_frame, x=None, y=None, color=None, facet_row=None, facet_col=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, orientation='v', boxmode='group', log_x=False, log_y=False, range_x=None, range_y=None, points=None, notched=False, title=None, template=None, width=None, height=None)

In a box plot, rows of data_frame are grouped together into a box-and-whisker mark to visualize their distribution.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
orientation
(string, one of 'h' for horizontal or 'v' for vertical) Default is 'v'.
boxmode
(string, one of 'group' or 'overlay'. Default is 'group') In 'overlay' mode, boxes are on drawn top of one another. In 'group' mode, baxes are placed beside each other.
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
points
(string or boolean, one of 'all', 'outliers', or False. Default is 'outliers') If 'outliers', only the sample points lying outside the whiskers are shown. If 'all', all sample points are shown. If False, no sample points are shown
notched
(boolean, default False) If True, boxes are drawn with notches.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def histogram(data_frame, x=None, y=None, color=None, facet_row=None, facet_col=None, hover_name=None, hover_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, marginal=None, opacity=None, orientation='v', barmode='relative', barnorm=None, histnorm=None, log_x=False, log_y=False, range_x=None, range_y=None, histfunc=None, cumulative=None, nbins=None, title=None, template=None, width=None, height=None)

In a histogram, rows of data_frame are grouped together into a rectangular mark to visualize some aggregate quantity like count or sum.

Arguments

data_frame
A 'tidy' pandas.DataFrame
x
(string: name of column in data_frame) Values from this column are used to position marks along the x axis in cartesian coordinates.
y
(string: name of column in data_frame) Values from this column are used to position marks along the y axis in cartesian coordinates.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
facet_row
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the vertical direction.
facet_col
(string: name of column in data_frame) Values from this column are used to assign marks to facetted subplots in the horizontal direction.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_discrete_sequence
(list of valid CSS-color strings) When color is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through color_discrete_sequence in the order described in category_orders, unless the value of color is a key in color_discrete_map. Various useful color sequences are available in the plotly_express.colors submodules, specifically plotly_express.colors.qualitative.
color_discrete_map
(dict with string keys and values that are valid CSS-color strings, default {}) Used to override color_discrete_sequence to assign a specific colors to marks corresponding with specific values. Keys in color_discrete_map should be values in the column denoted by color.
marginal
(string, one of 'rug', 'box', 'violin', 'histogram') If set, a subplot is drawn alongside the main plot, visulizing the distribution.
opacity
(number, between 0 and 1) Sets the opacity for markers.
orientation
(string, one of 'h' for horizontal or 'v' for vertical) Default is 'v'.
barmode
(string, one of 'group', 'overlay' or 'relative'. Default is 'relative') In 'relative' mode, bars are stacked above zero for positive values and below zero for negative values. In 'overlay' mode, bars are on drawn top of one another. In 'group' mode, bars are placed beside each other.
barnorm
(string, one of 'fraction' or 'percent', default is None) If set to 'fraction', the value of each bar is divided by the sum of all values at that location coordinate. 'percent' is the same but multiplied by 100 to show percentages.
histnorm
(string, one of 'percent', 'probability', 'density', 'probability density', default None) If None, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If 'percent' or 'probability', the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If 'density', the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If 'probability density', the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).
log_x
(boolean, default False) If True, the x-axis is log-scaled in cartesian coordinates.
log_y
(boolean, default False) If True, the y-axis is log-scaled in cartesian coordinates.
range_x
(2-element list of numbers) If provided, overrides auto-scaling on the x-axis in cartesian coordinates.
range_y
(2-element list of numbers) If provided, overrides auto-scaling on the y-axis in cartesian coordinates.
histfunc
(string, one of 'count', 'sum', 'avg', 'min', 'max'. Default is 'count')Function used to compute histogram bar lengths. The arguments to this function are the values of y if orientation is 'v', otherwise the arguements are the values of x.
cumulative
(boolean, default False) If True, histogram values are cumulative.
nbins
(positive integer) Sets the number of bins.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def choropleth(data_frame, lat=None, lon=None, locations=None, locationmode=None, color=None, hover_name=None, hover_data=None, size=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_continuous_scale=None, color_continuous_midpoint=None, size_max=None, projection=None, scope=None, center=None, title=None, template=None, width=None, height=None)

In a choropleth map, each row of data_frame is represented by a colored region mark on a map.

Arguments

data_frame
A 'tidy' pandas.DataFrame
lat
(string: name of column in data_frame) Values from this column are used to position marks according to latitude on a map.
lon
(string: name of column in data_frame) Values from this column are used to position marks according to longitude on a map.
locations
(string: name of column in data_frame) Values from this column are be interpreted according to locationmode and mapped to longitude/latitude.
locationmode
(string, one of 'ISO-3', 'USA-states', 'country names') Determines the set of locations used to match entries in locations to regions on the map.
color
(string: name of column in data_frame) Values from this column are used to assign color to marks.
hover_name
(string: name of column in data_frame) Values from this column appear in bold in the hover tooltip.
hover_data
(list of string: names of columns in data_frame) Values from these columns appear as extra data in the hover tooltip.
size
(string: name of column in data_frame) Values from this column are used to assign mark sizes.
animation_frame
(string: name of column in data_frame) Values from this column are used to assign marks to animation frames.
animation_group
(string: name of column in data_frame) Values from this column are used to provide object-constancy across animation frames: rows with matching animation_groups will be treated as if they describe the same object in each frame.
category_orders
(dict with string keys and list-of-string 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 first encountered in data_frame (and no order is guaranteed by default in Python below 3.6). This parameter is used to force a specific ordering of values per column. The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.
labels
(dict with string keys and string values, default {}) By default, column names are used in the figure for axis titles, legend entries and hovers. This parameter allows this to be overridden. The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.
color_continuous_scale
(list of valid CSS-color strings) This list is used to build a continuous color scale when the column denoted by color contains numeric data. Various useful color scales are available in the plotly_express.colors submodules, specifically plotly_express.colors.sequential, plotly_express.colors.diverging and plotly_express.colors.cyclical.
color_continuous_midpoint
(number, defaults to None) If set, computes the bounds of the continuous color scale to have the desired midpoint. Setting this value is recommended when using plotly_express.colors.diverging color scales as the inputs to color_continuous_scale.
size_max
(integer, default 20) Set the maximum mark size when using size.
projection
(string, one of 'equirectangular', 'mercator', 'orthographic', 'natural earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4', 'azimuthal equal area', 'azimuthal equidistant', 'conic equal area', 'conic conformal', 'conic equidistant', 'gnomonic', 'stereographic', 'mollweide', 'hammer', 'transverse mercator', 'albers usa', 'winkel tripel', 'aitoff', 'sinusoidal')Default depends on scope.
scope
(string, one of 'world', 'usa', 'europe', 'asia', 'africa', 'north america', 'south america')Default is 'world' unless projection is set to 'albers usa', which forces 'usa'.
center
(dict with lat and lon keys) Sets the center point of the map.
title
(string) The figure title.
template
(string or Plotly.py template object) The figure template name or definition.
width
(integer, default None) The figure width in pixels.
height
(integer, default 600) The figure height in pixels.

Returns

A ExpressFigure object.

def set_mapbox_access_token(token)

Arguments

token
A Mapbox token to be used in scatter_mapbox() and line_mapbox() figures. See https://docs.mapbox.com/help/how-mapbox-works/access-tokens/ for more details
def get_trendline_results(fig)

Extracts fit statistics for trendlines (when applied to figures generated with the trendline argument set to "ols").

Arguments

fig
the output of a plotly_express charting call

Returns

A pandas.DataFrame with a column "px_fit_results" containing the statsmodels results objects, along with columns identifying the subset of the data the trendline was fit on.

Classes

class ExpressFigure (ancestors: plotly.graph_objs._figure.Figure, plotly.basedatatypes.BaseFigure)

Base class for all figure types (both widget and non-widget)

Class variables

var offline_initialized

Boolean that starts out False and is set to True the first time the _ipython_display_() method is called (by a Jupyter environment), to indicate that subsequent calls to that method that plotly.offline.init_notebook_mode() has been called once and should not be called again.

Methods

def __init__(self, *args, **kwargs)

Create a new Figure instance

Parameters

plotly_express.data
The 'data' property is a tuple of trace instances that may be specified as: - A list or tuple of trace instances (e.g. [Scatter(…), Bar(…)]) - A list or tuple of dicts of string/value properties where: - The 'type' property specifies the trace type One of: ['area', 'bar', 'barpolar', 'box', 'candlestick', 'carpet', 'choropleth', 'cone', 'contour', 'contourcarpet', 'heatmap', 'heatmapgl', 'histogram', 'histogram2d', 'histogram2dcontour', 'isosurface', 'mesh3d', 'ohlc', 'parcats', 'parcoords', 'pie', 'pointcloud', 'sankey', 'scatter', 'scatter3d', 'scattercarpet', 'scattergeo', 'scattergl', 'scattermapbox', 'scatterpolar', 'scatterpolargl', 'scatterternary', 'splom', 'streamtube', 'sunburst', 'surface', 'table', 'violin', 'volume', 'waterfall']
- All remaining properties are passed to the constructor of
  the specified trace type

(e.g. [{'type': 'scatter', ...}, {'type': 'bar, ...}])
layout
The 'layout' property is an instance of Layout that may be specified as: - An instance of plotly.graph_objs.Layout - A dict of string/value properties that will be passed to the Layout constructor
Supported dict properties:

    angularaxis
        plotly.graph_objs.layout.AngularAxis instance
        or dict with compatible properties
    annotations
        plotly.graph_objs.layout.Annotation instance or
        dict with compatible properties
    annotationdefaults
        When used in a template (as
        layout.template.layout.annotationdefaults),
        sets the default property values to use for
        elements of layout.annotations
    autosize
        Determines whether or not a layout width or
        height that has been left undefined by the user
        is initialized on each relayout. Note that,
        regardless of this attribute, an undefined
        layout width or height is always initialized on
        the first call to plot.
    bargap
        Sets the gap (in plot fraction) between bars of
        adjacent location coordinates.
    bargroupgap
        Sets the gap (in plot fraction) between bars of
        the same location coordinate.
    barmode
        Determines how bars at the same location
        coordinate are displayed on the graph. With
        "stack", the bars are stacked on top of one
        another With "relative", the bars are stacked
        on top of one another, with negative values
        below the axis, positive values above With
        "group", the bars are plotted next to one
        another centered around the shared location.
        With "overlay", the bars are plotted over one
        another, you might need to an "opacity" to see
        multiple bars.
    barnorm
        Sets the normalization for bar traces on the
        graph. With "fraction", the value of each bar
        is divided by the sum of all values at that
        location coordinate. "percent" is the same but
        multiplied by 100 to show percentages.
    boxgap
        Sets the gap (in plot fraction) between boxes
        of adjacent location coordinates. Has no effect
        on traces that have "width" set.
    boxgroupgap
        Sets the gap (in plot fraction) between boxes
        of the same location coordinate. Has no effect
        on traces that have "width" set.
    boxmode
        Determines how boxes at the same location
        coordinate are displayed on the graph. If
        "group", the boxes are plotted next to one
        another centered around the shared location. If
        "overlay", the boxes are plotted over one
        another, you might need to set "opacity" to see
        them multiple boxes. Has no effect on traces
        that have "width" set.
    calendar
        Sets the default calendar system to use for
        interpreting and displaying dates throughout
        the plot.
    clickmode
        Determines the mode of single click
        interactions. "event" is the default value and
        emits the `plotly_click` event. In addition
        this mode emits the `plotly_selected` event in
        drag modes "lasso" and "select", but with no
        event data attached (kept for compatibility
        reasons). The "select" flag enables selecting
        single data points via click. This mode also
        supports persistent selections, meaning that
        pressing Shift while clicking, adds to /
        subtracts from an existing selection. "select"
        with `hovermode`: "x" can be confusing,
        consider explicitly setting `hovermode`:
        "closest" when using this feature. Selection
        events are sent accordingly as long as "event"
        flag is set as well. When the "event" flag is
        missing, `plotly_click` and `plotly_selected`
        events are not fired.
    colorscale
        plotly.graph_objs.layout.Colorscale instance or
        dict with compatible properties
    colorway
        Sets the default trace colors.
    datarevision
        If provided, a changed value tells
        `Plotly.react` that one or more data arrays has
        changed. This way you can modify arrays in-
        place rather than making a complete new copy
        for an incremental change. If NOT provided,
        `Plotly.react` assumes that data arrays are
        being treated as immutable, thus any data array
        with a different identity from its predecessor
        contains new data.
    direction
        Legacy polar charts are deprecated! Please
        switch to "polar" subplots. Sets the direction
        corresponding to positive angles in legacy
        polar charts.
    dragmode
        Determines the mode of drag interactions.
        "select" and "lasso" apply only to scatter
        traces with markers or text. "orbit" and
        "turntable" apply only to 3D scenes.
    editrevision
        Controls persistence of user-driven changes in
        `editable: true` configuration, other than
        trace names and axis titles. Defaults to
        `layout.uirevision`.
    extendpiecolors
        If `true`, the pie slice colors (whether given
        by `piecolorway` or inherited from `colorway`)
        will be extended to three times its original
        length by first repeating every color 20%
        lighter then each color 20% darker. This is
        intended to reduce the likelihood of reusing
        the same color when you have many slices, but
        you can set `false` to disable. Colors provided
        in the trace, using `marker.colors`, are never
        extended.
    extendsunburstcolors
        If `true`, the sunburst slice colors (whether
        given by `sunburstcolorway` or inherited from
        `colorway`) will be extended to three times its
        original length by first repeating every color
        20% lighter then each color 20% darker. This is
        intended to reduce the likelihood of reusing
        the same color when you have many slices, but
        you can set `false` to disable. Colors provided
        in the trace, using `marker.colors`, are never
        extended.
    font
        Sets the global font. Note that fonts used in
        traces and other layout components inherit from
        the global font.
    geo
        plotly.graph_objs.layout.Geo instance or dict
        with compatible properties
    grid
        plotly.graph_objs.layout.Grid instance or dict
        with compatible properties
    height
        Sets the plot's height (in px).
    hiddenlabels

    hiddenlabelssrc
        Sets the source reference on plot.ly for
        hiddenlabels .
    hidesources
        Determines whether or not a text link citing
        the data source is placed at the bottom-right
        cored of the figure. Has only an effect only on
        graphs that have been generated via forked
        graphs from the plotly service (at
        <https://plot.ly> or on-premise).
    hoverdistance
        Sets the default distance (in pixels) to look
        for data to add hover labels (-1 means no
        cutoff, 0 means no looking for data). This is
        only a real distance for hovering on point-like
        objects, like scatter points. For area-like
        objects (bars, scatter fills, etc) hovering is
        on inside the area and off outside, but these
        objects will not supersede hover on point-like
        objects in case of conflict.
    hoverlabel
        plotly.graph_objs.layout.Hoverlabel instance or
        dict with compatible properties
    hovermode
        Determines the mode of hover interactions. If
        `clickmode` includes the "select" flag,
        `hovermode` defaults to "closest". If
        `clickmode` lacks the "select" flag, it
        defaults to "x" or "y" (depending on the
        trace's `orientation` value) for plots based on
        cartesian coordinates. For anything else the
        default value is "closest".
    images
        plotly.graph_objs.layout.Image instance or dict
        with compatible properties
    imagedefaults
        When used in a template (as
        layout.template.layout.imagedefaults), sets the
        default property values to use for elements of
        layout.images
    legend
        plotly.graph_objs.layout.Legend instance or
        dict with compatible properties
    mapbox
        plotly.graph_objs.layout.Mapbox instance or
        dict with compatible properties
    margin
        plotly.graph_objs.layout.Margin instance or
        dict with compatible properties
    meta
        Assigns extra meta information that can be used
        in various `text` attributes. Attributes such
        as the graph, axis and colorbar `title.text`,
        annotation `text` `trace.name` in legend items,
        `rangeselector`, `updatemenues` and `sliders`
        `label` text all support `meta`. One can access
        `meta` fields using template strings:
        `%{meta[i]}` where `i` is the index of the
        `meta` item in question.
    metasrc
        Sets the source reference on plot.ly for  meta
        .
    modebar
        plotly.graph_objs.layout.Modebar instance or
        dict with compatible properties
    orientation
        Legacy polar charts are deprecated! Please
        switch to "polar" subplots. Rotates the entire
        polar by the given angle in legacy polar
        charts.
    paper_bgcolor
        Sets the color of paper where the graph is
        drawn.
    piecolorway
        Sets the default pie slice colors. Defaults to
        the main `colorway` used for trace colors. If
        you specify a new list here it can still be
        extended with lighter and darker colors, see
        `extendpiecolors`.
    plot_bgcolor
        Sets the color of plotting area in-between x
        and y axes.
    polar
        plotly.graph_objs.layout.Polar instance or dict
        with compatible properties
    radialaxis
        plotly.graph_objs.layout.RadialAxis instance or
        dict with compatible properties
    scene
        plotly.graph_objs.layout.Scene instance or dict
        with compatible properties
    selectdirection
        When "dragmode" is set to "select", this limits
        the selection of the drag to horizontal,
        vertical or diagonal. "h" only allows
        horizontal selection, "v" only vertical, "d"
        only diagonal and "any" sets no limit.
    selectionrevision
        Controls persistence of user-driven changes in
        selected points from all traces.
    separators
        Sets the decimal and thousand separators. For
        example, *. * puts a '.' before decimals and a
        space between thousands. In English locales,
        dflt is ".," but other locales may alter this
        default.
    shapes
        plotly.graph_objs.layout.Shape instance or dict
        with compatible properties
    shapedefaults
        When used in a template (as
        layout.template.layout.shapedefaults), sets the
        default property values to use for elements of
        layout.shapes
    showlegend
        Determines whether or not a legend is drawn.
        Default is `true` if there is a trace to show
        and any of these: a) Two or more traces would
        by default be shown in the legend. b) One pie
        trace is shown in the legend. c) One trace is
        explicitly given with `showlegend: true`.
    sliders
        plotly.graph_objs.layout.Slider instance or
        dict with compatible properties
    sliderdefaults
        When used in a template (as
        layout.template.layout.sliderdefaults), sets
        the default property values to use for elements
        of layout.sliders
    spikedistance
        Sets the default distance (in pixels) to look
        for data to draw spikelines to (-1 means no
        cutoff, 0 means no looking for data). As with
        hoverdistance, distance does not apply to area-
        like objects. In addition, some objects can be
        hovered on but will not generate spikelines,
        such as scatter fills.
    sunburstcolorway
        Sets the default sunburst slice colors.
        Defaults to the main `colorway` used for trace
        colors. If you specify a new list here it can
        still be extended with lighter and darker
        colors, see `extendsunburstcolors`.
    template
        Default attributes to be applied to the plot.
        This should be a dict with format: `{'layout':
        layoutTemplate, 'data': {trace_type:
        [traceTemplate, ...], ...}}` where
        `layoutTemplate` is a dict matching the
        structure of `figure.layout` and
        `traceTemplate` is a dict matching the
        structure of the trace with type `trace_type`
        (e.g. 'scatter'). Alternatively, this may be
        specified as an instance of
        plotly.graph_objs.layout.Template.  Trace
        templates are applied cyclically to traces of
        each type. Container arrays (eg `annotations`)
        have special handling: An object ending in
        `defaults` (eg `annotationdefaults`) is applied
        to each array item. But if an item has a
        `templateitemname` key we look in the template
        array for an item with matching `name` and
        apply that instead. If no matching `name` is
        found we mark the item invisible. Any named
        template item not referenced is appended to the
        end of the array, so this can be used to add a
        watermark annotation or a logo image, for
        example. To omit one of these items on the
        plot, make an item with matching
        `templateitemname` and `visible: false`.
    ternary
        plotly.graph_objs.layout.Ternary instance or
        dict with compatible properties
    title
        plotly.graph_objs.layout.Title instance or dict
        with compatible properties
    titlefont
        Deprecated: Please use layout.title.font
        instead. Sets the title font. Note that the
        title's font used to be customized by the now
        deprecated `titlefont` attribute.
    transition
        Sets transition options used during
        Plotly.react updates.
    uirevision
        Used to allow user interactions with the plot
        to persist after `Plotly.react` calls that are
        unaware of these interactions. If `uirevision`
        is omitted, or if it is given and it changed
        from the previous `Plotly.react` call, the
        exact new figure is used. If `uirevision` is
        truthy and did NOT change, any attribute that
        has been affected by user interactions and did
        not receive a different value in the new figure
        will keep the interaction value.
        `layout.uirevision` attribute serves as the
        default for `uirevision` attributes in various
        sub-containers. For finer control you can set
        these sub-attributes directly. For example, if
        your app separately controls the data on the x
        and y axes you might set
        `xaxis.uirevision=*time*` and
        `yaxis.uirevision=*cost*`. Then if only the y
        data is changed, you can update
        `yaxis.uirevision=*quantity*` and the y axis
        range will reset but the x axis range will
        retain any user-driven zoom.
    updatemenus
        plotly.graph_objs.layout.Updatemenu instance or
        dict with compatible properties
    updatemenudefaults
        When used in a template (as
        layout.template.layout.updatemenudefaults),
        sets the default property values to use for
        elements of layout.updatemenus
    violingap
        Sets the gap (in plot fraction) between violins
        of adjacent location coordinates. Has no effect
        on traces that have "width" set.
    violingroupgap
        Sets the gap (in plot fraction) between violins
        of the same location coordinate. Has no effect
        on traces that have "width" set.
    violinmode
        Determines how violins at the same location
        coordinate are displayed on the graph. If
        "group", the violins are plotted next to one
        another centered around the shared location. If
        "overlay", the violins are plotted over one
        another, you might need to set "opacity" to see
        them multiple violins. Has no effect on traces
        that have "width" set.
    waterfallgap
        Sets the gap (in plot fraction) between bars of
        adjacent location coordinates.
    waterfallgroupgap
        Sets the gap (in plot fraction) between bars of
        the same location coordinate.
    waterfallmode
        Determines how bars at the same location
        coordinate are displayed on the graph. With
        "group", the bars are plotted next to one
        another centered around the shared location.
        With "overlay", the bars are plotted over one
        another, you might need to an "opacity" to see
        multiple bars.
    width
        Sets the plot's width (in px).
    xaxis
        plotly.graph_objs.layout.XAxis instance or dict
        with compatible properties
    yaxis
        plotly.graph_objs.layout.YAxis instance or dict
        with compatible properties
frames
The 'frames' property is a tuple of instances of Frame that may be specified as: - A list or tuple of instances of plotly.graph_objs.Frame - A list or tuple of dicts of string/value properties that will be passed to the Frame constructor
Supported dict properties:

    baseframe
        The name of the frame into which this frame's
        properties are merged before applying. This is
        used to unify properties and avoid needing to
        specify the same values for the same properties
        in multiple frames.
    data
        A list of traces this frame modifies. The
        format is identical to the normal trace
        definition.
    group
        An identifier that specifies the group to which
        the frame belongs, used by animate to select a
        subset of frames.
    layout
        Layout properties which this frame modifies.
        The format is identical to the normal layout
        definition.
    name
        A label by which to identify the frame
    traces
        A list of trace indices that identify the
        respective traces in the data attribute
skip_invalid : bool
If True, invalid properties in the figure specification will be skipped silently. If False (default) invalid properties in the figure specification will result in a ValueError

Raises

ValueError
if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False