plotly.express.timeline — 5.24.0 documentation (2024)

  • data_frame (DataFrame or array-like or dict) – This argument needs to be passed for column names (and not keywordnames) to be used. Array-like and dict are transformed internally to apandas DataFrame. Optional: if missing, a DataFrame gets constructedunder the hood using the other arguments.

  • x_start (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. (required) Values from this column or array_like areused to position marks along the x axis in cartesian coordinates.

  • x_end (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. (required) Values from this column or array_like areused to position marks along the x axis in cartesian coordinates.

  • y (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toposition marks along the y axis in cartesian coordinates.

  • color (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toassign color to marks.

  • pattern_shape (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toassign pattern shapes to marks.

  • facet_row (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to facetted subplots in the vertical direction.

  • facet_col (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to facetted subplots in the horizontal direction.

  • facet_col_wrap (int) – Maximum number of facet columns. Wraps the column variable at thiswidth, so that the column facets span multiple rows. Ignored if 0, andforced to 0 if facet_row or a marginal is set.

  • facet_row_spacing (float between 0 and 1) – Spacing between facet rows, in paper units. Default is 0.03 or 0.07when facet_col_wrap is used.

  • facet_col_spacing (float between 0 and 1) – Spacing between facet columns, in paper units Default is 0.02.

  • hover_name (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like appear in boldin the hover tooltip.

  • hover_data (str, or list of str or int, or Series or array-like, or dict) – Either a name or list of names of columns in data_frame, or pandasSeries, or array_like objects or a dict with column names as keys, withvalues True (for default formatting) False (in order to remove thiscolumn from hover information), or a formatting string, for example‘:.3f’ or ‘|%a’ or list-like data to appear in the hover tooltip ortuples with a bool or formatting string as first element, and list-likedata to appear in hover as second element Values from these columnsappear as extra data in the hover tooltip.

  • custom_data (str, or list of str or int, or Series or array-like) – Either name or list of names of columns in data_frame, or pandasSeries, or array_like objects Values from these columns are extra data,to be used in widgets or Dash callbacks for example. This data is notuser-visible but is included in events emitted by the figure (lassoselection etc.)

  • text (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like appear in thefigure as text labels.

  • animation_frame (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toassign marks to animation frames.

  • animation_group (str or int or Series or array-like) – Either a name of a column in data_frame, or a pandas Series orarray_like object. Values from this column or array_like are used toprovide object-constancy across animation frames: rows with matching`animation_group`s will be treated as if they describe the same objectin each frame.

  • category_orders (dict with str keys and list of str values (default {})) – By default, in Python 3.6+, the order of categorical values in axes,legends and facets depends on the order in which these values are firstencountered in data_frame (and no order is guaranteed by default inPython below 3.6). This parameter is used to force a specific orderingof values per column. The keys of this dict should correspond to columnnames, and the values should be lists of strings corresponding to thespecific display order desired.

  • labels (dict with str keys and str values (default {})) – By default, column names are used in the figure for axis titles, legendentries and hovers. This parameter allows this to be overridden. Thekeys of this dict should correspond to column names, and the valuesshould correspond to the desired label to be displayed.

  • color_discrete_sequence (list of str) – Strings should define valid CSS-colors. When color is set and thevalues in the corresponding column are not numeric, values in thatcolumn are assigned colors by cycling through color_discrete_sequencein the order described in category_orders, unless the value ofcolor is a key in color_discrete_map. Various useful colorsequences are available in the plotly.express.colors submodules,specifically plotly.express.colors.qualitative.

  • color_discrete_map (dict with str keys and str values (default {})) – String values should define valid CSS-colors Used to overridecolor_discrete_sequence to assign a specific colors to markscorresponding with specific values. Keys in color_discrete_map shouldbe values in the column denoted by color. Alternatively, if thevalues of color are valid colors, the string 'identity' may bepassed to cause them to be used directly.

  • pattern_shape_sequence (list of str) – Strings should define valid plotly.js patterns-shapes. Whenpattern_shape is set, values in that column are assigned patterns-shapes by cycling through pattern_shape_sequence in the orderdescribed in category_orders, unless the value of pattern_shape isa key in pattern_shape_map.

  • pattern_shape_map (dict with str keys and str values (default {})) – Strings values define plotly.js patterns-shapes. Used to overridepattern_shape_sequences to assign a specific patterns-shapes to linescorresponding with specific values. Keys in pattern_shape_map shouldbe values in the column denoted by pattern_shape. Alternatively, ifthe values of pattern_shape are valid patterns-shapes names, thestring 'identity' may be passed to cause them to be used directly.

  • color_continuous_scale (list of str) – Strings should define valid CSS-colors This list is used to build acontinuous color scale when the column denoted by color containsnumeric data. Various useful color scales are available in theplotly.express.colors submodules, specificallyplotly.express.colors.sequential, plotly.express.colors.divergingand plotly.express.colors.cyclical.

  • range_color (list of two numbers) – If provided, overrides auto-scaling on the continuous color scale.

  • color_continuous_midpoint (number (default None)) – If set, computes the bounds of the continuous color scale to have thedesired midpoint. Setting this value is recommended when usingplotly.express.colors.diverging color scales as the inputs tocolor_continuous_scale.

  • opacity (float) – Value between 0 and 1. Sets the opacity for markers.

  • range_x (list of two numbers) – If provided, overrides auto-scaling on the x-axis in cartesiancoordinates.

  • range_y (list of two numbers) – If provided, overrides auto-scaling on the y-axis in cartesiancoordinates.

  • title (str) – The figure title.

  • template (str or dict or plotly.graph_objects.layout.Template instance) – The figure template name (must be a key in plotly.io.templates) ordefinition.

  • width (int (default None)) – The figure width in pixels.

  • height (int (default None)) – The figure height in pixels.

plotly.express.timeline —  5.24.0 documentation (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Chrissy Homenick

Last Updated:

Views: 5733

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.