plotly.graph_objects package¶
-
class
plotly.graph_objects.AngularAxis(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.AngularAxis is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.AngularAxis
plotly.graph_objects.layout.polar.AngularAxis
-
class
plotly.graph_objects.Annotation(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Annotation is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.Annotation
plotly.graph_objects.layout.scene.Annotation
-
class
plotly.graph_objects.Annotations(*args, **kwargs)¶ Bases:
listplotly.graph_objects.Annotations is deprecated.
- Please replace it with a list or tuple of instances of the following types
plotly.graph_objects.layout.Annotation
plotly.graph_objects.layout.scene.Annotation
-
class
plotly.graph_objects.Bar(arg=None, alignmentgroup=None, base=None, basesrc=None, cliponaxis=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
base¶ Sets where the bar base is drawn (in position axis units). In “stack” or “relative” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
The ‘base’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
basesrc¶ Sets the source reference on Chart Studio Cloud for
base.The ‘basesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
cliponaxis¶ Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
constraintext¶ Constrain the size of text inside or outside a bar to be no larger than the bar itself.
- The ‘constraintext’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘both’, ‘none’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
error_x¶ The ‘error_x’ property is an instance of ErrorX that may be specified as:
An instance of
plotly.graph_objects.bar.ErrorXA dict of string/value properties that will be passed to the ErrorX constructor
- Returns
- Return type
-
property
error_y¶ The ‘error_y’ property is an instance of ErrorY that may be specified as:
An instance of
plotly.graph_objects.bar.ErrorYA dict of string/value properties that will be passed to the ErrorY constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.bar.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextanchor¶ Determines if texts are kept at center or start/end points in
textposition“inside” mode.- The ‘insidetextanchor’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘end’, ‘middle’, ‘start’]
- Returns
- Return type
Any
-
property
insidetextfont¶ Sets the font used for
textlying inside the bar.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.bar.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.bar.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.bar.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offset¶ Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
- The ‘offset’ property is a number and may be specified as:
An int or float
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offsetsrc¶ Sets the source reference on Chart Studio Cloud for
offset.The ‘offsetsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
outsidetextfont¶ Sets the font used for
textlying outside the bar.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.bar.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.bar.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.bar.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textangle¶ Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.The ‘textangle’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
textfont¶ Sets the font used for
text.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.bar.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘auto’, ‘none’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.bar.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
width¶ Sets the bar width (in position axis units).
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
widthsrc¶ Sets the source reference on Chart Studio Cloud for
width.The ‘widthsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Barpolar(arg=None, base=None, basesrc=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetsrc=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textsrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
base¶ Sets where the bar base is drawn (in radial axis units). In “stack” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
The ‘base’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
basesrc¶ Sets the source reference on Chart Studio Cloud for
base.The ‘basesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dr¶ Sets the r coordinate step.
- The ‘dr’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dtheta¶ Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.- The ‘dtheta’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘r’, ‘theta’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘r+theta’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.barpolar.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.barpolar.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.barpolar.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offset¶ Shifts the angular position where the bar is drawn (in “thetatunit” units).
- The ‘offset’ property is a number and may be specified as:
An int or float
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
offsetsrc¶ Sets the source reference on Chart Studio Cloud for
offset.The ‘offsetsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
r¶ Sets the radial coordinates
The ‘r’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
r0¶ Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.The ‘r0’ property accepts values of any type
- Returns
- Return type
Any
-
property
rsrc¶ Sets the source reference on Chart Studio Cloud for
r.The ‘rsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.barpolar.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.barpolar.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘polar’, that may be specified as the string ‘polar’ optionally followed by an integer >= 1 (e.g. ‘polar’, ‘polar1’, ‘polar2’, ‘polar3’, etc.)
- Returns
- Return type
-
property
text¶ Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
theta¶ Sets the angular coordinates
The ‘theta’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
theta0¶ Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.The ‘theta0’ property accepts values of any type
- Returns
- Return type
Any
-
property
thetasrc¶ Sets the source reference on Chart Studio Cloud for
theta.The ‘thetasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
thetaunit¶ Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
- The ‘thetaunit’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘radians’, ‘degrees’, ‘gradians’]
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.barpolar.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
width¶ Sets the bar angular width (in “thetaunit” units).
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
-
class
plotly.graph_objects.Box(arg=None, alignmentgroup=None, boxmean=None, boxpoints=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lowerfence=None, lowerfencesrc=None, marker=None, mean=None, meansrc=None, median=None, mediansrc=None, meta=None, metasrc=None, name=None, notched=None, notchspan=None, notchspansrc=None, notchwidth=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, q1=None, q1src=None, q3=None, q3src=None, quartilemethod=None, sd=None, sdmultiple=None, sdsrc=None, selected=None, selectedpoints=None, showlegend=None, showwhiskers=None, sizemode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, upperfence=None, upperfencesrc=None, visible=None, whiskerwidth=None, width=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
boxmean¶ If True, the mean of the box(es)’ underlying distribution is drawn as a dashed line inside the box(es). If “sd” the standard deviation is also drawn. Defaults to True when
meanis set. Defaults to “sd” whensdis set Otherwise defaults to False.- The ‘boxmean’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, ‘sd’, False]
- Returns
- Return type
Any
-
property
boxpoints¶ If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the box(es) are shown with no sample points Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set. Defaults to “all” under the q1/median/q3 signature. Otherwise defaults to “outliers”.- The ‘boxpoints’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘all’, ‘outliers’, ‘suspectedoutliers’, False]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step for multi-box traces set using q1/median/q3.
- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step for multi-box traces set using q1/median/q3.
- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.box.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual boxes or sample points or both?
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘boxes’, ‘points’] joined with ‘+’ characters (e.g. ‘boxes+points’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
jitter¶ Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the box(es).
- The ‘jitter’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.box.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.box.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
lowerfence¶ Sets the lower fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
lowerfenceis not provided but a sample (inyorx) is set, we compute the lower as the last sample point below 1.5 times the IQR.The ‘lowerfence’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lowerfencesrc¶ Sets the source reference on Chart Studio Cloud for
lowerfence.The ‘lowerfencesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.box.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
mean¶ Sets the mean values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
meanis not provided but a sample (inyorx) is set, we compute the mean for each box using the sample values.The ‘mean’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
meansrc¶ Sets the source reference on Chart Studio Cloud for
mean.The ‘meansrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
median¶ Sets the median values. There should be as many items as the number of boxes desired.
The ‘median’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
mediansrc¶ Sets the source reference on Chart Studio Cloud for
median.The ‘mediansrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categorical- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
notched¶ Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes’ notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home/notched- box-plots for more info. Defaults to False unless
notchwidthornotchspanis set.The ‘notched’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
notchspan¶ Sets the notch span from the boxes’
medianvalues. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. Ifnotchspanis not provided but a sample (inyorx) is set, we compute it as 1.57 * IQR / sqrt(N), where N is the sample size.The ‘notchspan’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
notchspansrc¶ Sets the source reference on Chart Studio Cloud for
notchspan.The ‘notchspansrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
notchwidth¶ Sets the width of the notches relative to the box width. For example, with 0, the notches are as wide as the box(es).
- The ‘notchwidth’ property is a number and may be specified as:
An int or float in the interval [0, 0.5]
- Returns
- Return type
int|float
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the box(es). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
pointpos¶ Sets the position of the sample points in relation to the box(es). If 0, the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes
- The ‘pointpos’ property is a number and may be specified as:
An int or float in the interval [-2, 2]
- Returns
- Return type
int|float
-
property
q1¶ Sets the Quartile 1 values. There should be as many items as the number of boxes desired.
The ‘q1’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
q1src¶ Sets the source reference on Chart Studio Cloud for
q1.The ‘q1src’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
q3¶ Sets the Quartile 3 values. There should be as many items as the number of boxes desired.
The ‘q3’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
q3src¶ Sets the source reference on Chart Studio Cloud for
q3.The ‘q3src’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
quartilemethod¶ Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
- The ‘quartilemethod’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘linear’, ‘exclusive’, ‘inclusive’]
- Returns
- Return type
Any
-
property
sd¶ Sets the standard deviation values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
sdis not provided but a sample (inyorx) is set, we compute the standard deviation for each box using the sample values.The ‘sd’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
sdmultiple¶ Scales the box size when sizemode=sd Allowing boxes to be drawn across any stddev range For example 1-stddev, 3-stddev, 5-stddev
- The ‘sdmultiple’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
sdsrc¶ Sets the source reference on Chart Studio Cloud for
sd.The ‘sdsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.box.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showwhiskers¶ Determines whether or not whiskers are visible. Defaults to true for
sizemode“quartiles”, false for “sd”.The ‘showwhiskers’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
sizemode¶ Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc
- The ‘sizemode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘quartiles’, ‘sd’]
- Returns
- Return type
Any
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.box.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.box.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
upperfence¶ Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
upperfenceis not provided but a sample (inyorx) is set, we compute the upper as the last sample point above 1.5 times the IQR.The ‘upperfence’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
upperfencesrc¶ Sets the source reference on Chart Studio Cloud for
upperfence.The ‘upperfencesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
whiskerwidth¶ Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
- The ‘whiskerwidth’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
width¶ Sets the width of the box in data coordinate If 0 (default value) the width is automatically selected based on the positions of other box traces in the same subplot.
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
x¶ Sets the x sample data or coordinates. See overview for more info.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y sample data or coordinates. See overview for more info.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Candlestick(arg=None, close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, whiskerwidth=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
close¶ Sets the close values.
The ‘close’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
closesrc¶ Sets the source reference on Chart Studio Cloud for
close.The ‘closesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
decreasing¶ The ‘decreasing’ property is an instance of Decreasing that may be specified as:
An instance of
plotly.graph_objects.candlestick.DecreasingA dict of string/value properties that will be passed to the Decreasing constructor
- Returns
- Return type
-
property
high¶ Sets the high values.
The ‘high’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
highsrc¶ Sets the source reference on Chart Studio Cloud for
high.The ‘highsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.candlestick.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
increasing¶ The ‘increasing’ property is an instance of Increasing that may be specified as:
An instance of
plotly.graph_objects.candlestick.IncreasingA dict of string/value properties that will be passed to the Increasing constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.candlestick.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.candlestick.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
low¶ Sets the low values.
The ‘low’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lowsrc¶ Sets the source reference on Chart Studio Cloud for
low.The ‘lowsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
open¶ Sets the open values.
The ‘open’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
opensrc¶ Sets the source reference on Chart Studio Cloud for
open.The ‘opensrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.candlestick.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
whiskerwidth¶ Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
- The ‘whiskerwidth’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
x¶ Sets the x coordinates. If absent, linear coordinate will be generated.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Carpet(arg=None, a=None, a0=None, aaxis=None, asrc=None, b=None, b0=None, baxis=None, bsrc=None, carpet=None, cheaterslope=None, color=None, customdata=None, customdatasrc=None, da=None, db=None, font=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, stream=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xsrc=None, y=None, yaxis=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
a¶ An array containing values of the first parameter value
The ‘a’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
a0¶ Alternate to
a. Builds a linear space of a coordinates. Use withdawherea0is the starting coordinate anddathe step.- The ‘a0’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
aaxis¶ The ‘aaxis’ property is an instance of Aaxis that may be specified as:
An instance of
plotly.graph_objects.carpet.AaxisA dict of string/value properties that will be passed to the Aaxis constructor
- Returns
- Return type
-
property
asrc¶ Sets the source reference on Chart Studio Cloud for
a.The ‘asrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
b¶ A two dimensional array of y coordinates at each carpet point.
The ‘b’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
b0¶ Alternate to
b. Builds a linear space of a coordinates. Use withdbwhereb0is the starting coordinate anddbthe step.- The ‘b0’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
baxis¶ The ‘baxis’ property is an instance of Baxis that may be specified as:
An instance of
plotly.graph_objects.carpet.BaxisA dict of string/value properties that will be passed to the Baxis constructor
- Returns
- Return type
-
property
bsrc¶ Sets the source reference on Chart Studio Cloud for
b.The ‘bsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
carpet¶ An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they lie- The ‘carpet’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cheaterslope¶ The shift applied to each successive row of data in creating a cheater plot. Only used if
xis been omitted.- The ‘cheaterslope’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
color¶ Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.
- The ‘color’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
da¶ Sets the a coordinate step. See
a0for more info.- The ‘da’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
db¶ Sets the b coordinate step. See
b0for more info.- The ‘db’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
font¶ The default font used for axis & tick labels on this carpet
The ‘font’ property is an instance of Font that may be specified as:
An instance of
plotly.graph_objects.carpet.FontA dict of string/value properties that will be passed to the Font constructor
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.carpet.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.carpet.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ A two dimensional array of x coordinates at each carpet point. If omitted, the plot is a cheater plot and the xaxis is hidden by default.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ A two dimensional array of y coordinates at each carpet point.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Choropleth(arg=None, autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locationmode=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.choropleth.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
featureidkey¶ Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.- The ‘featureidkey’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
geo¶ Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.The ‘geo’ property is an identifier of a particular subplot, of type ‘geo’, that may be specified as the string ‘geo’ optionally followed by an integer >= 1 (e.g. ‘geo’, ‘geo1’, ‘geo2’, ‘geo3’, etc.)
- Returns
- Return type
-
property
geojson¶ Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
The ‘geojson’ property accepts values of any type
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘location’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘location+z’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.choropleth.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.choropleth.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
locationmode¶ The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.- The ‘locationmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘ISO-3’, ‘USA-states’, ‘country names’, ‘geojson-id’]
- Returns
- Return type
Any
-
property
locations¶ Sets the coordinates via location IDs or names. See
locationmodefor more info.The ‘locations’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
locationssrc¶ Sets the source reference on Chart Studio Cloud for
locations.The ‘locationssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.choropleth.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.choropleth.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.choropleth.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each location.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.choropleth.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
z¶ Sets the color values.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.Choroplethmap(arg=None, autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
below¶ Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmap traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
featureidkey¶ Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.- The ‘featureidkey’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
geojson¶ Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
The ‘geojson’ property accepts values of any type
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘location’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘location+z’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
locations¶ Sets which features found in “geojson” to plot using their feature
idfield.The ‘locations’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
locationssrc¶ Sets the source reference on Chart Studio Cloud for
locations.The ‘locationssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘map’, that may be specified as the string ‘map’ optionally followed by an integer >= 1 (e.g. ‘map’, ‘map1’, ‘map2’, ‘map3’, etc.)
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each location.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.choroplethmap.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
z¶ Sets the color values.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.Choroplethmapbox(arg=None, autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
below¶ Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmapbox traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
featureidkey¶ Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.- The ‘featureidkey’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
geojson¶ Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
The ‘geojson’ property accepts values of any type
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘location’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘location+z’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
locations¶ Sets which features found in “geojson” to plot using their feature
idfield.The ‘locations’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
locationssrc¶ Sets the source reference on Chart Studio Cloud for
locations.The ‘locationssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘mapbox’, that may be specified as the string ‘mapbox’ optionally followed by an integer >= 1 (e.g. ‘mapbox’, ‘mapbox1’, ‘mapbox2’, ‘mapbox3’, etc.)
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each location.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.choroplethmapbox.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
z¶ Sets the color values.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.ColorBar(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.ColorBar is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.marker.ColorBar
plotly.graph_objects.surface.ColorBar
etc.
-
class
plotly.graph_objects.Cone(arg=None, anchor=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizemode=None, sizeref=None, stream=None, text=None, textsrc=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
anchor¶ Sets the cones’ anchor with respect to their x/y/z positions. Note that “cm” denote the cone’s center of mass which corresponds to 1/4 from the tail to tip.
- The ‘anchor’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘tip’, ‘tail’, ‘cm’, ‘center’]
- Returns
- Return type
Any
-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.cone.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’, ‘norm’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.cone.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablenormAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.cone.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.cone.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.cone.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
sizemode¶ Determines whether
sizerefis set as a “scaled” (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as “absolute” value (in the same units as the vector field). To display sizes in actual vector length use “raw”.- The ‘sizemode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘scaled’, ‘absolute’, ‘raw’]
- Returns
- Return type
Any
-
property
sizeref¶ Adjusts the cone size scaling. The size of the cones is determined by their u/v/w norm multiplied a factor and
sizeref. This factor (computed internally) corresponds to the minimum “time” to travel across two successive x/y/z positions at the average velocity of those two successive positions. All cones in a given trace use the same factor. Withsizemodeset to “raw”, its default value is 1. Withsizemodeset to “scaled”,sizerefis unitless, its default value is 0.5. Withsizemodeset to “absolute”,sizerefhas the same units as the u/v/w vector field, its the default value is half the sample’s maximum vector norm.- The ‘sizeref’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.cone.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with the cones. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
u¶ Sets the x components of the vector field.
The ‘u’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
uhoverformat¶ Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘uhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
usrc¶ Sets the source reference on Chart Studio Cloud for
u.The ‘usrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
v¶ Sets the y components of the vector field.
The ‘v’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
vhoverformat¶ Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘vhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
vsrc¶ Sets the source reference on Chart Studio Cloud for
v.The ‘vsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
w¶ Sets the z components of the vector field.
The ‘w’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
whoverformat¶ Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘whoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
wsrc¶ Sets the source reference on Chart Studio Cloud for
w.The ‘wsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
x¶ Sets the x coordinates of the vector field and of the displayed cones.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates of the vector field and of the displayed cones.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the z coordinates of the vector field and of the displayed cones.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Contour(arg=None, autocolorscale=None, autocontour=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
autocontour¶ Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.The ‘autocontour’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.contour.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array otherwise it is defaulted to false.The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
contours¶ The ‘contours’ property is an instance of Contours that may be specified as:
An instance of
plotly.graph_objects.contour.ContoursA dict of string/value properties that will be passed to the Contours constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
fillcolor¶ Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
A number that will be interpreted as a color according to contour.colorscale
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.contour.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoverongaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.The ‘hoverongaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.The ‘hovertext’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.contour.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.contour.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ncontours¶ Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.- The ‘ncontours’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [1, 9223372036854775807]
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.contour.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each z value.
The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.contour.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
transpose¶ Transposes the z data.
The ‘transpose’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
xtype¶ If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).- The ‘xtype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ytype¶ If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)- The ‘ytype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
z¶ Sets the z data.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Contourcarpet(arg=None, a=None, a0=None, asrc=None, atype=None, autocolorscale=None, autocontour=None, b=None, b0=None, bsrc=None, btype=None, carpet=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, da=None, db=None, fillcolor=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, transpose=None, uid=None, uirevision=None, visible=None, xaxis=None, yaxis=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
a¶ Sets the x coordinates.
The ‘a’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
a0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘a0’ property accepts values of any type
- Returns
- Return type
Any
-
property
asrc¶ Sets the source reference on Chart Studio Cloud for
a.The ‘asrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
atype¶ If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).- The ‘atype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
autocontour¶ Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.The ‘autocontour’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
b¶ Sets the y coordinates.
The ‘b’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
b0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘b0’ property accepts values of any type
- Returns
- Return type
Any
-
property
bsrc¶ Sets the source reference on Chart Studio Cloud for
b.The ‘bsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
btype¶ If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)- The ‘btype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
carpet¶ The
carpetof the carpet axes on which this contour trace lies- The ‘carpet’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.contourcarpet.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
contours¶ The ‘contours’ property is an instance of Contours that may be specified as:
An instance of
plotly.graph_objects.contourcarpet.ContoursA dict of string/value properties that will be passed to the Contours constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
da¶ Sets the x coordinate step. See
x0for more info.- The ‘da’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
db¶ Sets the y coordinate step. See
y0for more info.- The ‘db’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
fillcolor¶ Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
A number that will be interpreted as a color according to contourcarpet.colorscale
- Returns
- Return type
-
property
hovertext¶ Same as
text.The ‘hovertext’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.contourcarpet.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.contourcarpet.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ncontours¶ Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.- The ‘ncontours’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [1, 9223372036854775807]
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.contourcarpet.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each z value.
The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
transpose¶ Transposes the z data.
The ‘transpose’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
z¶ Sets the z data.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Contours(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Contours is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.contour.Contours
plotly.graph_objects.surface.Contours
etc.
-
class
plotly.graph_objects.Data(*args, **kwargs)¶ Bases:
listplotly.graph_objects.Data is deprecated.
- Please replace it with a list or tuple of instances of the following types
plotly.graph_objects.Scatter
plotly.graph_objects.Bar
plotly.graph_objects.Area
plotly.graph_objects.Histogram
etc.
-
class
plotly.graph_objects.Densitymap(arg=None, autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
below¶ Determines if the densitymap trace will be inserted before the layer with the specified ID. By default, densitymap traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.densitymap.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lon’, ‘lat’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘lon+lat’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.densitymap.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lat¶ Sets the latitude coordinates (in degrees North).
The ‘lat’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
latsrc¶ Sets the source reference on Chart Studio Cloud for
lat.The ‘latsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.densitymap.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lon¶ Sets the longitude coordinates (in degrees East).
The ‘lon’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lonsrc¶ Sets the source reference on Chart Studio Cloud for
lon.The ‘lonsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
radius¶ Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymap trace smoother, but less detailed.- The ‘radius’ property is a number and may be specified as:
An int or float in the interval [1, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
radiussrc¶ Sets the source reference on Chart Studio Cloud for
radius.The ‘radiussrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.densitymap.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘map’, that may be specified as the string ‘map’ optionally followed by an integer >= 1 (e.g. ‘map’, ‘map1’, ‘map2’, ‘map3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
z¶ Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.Densitymapbox(arg=None, autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
below¶ Determines if the densitymapbox trace will be inserted before the layer with the specified ID. By default, densitymapbox traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.densitymapbox.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lon’, ‘lat’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘lon+lat’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.densitymapbox.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lat¶ Sets the latitude coordinates (in degrees North).
The ‘lat’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
latsrc¶ Sets the source reference on Chart Studio Cloud for
lat.The ‘latsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.densitymapbox.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lon¶ Sets the longitude coordinates (in degrees East).
The ‘lon’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lonsrc¶ Sets the source reference on Chart Studio Cloud for
lon.The ‘lonsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
radius¶ Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed.- The ‘radius’ property is a number and may be specified as:
An int or float in the interval [1, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
radiussrc¶ Sets the source reference on Chart Studio Cloud for
radius.The ‘radiussrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.densitymapbox.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘mapbox’, that may be specified as the string ‘mapbox’ optionally followed by an integer >= 1 (e.g. ‘mapbox’, ‘mapbox1’, ‘mapbox2’, ‘mapbox3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
z¶ Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.ErrorX(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.ErrorX is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.ErrorX
plotly.graph_objects.histogram.ErrorX
etc.
-
class
plotly.graph_objects.ErrorY(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.ErrorY is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.ErrorY
plotly.graph_objects.histogram.ErrorY
etc.
-
class
plotly.graph_objects.ErrorZ(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.ErrorZ is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter3d.ErrorZ
-
class
plotly.graph_objects.Figure(data=None, layout=None, frames=None, skip_invalid=False, **kwargs)¶ Bases:
plotly.basedatatypes.BaseFigure-
add_annotation(arg=None, align=None, arrowcolor=None, arrowhead=None, arrowside=None, arrowsize=None, arrowwidth=None, ax=None, axref=None, ay=None, ayref=None, bgcolor=None, bordercolor=None, borderpad=None, borderwidth=None, captureevents=None, clicktoshow=None, font=None, height=None, hoverlabel=None, hovertext=None, name=None, opacity=None, showarrow=None, standoff=None, startarrowhead=None, startarrowsize=None, startstandoff=None, templateitemname=None, text=None, textangle=None, valign=None, visible=None, width=None, x=None, xanchor=None, xclick=None, xref=None, xshift=None, y=None, yanchor=None, yclick=None, yref=None, yshift=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Create and add a new annotation to the figure’s layout
- Parameters
arg – instance of Annotation or dict with compatible properties
align – Sets the horizontal alignment of the
textwithin the box. Has an effect only iftextspans two or more lines (i.e.textcontains one or more <br> HTML tags) or if an explicit width is set to override the text width.arrowcolor – Sets the color of the annotation arrow.
arrowhead – Sets the end annotation arrow head style.
arrowside – Sets the annotation arrow head position.
arrowsize – Sets the size of the end annotation arrow head, relative to
arrowwidth. A value of 1 (default) gives a head about 3x as wide as the line.arrowwidth – Sets the width (in px) of annotation arrow line.
ax – Sets the x component of the arrow tail about the arrow head. If
axrefispixel, a positive (negative) component corresponds to an arrow pointing from right to left (left to right). Ifaxrefis notpixeland is exactly the same asxref, this is an absolute value on that axis, likex, specified in the same coordinates asxref.axref – Indicates in what coordinates the tail of the annotation (ax,ay) is specified. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis. In order for absolute positioning of the arrow to work, “axref” must be exactly the same as “xref”, otherwise “axref” will revert to “pixel” (explained next). For relative positioning, “axref” can be set to “pixel”, in which case the “ax” value is specified in pixels relative to “x”. Absolute positioning is useful for trendline annotations which should continue to indicate the correct trend when zoomed. Relative positioning is useful for specifying the text offset for an annotated point.ay – Sets the y component of the arrow tail about the arrow head. If
ayrefispixel, a positive (negative) component corresponds to an arrow pointing from bottom to top (top to bottom). Ifayrefis notpixeland is exactly the same asyref, this is an absolute value on that axis, likey, specified in the same coordinates asyref.ayref – Indicates in what coordinates the tail of the annotation (ax,ay) is specified. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis. In order for absolute positioning of the arrow to work, “ayref” must be exactly the same as “yref”, otherwise “ayref” will revert to “pixel” (explained next). For relative positioning, “ayref” can be set to “pixel”, in which case the “ay” value is specified in pixels relative to “y”. Absolute positioning is useful for trendline annotations which should continue to indicate the correct trend when zoomed. Relative positioning is useful for specifying the text offset for an annotated point.bgcolor – Sets the background color of the annotation.
bordercolor – Sets the color of the border enclosing the annotation
text.borderpad – Sets the padding (in px) between the
textand the enclosing border.borderwidth – Sets the width (in px) of the border enclosing the annotation
text.captureevents – Determines whether the annotation text box captures mouse move and click events, or allows those events to pass through to data points in the plot that may be behind the annotation. By default
captureeventsis False unlesshovertextis provided. If you use the eventplotly_clickannotationwithouthovertextyou must explicitly enablecaptureevents.clicktoshow – Makes this annotation respond to clicks on the plot. If you click a data point that exactly matches the
xandyvalues of this annotation, and it is hidden (visible: false), it will appear. In “onoff” mode, you must click the same point again to make it disappear, so if you click multiple points, you can show multiple annotations. In “onout” mode, a click anywhere else in the plot (on another data point or not) will hide this annotation. If you need to show/hide this annotation in response to differentxoryvalues, you can setxclickand/oryclick. This is useful for example to label the side of a bar. To label markers though,standoffis preferred overxclickandyclick.font – Sets the annotation text font.
height – Sets an explicit height for the text box. null (default) lets the text set the box height. Taller text will be clipped.
hoverlabel –
plotly.graph_objects.layout.annotation.Hoverlab elinstance or dict with compatible propertieshovertext – Sets text to appear when hovering over this annotation. If omitted or blank, no hover label will appear.
name – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the annotation (text + arrow).
showarrow – Determines whether or not the annotation is drawn with an arrow. If True,
textis placed near the arrow’s tail. If False,textlines up with thexandyprovided.standoff – Sets a distance, in pixels, to move the end arrowhead away from the position it is pointing at, for example to point at the edge of a marker independent of zoom. Note that this shortens the arrow from the
ax/ayvector, in contrast toxshift/yshiftwhich moves everything by this amount.startarrowhead – Sets the start annotation arrow head style.
startarrowsize – Sets the size of the start annotation arrow head, relative to
arrowwidth. A value of 1 (default) gives a head about 3x as wide as the line.startstandoff – Sets a distance, in pixels, to move the start arrowhead away from the position it is pointing at, for example to point at the edge of a marker independent of zoom. Note that this shortens the arrow from the
ax/ayvector, in contrast toxshift/yshiftwhich moves everything by this amount.templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.text – Sets the text associated with this annotation. Plotly uses a subset of HTML tags to do things like newline (
<br>), bold (<b></b>), italics (<i></i>), hyperlinks (<a href='...'></a>). Tags<em>,<sup>,<sub>,<s>,<u>, and<span>are also supported.textangle – Sets the angle at which the
textis drawn with respect to the horizontal.valign – Sets the vertical alignment of the
textwithin the box. Has an effect only if an explicit height is set to override the text height.visible – Determines whether or not this annotation is visible.
width – Sets an explicit width for the text box. null (default) lets the text set the box width. Wider text will be clipped. There is no automatic wrapping; use <br> to start a new line.
x – Sets the annotation’s x position. If the axis
typeis “log”, then you must take the log of your desired range. If the axistypeis “date”, it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axistypeis “category”, it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.xanchor – Sets the text box’s horizontal position anchor This anchor binds the
xposition to the “left”, “center” or “right” of the annotation. For example, ifxis set to 1,xrefto “paper” andxanchorto “right” then the right-most portion of the annotation lines up with the right-most edge of the plotting area. If “auto”, the anchor is equivalent to “center” for data- referenced annotations or if there is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side.xclick – Toggle this annotation when clicking a data point whose
xvalue isxclickrather than the annotation’sxvalue.xref – Sets the annotation’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.xshift – Shifts the position of the whole annotation and arrow to the right (positive) or left (negative) by this many pixels.
y – Sets the annotation’s y position. If the axis
typeis “log”, then you must take the log of your desired range. If the axistypeis “date”, it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axistypeis “category”, it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.yanchor – Sets the text box’s vertical position anchor This anchor binds the
yposition to the “top”, “middle” or “bottom” of the annotation. For example, ifyis set to 1,yrefto “paper” andyanchorto “top” then the top-most portion of the annotation lines up with the top-most edge of the plotting area. If “auto”, the anchor is equivalent to “middle” for data-referenced annotations or if there is an arrow, whereas for paper- referenced with no arrow, the anchor picked corresponds to the closest side.yclick – Toggle this annotation when clicking a data point whose
yvalue isyclickrather than the annotation’syvalue.yref – Sets the annotation’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.yshift – Shifts the position of the whole annotation and arrow up (positive) or down (negative) by this many pixels.
row – Subplot row for annotation. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for annotation. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add annotation to secondary y-axis
exclude_empty_subplots – If True, annotation will not be added to subplots without traces.
- Returns
- Return type
-
add_bar(alignmentgroup=None, base=None, basesrc=None, cliponaxis=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Bar trace
The data visualized by the span of the bars is set in
yiforientationis set to “v” (the default) and the labels are set inx. By settingorientationto “h”, the roles are interchanged.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
base – Sets where the bar base is drawn (in position axis units). In “stack” or “relative” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
basesrc – Sets the source reference on Chart Studio Cloud for
base.cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.constraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.bar.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.bar.ErrorYinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.bar.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.bar.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.bar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selected –
plotly.graph_objects.bar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.bar.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.bar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_barpolar(base=None, basesrc=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetsrc=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textsrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Barpolar trace
The data visualized by the radial span of the bars is set in
r- Parameters
base – Sets where the bar base is drawn (in radial axis units). In “stack” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
basesrc – Sets the source reference on Chart Studio Cloud for
base.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.barpolar.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.barpolar.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.barpolar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the angular position where the bar is drawn (in “thetatunit” units).
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.barpolar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.barpolar.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
textsrc – Sets the source reference on Chart Studio Cloud for
text.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.barpolar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar angular width (in “thetaunit” units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_box(alignmentgroup=None, boxmean=None, boxpoints=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lowerfence=None, lowerfencesrc=None, marker=None, mean=None, meansrc=None, median=None, mediansrc=None, meta=None, metasrc=None, name=None, notched=None, notchspan=None, notchspansrc=None, notchwidth=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, q1=None, q1src=None, q3=None, q3src=None, quartilemethod=None, sd=None, sdmultiple=None, sdsrc=None, selected=None, selectedpoints=None, showlegend=None, showwhiskers=None, sizemode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, upperfence=None, upperfencesrc=None, visible=None, whiskerwidth=None, width=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Box trace
Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second quartile (Q2, i.e. the median) is marked by a line inside the box. The fences grow outward from the boxes’ edges, by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1), The sample mean and standard deviation as well as notches and the sample, outlier and suspected outliers points can be optionally added to the box plot. The values and positions corresponding to each boxes can be input using two signatures. The first signature expects users to supply the sample values in the
ydata array for vertical boxes (xfor horizontal boxes). By supplying anx(y) array, one box per distinctx(y) value is drawn If nox(y) list is provided, a single box is drawn. In this case, the box is positioned with the tracenameor withx0(y0) if provided. The second signature expects users to supply the boxes corresponding Q1, median and Q3 statistics in theq1,medianandq3data arrays respectively. Other box features relying on statistics namelylowerfence,upperfence,notchspancan be set directly by the users. To have plotly compute them or to show sample points besides the boxes, users can set theydata array for vertical boxes (xfor horizontal boxes) to a 2D array with the outer length corresponding to the number of boxes in the traces and the inner length corresponding the sample size.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
boxmean – If True, the mean of the box(es)’ underlying distribution is drawn as a dashed line inside the box(es). If “sd” the standard deviation is also drawn. Defaults to True when
meanis set. Defaults to “sd” whensdis set Otherwise defaults to False.boxpoints – If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the box(es) are shown with no sample points Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set. Defaults to “all” under the q1/median/q3 signature. Otherwise defaults to “outliers”.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step for multi-box traces set using q1/median/q3.
dy – Sets the y coordinate step for multi-box traces set using q1/median/q3.
fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.box.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual boxes or sample points or both?
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.jitter – Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the box(es).
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.box.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.box.Lineinstance or dict with compatible propertieslowerfence – Sets the lower fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
lowerfenceis not provided but a sample (inyorx) is set, we compute the lower as the last sample point below 1.5 times the IQR.lowerfencesrc – Sets the source reference on Chart Studio Cloud for
lowerfence.marker –
plotly.graph_objects.box.Markerinstance or dict with compatible propertiesmean – Sets the mean values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
meanis not provided but a sample (inyorx) is set, we compute the mean for each box using the sample values.meansrc – Sets the source reference on Chart Studio Cloud for
mean.median – Sets the median values. There should be as many items as the number of boxes desired.
mediansrc – Sets the source reference on Chart Studio Cloud for
median.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categoricalnotched – Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes’ notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home /notched-box-plots for more info. Defaults to False unless
notchwidthornotchspanis set.notchspan – Sets the notch span from the boxes’
medianvalues. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. Ifnotchspanis not provided but a sample (inyorx) is set, we compute it as 1.57 * IQR / sqrt(N), where N is the sample size.notchspansrc – Sets the source reference on Chart Studio Cloud for
notchspan.notchwidth – Sets the width of the notches relative to the box width. For example, with 0, the notches are as wide as the box(es).
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the box(es). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
pointpos – Sets the position of the sample points in relation to the box(es). If 0, the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes
q1 – Sets the Quartile 1 values. There should be as many items as the number of boxes desired.
q1src – Sets the source reference on Chart Studio Cloud for
q1.q3 – Sets the Quartile 3 values. There should be as many items as the number of boxes desired.
q3src – Sets the source reference on Chart Studio Cloud for
q3.quartilemethod – Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
sd – Sets the standard deviation values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
sdis not provided but a sample (inyorx) is set, we compute the standard deviation for each box using the sample values.sdmultiple – Scales the box size when sizemode=sd Allowing boxes to be drawn across any stddev range For example 1-stddev, 3-stddev, 5-stddev
sdsrc – Sets the source reference on Chart Studio Cloud for
sd.selected –
plotly.graph_objects.box.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showwhiskers – Determines whether or not whiskers are visible. Defaults to true for
sizemode“quartiles”, false for “sd”.sizemode – Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc
stream –
plotly.graph_objects.box.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.box.Unselectedinstance or dict with compatible propertiesupperfence – Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
upperfenceis not provided but a sample (inyorx) is set, we compute the upper as the last sample point above 1.5 times the IQR.upperfencesrc – Sets the source reference on Chart Studio Cloud for
upperfence.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
whiskerwidth – Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
width – Sets the width of the box in data coordinate If 0 (default value) the width is automatically selected based on the positions of other box traces in the same subplot.
x – Sets the x sample data or coordinates. See overview for more info.
x0 – Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y sample data or coordinates. See overview for more info.
y0 – Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_candlestick(close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, whiskerwidth=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Candlestick trace
The candlestick is a style of financial chart describing open, high, low and close for a given
xcoordinate (most likely time). The boxes represent the spread between theopenandclosevalues and the lines represent the spread between thelowandhighvalues Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red.- Parameters
close – Sets the close values.
closesrc – Sets the source reference on Chart Studio Cloud for
close.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.candlestick.Decreasinginstance or dict with compatible propertieshigh – Sets the high values.
highsrc – Sets the source reference on Chart Studio Cloud for
high.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.candlestick.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.candlestick.Increasinginstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.candlestick.Legendgrouptit leinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.candlestick.Lineinstance or dict with compatible propertieslow – Sets the low values.
lowsrc – Sets the source reference on Chart Studio Cloud for
low.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
open – Sets the open values.
opensrc – Sets the source reference on Chart Studio Cloud for
open.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.candlestick.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
whiskerwidth – Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
x – Sets the x coordinates. If absent, linear coordinate will be generated.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_carpet(a=None, a0=None, aaxis=None, asrc=None, b=None, b0=None, baxis=None, bsrc=None, carpet=None, cheaterslope=None, color=None, customdata=None, customdatasrc=None, da=None, db=None, font=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, stream=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xsrc=None, y=None, yaxis=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Carpet trace
The data describing carpet axis layout is set in
yand (optionally) alsox. If onlyyis present,xthe plot is interpreted as a cheater plot and is filled in using theyvalues.xandymay either be 2D arrays matching with each dimension matching that ofaandb, or they may be 1D arrays with total length equal to that ofaandb.- Parameters
a – An array containing values of the first parameter value
a0 – Alternate to
a. Builds a linear space of a coordinates. Use withdawherea0is the starting coordinate anddathe step.aaxis –
plotly.graph_objects.carpet.Aaxisinstance or dict with compatible propertiesasrc – Sets the source reference on Chart Studio Cloud for
a.b – A two dimensional array of y coordinates at each carpet point.
b0 – Alternate to
b. Builds a linear space of a coordinates. Use withdbwhereb0is the starting coordinate anddbthe step.baxis –
plotly.graph_objects.carpet.Baxisinstance or dict with compatible propertiesbsrc – Sets the source reference on Chart Studio Cloud for
b.carpet – An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they liecheaterslope – The shift applied to each successive row of data in creating a cheater plot. Only used if
xis been omitted.color – Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.da – Sets the a coordinate step. See
a0for more info.db – Sets the b coordinate step. See
b0for more info.font – The default font used for axis & tick labels on this carpet
ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.carpet.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
stream –
plotly.graph_objects.carpet.Streaminstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – A two dimensional array of x coordinates at each carpet point. If omitted, the plot is a cheater plot and the xaxis is hidden by default.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – A two dimensional array of y coordinates at each carpet point.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_choropleth(autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locationmode=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Choropleth trace
The data that describes the choropleth value-to-color mapping is set in
z. The geographic locations corresponding to each value inzare set inlocations.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choropleth.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.geo – Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.geojson – Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choropleth.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choropleth.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locationmode – The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.locations – Sets the coordinates via location IDs or names. See
locationmodefor more info.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choropleth.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choropleth.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choropleth.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choropleth.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_choroplethmap(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Choroplethmap trace
GeoJSON features to be filled are set in
geojsonThe data that describes the choropleth value-to-color mapping is set inlocationsandz.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmap traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choroplethmap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.geojson – Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choroplethmap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choroplethmap.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locations – Sets which features found in “geojson” to plot using their feature
idfield.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choroplethmap.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choroplethmap.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choroplethmap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choroplethmap.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_choroplethmapbox(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Choroplethmapbox trace
“choroplethmapbox” trace is deprecated! Please consider switching to the “choroplethmap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ GeoJSON features to be filled are set ingeojsonThe data that describes the choropleth value-to-color mapping is set inlocationsandz.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmapbox traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choroplethmapbox.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.geojson – Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choroplethmapbox.Hoverlabe linstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choroplethmapbox.Legendgro uptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locations – Sets which features found in “geojson” to plot using their feature
idfield.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choroplethmapbox.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choroplethmapbox.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choroplethmapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choroplethmapbox.Unselecte dinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_cone(anchor=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizemode=None, sizeref=None, stream=None, text=None, textsrc=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Cone trace
Use cone traces to visualize vector fields. Specify a vector field using 6 1D arrays, 3 position arrays
x,yandzand 3 vector component arraysu,v,w. The cones are drawn exactly at the positions given byx,yandz.- Parameters
anchor – Sets the cones’ anchor with respect to their x/y/z positions. Note that “cm” denote the cone’s center of mass which corresponds to 1/4 from the tail to tip.
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.cone.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.cone.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablenormAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.cone.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.cone.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.cone.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
sizemode – Determines whether
sizerefis set as a “scaled” (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as “absolute” value (in the same units as the vector field). To display sizes in actual vector length use “raw”.sizeref – Adjusts the cone size scaling. The size of the cones is determined by their u/v/w norm multiplied a factor and
sizeref. This factor (computed internally) corresponds to the minimum “time” to travel across two successive x/y/z positions at the average velocity of those two successive positions. All cones in a given trace use the same factor. Withsizemodeset to “raw”, its default value is 1. Withsizemodeset to “scaled”,sizerefis unitless, its default value is 0.5. Withsizemodeset to “absolute”,sizerefhas the same units as the u/v/w vector field, its the default value is half the sample’s maximum vector norm.stream –
plotly.graph_objects.cone.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with the cones. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.u – Sets the x components of the vector field.
uhoverformat – Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.usrc – Sets the source reference on Chart Studio Cloud for
u.v – Sets the y components of the vector field.
vhoverformat – Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
vsrc – Sets the source reference on Chart Studio Cloud for
v.w – Sets the z components of the vector field.
whoverformat – Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.wsrc – Sets the source reference on Chart Studio Cloud for
w.x – Sets the x coordinates of the vector field and of the displayed cones.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates of the vector field and of the displayed cones.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates of the vector field and of the displayed cones.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_contour(autocolorscale=None, autocontour=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Contour trace
The data from which contour lines are computed is set in
z. Data inzmust be a 2D list of numbers. Say thatzhas N rows and M columns, then by default, these N rows correspond to N y coordinates (set inyor auto-generated) and the M columns correspond to M x coordinates (set inxor auto- generated). By settingtransposeto True, the above behavior is flipped.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.contour.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array otherwise it is defaulted to false.contours –
plotly.graph_objects.contour.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.fillcolor – Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.contour.Hoverlabelinstance or dict with compatible propertieshoverongaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.contour.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.contour.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.contour.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textfont – For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.xtype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.ytype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_contourcarpet(a=None, a0=None, asrc=None, atype=None, autocolorscale=None, autocontour=None, b=None, b0=None, bsrc=None, btype=None, carpet=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, da=None, db=None, fillcolor=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, transpose=None, uid=None, uirevision=None, visible=None, xaxis=None, yaxis=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Contourcarpet trace
Plots contours on either the first carpet axis or the carpet axis with a matching
carpetattribute. Datazis interpreted as matching that of the corresponding carpet axis.- Parameters
a – Sets the x coordinates.
a0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.asrc – Sets the source reference on Chart Studio Cloud for
a.atype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.b – Sets the y coordinates.
b0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.bsrc – Sets the source reference on Chart Studio Cloud for
b.btype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)carpet – The
carpetof the carpet axes on which this contour trace liescoloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.contourcarpet.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contours –
plotly.graph_objects.contourcarpet.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.da – Sets the x coordinate step. See
x0for more info.db – Sets the y coordinate step. See
y0for more info.fillcolor – Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.contourcarpet.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.contourcarpet.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.contourcarpet.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textsrc – Sets the source reference on Chart Studio Cloud for
text.transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_densitymap(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Densitymap trace
Draws a bivariate kernel density estimation with a Gaussian kernel from
lonandlatcoordinates and optionalzvalues using a colorscale.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the densitymap trace will be inserted before the layer with the specified ID. By default, densitymap traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.densitymap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.densitymap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.densitymap.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
radius – Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymap trace smoother, but less detailed.radiussrc – Sets the source reference on Chart Studio Cloud for
radius.reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.densitymap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_densitymapbox(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Densitymapbox trace
“densitymapbox” trace is deprecated! Please consider switching to the “densitymap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ Draws a bivariate kernel density estimation with a Gaussian kernel fromlonandlatcoordinates and optionalzvalues using a colorscale.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the densitymapbox trace will be inserted before the layer with the specified ID. By default, densitymapbox traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.densitymapbox.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.densitymapbox.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.densitymapbox.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
radius – Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed.radiussrc – Sets the source reference on Chart Studio Cloud for
radius.reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.densitymapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_funnel(alignmentgroup=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Funnel trace
Visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a “drop-off” representation wherein each item appears in each stage it traversed. See also the “funnelarea” trace type for a different approach to visualizing funnel data.
- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connector –
plotly.graph_objects.funnel.Connectorinstance or dict with compatible propertiesconstraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.funnel.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPreviousandpercentTotal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.funnel.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.funnel.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the funnels. With “v” (“h”), the value of the each bar spans along the vertical (horizontal). By default funnels are tend to be oriented horizontally; unless only “y” array is presented or orientation is set to “v”. Also regarding graphs including only ‘horizontal’ funnels, “autorange” on the “y-axis” are set to “reversed”.
outsidetextfont – Sets the font used for
textlying outside the bar.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.funnel.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textinfo – Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPrevious,percentTotal,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_funnelarea(aspectratio=None, baseratio=None, customdata=None, customdatasrc=None, dlabel=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, scalegroup=None, showlegend=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Funnelarea trace
Visualize stages in a process using area-encoded trapezoids. This trace can be used to show data in a part-to-whole representation similar to a “pie” trace, wherein each item appears in a single stage. See also the “funnel” trace type for a different approach to visualizing funnel data.
- Parameters
aspectratio – Sets the ratio between height and width
baseratio – Sets the ratio between bottom length and maximum top length.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dlabel – Sets the label step. See
label0for more info.domain –
plotly.graph_objects.funnelarea.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.funnelarea.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.label0 – Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.labels – Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.funnelarea.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.funnelarea.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
scalegroup – If there are multiple funnelareas that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.funnelarea.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Specifies the location of the
textinfo.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.title –
plotly.graph_objects.funnelarea.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values of the sectors. If omitted, we count occurrences of each label.
valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_heatmap(autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xgap=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, ygap=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Heatmap trace
The data that describes the heatmap value-to-color mapping is set in
z. Data inzcan either be a 2D list of values (ragged or not) or a 1D array of values. In the case wherezis a 2D list, say thatzhas N rows and M columns. Then, by default, the resulting heatmap will have N partitions along the y axis and M partitions along the x axis. In other words, the i-th row/ j-th column cell inzis mapped to the i-th partition of the y axis (starting from the bottom of the plot) and the j-th partition of the x-axis (starting from the left of the plot). This behavior can be flipped by usingtranspose. Moreover,x(y) can be provided with M or M+1 (N or N+1) elements. If M (N), then the coordinates correspond to the center of the heatmap cells and the cells have equal width. If M+1 (N+1), then the coordinates correspond to the edges of the heatmap cells. In the case wherezis a 1D list, the x and y coordinates must be provided inxandyrespectively to form data triplets.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.heatmap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array andzsmoothis not false; otherwise it is defaulted to false.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.heatmap.Hoverlabelinstance or dict with compatible propertieshoverongaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.heatmap.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.heatmap.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textfont – Sets the text font.
textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xgap – Sets the horizontal gap (in pixels) between bricks.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.xtype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.ygap – Sets the vertical gap (in pixels) between bricks.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.ytype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsmooth – Picks a smoothing algorithm use to smooth
zdata.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram(alignmentgroup=None, autobinx=None, autobiny=None, bingroup=None, cliponaxis=None, constraintext=None, cumulative=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, xaxis=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Histogram trace
The sample data from which statistics are computed is set in
xfor vertically spanning histograms and inyfor horizontally spanning histograms. Binning options are setxbinsandybinsrespectively if no aggregation data is provided.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.bingroup – Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same “orientation” under
barmode“stack”, “relative” and “group” are forced into the same bingroup, Usingbingroup, traces underbarmode“overlay” and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d* trace can share the samebingroupcliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.constraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
cumulative –
plotly.graph_objects.histogram.Cumulativeinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.error_x –
plotly.graph_objects.histogram.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.histogram.ErrorYinstance or dict with compatible propertieshistfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablebinNumberAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.histogram.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.histogram.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selected –
plotly.graph_objects.histogram.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.histogram.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the text font.
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.histogram.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbins –
plotly.graph_objects.histogram.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybins –
plotly.graph_objects.histogram.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram2d(autobinx=None, autobiny=None, autocolorscale=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xgap=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, ygap=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Histogram2d trace
The sample data from which statistics are computed is set in
xandy(wherexandyrepresent marginal distributions, binning is set inxbinsandybinsin this case) orz(wherezrepresent the 2D distribution and binning set, binning is set byxandyin this case). The resulting distribution is visualized as a heatmap.- Parameters
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.bingroup – Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.histogram2d.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.histfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram2d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.histogram2d.Legendgrouptit leinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.histogram2d.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.histogram2d.Streaminstance or dict with compatible propertiestextfont – Sets the text font.
texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableztexttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbingroup – Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroupxbins –
plotly.graph_objects.histogram2d.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xgap – Sets the horizontal gap (in pixels) between bricks.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybingroup – Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroupybins –
plotly.graph_objects.histogram2d.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.ygap – Sets the vertical gap (in pixels) between bricks.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the aggregation data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsmooth – Picks a smoothing algorithm use to smooth
zdata.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram2dcontour(autobinx=None, autobiny=None, autocolorscale=None, autocontour=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Histogram2dContour trace
The sample data from which statistics are computed is set in
xandy(wherexandyrepresent marginal distributions, binning is set inxbinsandybinsin this case) orz(wherezrepresent the 2D distribution and binning set, binning is set byxandyin this case). The resulting distribution is visualized as a contour plot.- Parameters
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.bingroup – Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.histogram2dcontour.ColorBa rinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contours –
plotly.graph_objects.histogram2dcontour.Contour sinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.histfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram2dcontour.Hoverla belinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.histogram2dcontour.Legendg rouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.histogram2dcontour.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.histogram2dcontour.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.histogram2dcontour.Streaminstance or dict with compatible propertiestextfont – For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.texttemplate – For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbingroup – Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroupxbins –
plotly.graph_objects.histogram2dcontour.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybingroup – Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroupybins –
plotly.graph_objects.histogram2dcontour.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the aggregation data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_hline(y, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a horizontal line to a plot or subplot that extends infinitely in the x-dimension.
- Parameters
y (float or int) – A number representing the y coordinate of the horizontal line.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the line. Example positions are “bottom left”, “right top”, “right”, “bottom”. If an annotation is added but annotation_position is not specified, this defaults to “top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_hrect(y0, y1, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a rectangle to a plot or subplot that extends infinitely in the x-dimension.
- Parameters
y0 (float or int) – A number representing the y coordinate of one side of the rectangle.
y1 (float or int) – A number representing the y coordinate of the other side of the rectangle.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["inside", "outside"], ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the rectangle. Example positions are “outside top left”, “inside bottom”, “right”, “inside left”, “inside” (“outside” is not supported). If an annotation is added but annotation_position is not specified this defaults to “inside top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_icicle(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Icicle trace
Visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. The icicle sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.icicle.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.icicle.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.leaf –
plotly.graph_objects.icicle.Leafinstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.icicle.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.icicle.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.pathbar –
plotly.graph_objects.icicle.Pathbarinstance or dict with compatible propertiesroot –
plotly.graph_objects.icicle.Rootinstance or dict with compatible propertiessort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.icicle.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Sets the positions of the
textelements.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.tiling –
plotly.graph_objects.icicle.Tilinginstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_image(colormodel=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, source=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x0=None, xaxis=None, y0=None, yaxis=None, z=None, zmax=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Image trace
Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie.
autorange: 'reversed'), constrained to the domain (ie.constrain: 'domain') and it will have the same scale as its x axis (ie.scaleanchor: 'x,) in order for pixels to be rendered as squares.- Parameters
colormodel – Color model used to map the numerical color components described in
zinto colors. Ifsourceis specified, this attribute will be set torgba256otherwise it defaults torgb.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Set the pixel’s horizontal size.
dy – Set the pixel’s vertical size
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.image.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesz,colorandcolormodel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.image.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
source – Specifies the data URI of the image to be visualized. The URI consists of “data:image/[<media subtype>][;base64],<data>”
stream –
plotly.graph_objects.image.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x0 – Set the image’s x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.y0 – Set the image’s y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.z – A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color.
zmax – Array defining the higher bound for each color component. Note that the default value will depend on the colormodel. For the
rgbcolormodel, it is [255, 255, 255]. For thergbacolormodel, it is [255, 255, 255, 1]. For thergba256colormodel, it is [255, 255, 255, 255]. For thehslcolormodel, it is [360, 100, 100]. For thehslacolormodel, it is [360, 100, 100, 1].zmin – Array defining the lower bound for each color component. Note that the default value will depend on the colormodel. For the
rgbcolormodel, it is [0, 0, 0]. For thergbacolormodel, it is [0, 0, 0, 0]. For thergba256colormodel, it is [0, 0, 0, 0]. For thehslcolormodel, it is [0, 0, 0]. For thehslacolormodel, it is [0, 0, 0, 0].zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsmooth – Picks a smoothing algorithm used to smooth
zdata. This only applies for image traces that use thesourceattribute.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_indicator(align=None, customdata=None, customdatasrc=None, delta=None, domain=None, gauge=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, mode=None, name=None, number=None, stream=None, title=None, uid=None, uirevision=None, value=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Indicator trace
An indicator is used to visualize a single
valuealong with some contextual information such asstepsor athreshold, using a combination of three visual elements: a number, a delta, and/or a gauge. Deltas are taken with respect to areference. Gauges can be either angular or bullet (aka linear) gauges.- Parameters
align – Sets the horizontal alignment of the
textwithin the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centeredcustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.delta –
plotly.graph_objects.indicator.Deltainstance or dict with compatible propertiesdomain –
plotly.graph_objects.indicator.Domaininstance or dict with compatible propertiesgauge – The gauge of the Indicator plot.
ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle – :class:`plotly.graph_objects.indicator.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines how the value is displayed on the graph.
numberdisplays the value numerically in text.deltadisplays the difference to a reference value in text. Finally,gaugedisplays the value graphically on an axis.name – Sets the trace name. The trace name appears as the legend item and on hover.
number –
plotly.graph_objects.indicator.Numberinstance or dict with compatible propertiesstream –
plotly.graph_objects.indicator.Streaminstance or dict with compatible propertiestitle –
plotly.graph_objects.indicator.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the number to be displayed.
visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_isosurface(autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Isosurface trace
Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the
value,x,yandzof every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.caps –
plotly.graph_objects.isosurface.Capsinstance or dict with compatible propertiescauto – Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.isosurface.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.isosurface.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.isosurface.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.isomax – Sets the maximum boundary for iso-surface plot.
isomin – Sets the minimum boundary for iso-surface plot.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.isosurface.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.isosurface.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.isosurface.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
slices –
plotly.graph_objects.isosurface.Slicesinstance or dict with compatible propertiesspaceframe –
plotly.graph_objects.isosurface.Spaceframeinstance or dict with compatible propertiesstream –
plotly.graph_objects.isosurface.Streaminstance or dict with compatible propertiessurface –
plotly.graph_objects.isosurface.Surfaceinstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the 4th dimension (value) of the vertices.
valuehoverformat – Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.valuesrc – Sets the source reference on Chart Studio Cloud for
value.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices on X axis.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices on Y axis.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices on Z axis.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_layout_image(arg=None, layer=None, name=None, opacity=None, sizex=None, sizey=None, sizing=None, source=None, templateitemname=None, visible=None, x=None, xanchor=None, xref=None, y=None, yanchor=None, yref=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Create and add a new image to the figure’s layout
- Parameters
arg – instance of Image or dict with compatible properties
layer – Specifies whether images are drawn below or above traces. When
xrefandyrefare both set topaper, image is drawn below the entire plot area.name – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the image.
sizex – Sets the image container size horizontally. The image will be sized based on the
positionvalue. Whenxrefis set topaper, units are sized relative to the plot width. Whenxrefends with ` domain`, units are sized relative to the axis width.sizey – Sets the image container size vertically. The image will be sized based on the
positionvalue. Whenyrefis set topaper, units are sized relative to the plot height. Whenyrefends with ` domain`, units are sized relative to the axis height.sizing – Specifies which dimension of the image to constrain.
source – Specifies the URL of the image to be used. The URL must be accessible from the domain where the plot code is run, and can be either relative or absolute.
templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.visible – Determines whether or not this image is visible.
x – Sets the image’s x position. When
xrefis set topaper, units are sized relative to the plot height. Seexreffor more infoxanchor – Sets the anchor for the x position
xref – Sets the images’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.y – Sets the image’s y position. When
yrefis set topaper, units are sized relative to the plot height. Seeyreffor more infoyanchor – Sets the anchor for the y position.
yref – Sets the images’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.row – Subplot row for image. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for image. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add image to secondary y-axis
exclude_empty_subplots – If True, image will not be added to subplots without traces.
- Returns
- Return type
-
add_mesh3d(alphahull=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, delaunayaxis=None, facecolor=None, facecolorsrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, i=None, ids=None, idssrc=None, intensity=None, intensitymode=None, intensitysrc=None, isrc=None, j=None, jsrc=None, k=None, ksrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, vertexcolor=None, vertexcolorsrc=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Mesh3d trace
Draws sets of triangles with coordinates given by three 1-dimensional arrays in
x,y,zand (1) a sets ofi,j,kindices (2) Delaunay triangulation or (3) the Alpha- shape algorithm or (4) the Convex-hull algorithm- Parameters
alphahull – Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the
x,yandzarrays, if thei,j,karrays are not supplied. For general use ofmesh3dit is preferred thati,j,kare supplied. If “-1”, Delaunay triangulation is used, which is mainly suitable if the mesh is a single, more or less layer surface that is perpendicular todelaunayaxis. In case thedelaunayaxisintersects the mesh surface at more than one point it will result triangles that are very long in the dimension ofdelaunayaxis. If “>0”, the alpha-shape algorithm is used. In this case, the positivealphahullvalue signals the use of the alpha-shape algorithm, _and_ its value acts as the parameter for the mesh fitting. If 0, the convex-hull algorithm is used. It is suitable for convex bodies or if the intention is to enclose thex,yandzpoint set into a convex hull.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here
intensity) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
intensityand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asintensity. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
intensityand if set,cmaxmust be set as well.color – Sets the color of the whole mesh
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.mesh3d.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.mesh3d.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.delaunayaxis – Sets the Delaunay axis, which is the axis that is perpendicular to the surface of the Delaunay triangulation. It has an effect if
i,j,kare not provided andalphahullis set to indicate Delaunay triangulation.facecolor – Sets the color of each face Overrides “color” and “vertexcolor”.
facecolorsrc – Sets the source reference on Chart Studio Cloud for
facecolor.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.mesh3d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.i – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “first” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherei[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inirepresents a point in space, which is the first vertex of a triangle.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.intensity – Sets the intensity values for vertices or cells as defined by
intensitymode. It can be used for plotting fields on meshes.intensitymode – Determines the source of
intensityvalues.intensitysrc – Sets the source reference on Chart Studio Cloud for
intensity.isrc – Sets the source reference on Chart Studio Cloud for
i.j – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “second” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherej[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element injrepresents a point in space, which is the second vertex of a triangle.jsrc – Sets the source reference on Chart Studio Cloud for
j.k – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “third” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherek[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inkrepresents a point in space, which is the third vertex of a triangle.ksrc – Sets the source reference on Chart Studio Cloud for
k.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.mesh3d.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.mesh3d.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.mesh3d.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.mesh3d.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.vertexcolor – Sets the color of each vertex Overrides “color”. While Red, green and blue colors are in the range of 0 and 255; in the case of having vertex color data in RGBA format, the alpha color should be normalized to be between 0 and 1.
vertexcolorsrc – Sets the source reference on Chart Studio Cloud for
vertexcolor.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_ohlc(close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, tickwidth=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Ohlc trace
The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given
xcoordinate (most likely time). The tip of the lines represent thelowandhighvalues and the horizontal segments represent theopenandclosevalues. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red.- Parameters
close – Sets the close values.
closesrc – Sets the source reference on Chart Studio Cloud for
close.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.ohlc.Decreasinginstance or dict with compatible propertieshigh – Sets the high values.
highsrc – Sets the source reference on Chart Studio Cloud for
high.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.ohlc.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.ohlc.Increasinginstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.ohlc.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.ohlc.Lineinstance or dict with compatible propertieslow – Sets the low values.
lowsrc – Sets the source reference on Chart Studio Cloud for
low.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
open – Sets the open values.
opensrc – Sets the source reference on Chart Studio Cloud for
open.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.ohlc.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
textsrc – Sets the source reference on Chart Studio Cloud for
text.tickwidth – Sets the width of the open/close tick marks relative to the “x” minimal interval.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates. If absent, linear coordinate will be generated.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_parcats(arrangement=None, bundlecolors=None, counts=None, countssrc=None, dimensions=None, dimensiondefaults=None, domain=None, hoverinfo=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, labelfont=None, legendgrouptitle=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, sortpaths=None, stream=None, tickfont=None, uid=None, uirevision=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Parcats trace
Parallel categories diagram for multidimensional categorical data.
- Parameters
arrangement – Sets the drag interaction mode for categories and dimensions. If
perpendicular, the categories can only move along a line perpendicular to the paths. Iffreeform, the categories can freely move on the plane. Iffixed, the categories and dimensions are stationary.bundlecolors – Sort paths so that like colors are bundled together within each category.
counts – The number of observations represented by each state. Defaults to 1 so that each state represents one observation
countssrc – Sets the source reference on Chart Studio Cloud for
counts.dimensions – The dimensions (variables) of the parallel categories diagram.
dimensiondefaults – When used in a template (as layout.template.data.parcats.dimensiondefaults), sets the default property values to use for elements of parcats.dimensions
domain –
plotly.graph_objects.parcats.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoveron – Sets the hover interaction mode for the parcats diagram. If
category, hover interaction take place per category. Ifcolor, hover interactions take place per color per category. Ifdimension, hover interactions take place across all categories per dimension.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescount,probability,category,categorycount,colorcountandbandcolorcount. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
labelfont – Sets the font for the
dimensionlabels.legendgrouptitle –
plotly.graph_objects.parcats.Legendgrouptitleinstance or dict with compatible propertieslegendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.parcats.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
sortpaths – Sets the path sorting algorithm. If
forward, sort paths based on dimension categories from left to right. Ifbackward, sort paths based on dimensions categories from right to left.stream –
plotly.graph_objects.parcats.Streaminstance or dict with compatible propertiestickfont – Sets the font for the
categorylabels.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_parcoords(customdata=None, customdatasrc=None, dimensions=None, dimensiondefaults=None, domain=None, ids=None, idssrc=None, labelangle=None, labelfont=None, labelside=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, rangefont=None, stream=None, tickfont=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Parcoords trace
Parallel coordinates for multidimensional exploratory data analysis. The samples are specified in
dimensions. The colors are set inline.color.- Parameters
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dimensions – The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported.
dimensiondefaults – When used in a template (as layout.template.data.parcoords.dimensiondefaults), sets the default property values to use for elements of parcoords.dimensions
domain –
plotly.graph_objects.parcoords.Domaininstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.labelangle – Sets the angle of the labels with respect to the horizontal. For example, a
tickangleof -90 draws the labels vertically. Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.labelfont – Sets the font for the
dimensionlabels.labelside – Specifies the location of the
label. “top” positions labels above, next to the title “bottom” positions labels below the graph Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle – :class:`plotly.graph_objects.parcoords.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.parcoords.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
rangefont – Sets the font for the
dimensionrange values.stream –
plotly.graph_objects.parcoords.Streaminstance or dict with compatible propertiestickfont – Sets the font for the
dimensiontick values.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.parcoords.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_pie(automargin=None, customdata=None, customdatasrc=None, direction=None, dlabel=None, domain=None, hole=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, pull=None, pullsrc=None, rotation=None, scalegroup=None, showlegend=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Pie trace
A data visualized by the sectors of the pie is set in
values. The sector labels are set inlabels. The sector colors are set inmarker.colors- Parameters
automargin – Determines whether outside text labels can push the margins.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.direction – Specifies the direction at which succeeding sectors follow one another.
dlabel – Sets the label step. See
label0for more info.domain –
plotly.graph_objects.pie.Domaininstance or dict with compatible propertieshole – Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.pie.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.insidetextorientation – Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
label0 – Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.labels – Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.pie.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.pie.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector.pull – Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices.
pullsrc – Sets the source reference on Chart Studio Cloud for
pull.rotation – Instead of the first slice starting at 12 o’clock, rotate to some other angle.
scalegroup – If there are multiple pie charts that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
sort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.pie.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Specifies the location of the
textinfo.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.title –
plotly.graph_objects.pie.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values of the sectors. If omitted, we count occurrences of each label.
valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_sankey(arrangement=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, link=None, meta=None, metasrc=None, name=None, node=None, orientation=None, selectedpoints=None, stream=None, textfont=None, uid=None, uirevision=None, valueformat=None, valuesuffix=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Sankey trace
Sankey plots for network flow data analysis. The nodes are specified in
nodesand the links between sources and targets inlinks. The colors are set innodes[i].colorandlinks[i].color, otherwise defaults are used.- Parameters
arrangement – If value is
snap(the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified vianodepad. If value isperpendicular, the nodes can only move along a line perpendicular to the flow. If value isfreeform, the nodes can freely move on the plane. If value isfixed, the nodes are stationary.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.sankey.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired. Note that this attribute is superseded bynode.hoverinfoandnode.hoverinfofor nodes and links respectively.hoverlabel –
plotly.graph_objects.sankey.Hoverlabelinstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.sankey.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
link – The links of the Sankey plot.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
node – The nodes of the Sankey plot.
orientation – Sets the orientation of the Sankey diagram.
selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.stream –
plotly.graph_objects.sankey.Streaminstance or dict with compatible propertiestextfont – Sets the font for node labels
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.valueformat – Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
valuesuffix – Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value.
visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatter(alignmentgroup=None, cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, fillgradient=None, fillpattern=None, groupnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, offsetgroup=None, opacity=None, orientation=None, selected=None, selectedpoints=None, showlegend=None, stackgaps=None, stackgroup=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scatter trace
The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts. The data visualized as scatter point or lines is set in
xandy. Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.scatter.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scatter.ErrorYinstance or dict with compatible propertiesfill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.
fillgradient – Sets a fill gradient. If not specified, the fillcolor is used instead.
fillpattern – Sets the pattern within the marker.
groupnorm – Only relevant when
stackgroupis used, and only the firstgroupnormfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the normalization for the sum of thisstackgroup. With “fraction”, the value of each trace at each location is divided by the sum of all trace values at that location. “percent” is the same but multiplied by 100 to show percentages. If there are multiple subplots, or multiple `stackgroup`s on one subplot, each will be normalized within its own set.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatter.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatter.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatter.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatter.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Only relevant in the following cases: 1. when
scattermodeis set to “group”. 2. whenstackgroupis used, and only the firstorientationfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the stacking direction. With “v” (“h”), the y (x) values of subsequent traces are added. Also affects the default value offill.selected –
plotly.graph_objects.scatter.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stackgaps – Only relevant when
stackgroupis used, and only the firststackgapsfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Determines how we handle locations at which other traces in this group have data but this one does not. With infer zero we insert a zero at these locations. With “interpolate” we linearly interpolate between existing values, and extrapolate a constant beyond the existing values.stackgroup – Set several scatter traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if
orientationis “h”). If blank or omitted this trace will not be stacked. Stacking also turnsfillon by default, using “tonexty” (“tonextx”) iforientationis “h” (“v”) and sets the defaultmodeto “lines” irrespective of point count. You can only stack on a numeric (linear or log) axis. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.stream –
plotly.graph_objects.scatter.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatter.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scatter3d(connectgaps=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, error_z=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, projection=None, scene=None, showlegend=None, stream=None, surfaceaxis=None, surfacecolor=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scatter3d trace
The data visualized as scatter point or lines in 3D dimension is set in
x,y,z. Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorProjections are achieved viaprojection. Surface fills are achieved viasurfaceaxis.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.error_x –
plotly.graph_objects.scatter3d.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scatter3d.ErrorYinstance or dict with compatible propertieserror_z –
plotly.graph_objects.scatter3d.ErrorZinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatter3d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.scatter3d.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatter3d.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatter3d.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
projection –
plotly.graph_objects.scatter3d.Projectioninstance or dict with compatible propertiesscene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatter3d.Streaminstance or dict with compatible propertiessurfaceaxis – If “-1”, the scatter points are not fill with a surface If 0, 1, 2, the scatter points are filled with a Delaunay surface about the x, y, z respectively.
surfacecolor – Sets the surface fill color.
text – Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates.
zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattercarpet(a=None, asrc=None, b=None, bsrc=None, carpet=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxis=None, yaxis=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattercarpet trace
Plots a scatter trace on either the first carpet axis or the carpet axis with a matching
carpetattribute.- Parameters
a – Sets the a-axis coordinates.
asrc – Sets the source reference on Chart Studio Cloud for
a.b – Sets the b-axis coordinates.
bsrc – Sets the source reference on Chart Studio Cloud for
b.carpet – An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they lieconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattercarpet.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattercarpet.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattercarpet.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattercarpet.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattercarpet.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattercarpet.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,bandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattercarpet.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scattergeo(connectgaps=None, customdata=None, customdatasrc=None, featureidkey=None, fill=None, fillcolor=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, locationmode=None, locations=None, locationssrc=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattergeo trace
The data visualized as scatter point or lines on a geographic map is provided either by longitude/latitude pairs in
lonandlatrespectively or by geographic location IDs or names inlocations.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
geo – Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.geojson – Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used when
locationsis set. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattergeo.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. To be seen, tracehoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattergeo.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattergeo.Lineinstance or dict with compatible propertieslocationmode – The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.locations – Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See
locationmodefor more info.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattergeo.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattergeo.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattergeo.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lon,locationandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattergeo.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattergl(connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattergl trace
The data visualized as scatter point or lines is set in
xandyusing the WebGL plotting engine. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto a numerical arrays.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.scattergl.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scattergl.ErrorYinstance or dict with compatible propertiesfill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattergl.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.scattergl.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattergl.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattergl.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace.
name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattergl.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattergl.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattergl.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scattermap(below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattermap trace
The data visualized as scatter point, lines or marker symbols on a MapLibre GL geographic map is provided by longitude/latitude pairs in
lonandlat.- Parameters
below – Determines if this scattermap trace’s layers are to be inserted before the layer with the specified ID. By default, scattermap layers are inserted above all the base layers. To place the scattermap layers above every other layer, set
belowto “’’”.cluster –
plotly.graph_objects.scattermap.Clusterinstance or dict with compatible propertiesconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattermap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattermap.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattermap.Lineinstance or dict with compatible propertieslon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattermap.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattermap.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattermap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the icon text font (color=map.layer.paint.text- color, size=map.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattermap.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattermapbox(below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattermapbox trace
“scattermapbox” trace is deprecated! Please consider switching to the “scattermap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs inlonandlat.- Parameters
below – Determines if this scattermapbox trace’s layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set
belowto “’’”.cluster –
plotly.graph_objects.scattermapbox.Clusterinstance or dict with compatible propertiesconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattermapbox.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattermapbox.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattermapbox.Lineinstance or dict with compatible propertieslon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattermapbox.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattermapbox.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattermapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the icon text font (color=mapbox.layer.paint.text- color, size=mapbox.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattermapbox.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterpolar(cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scatterpolar trace
The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts in polar coordinates. The data visualized as scatter point or lines is set in
r(radial) andtheta(angular) coordinates Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterpolar has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterpolar.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterpolar.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterpolar.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterpolar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.scatterpolar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterpolar.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterpolar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterpolargl(connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scatterpolargl trace
The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts in polar coordinates using the WebGL plotting engine. The data visualized as scatter point or lines is set in
r(radial) andtheta(angular) coordinates Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.fill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterpolargl.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterpolargl.Legendgroup titleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterpolargl.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterpolargl.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.scatterpolargl.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterpolargl.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterpolargl.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattersmith(cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, imag=None, imagsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, real=None, realsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scattersmith trace
The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts in smith coordinates. The data visualized as scatter point or lines is set in
realandimag(imaginary) coordinates Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scattersmith has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattersmith.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.imag – Sets the imaginary component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
imagsrc – Sets the source reference on Chart Studio Cloud for
imag.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattersmith.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattersmith.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattersmith.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
real – Sets the real component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
realsrc – Sets the source reference on Chart Studio Cloud for
real.selected –
plotly.graph_objects.scattersmith.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattersmith.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a smith subplot. If “smith” (the default value), the data refer to
layout.smith. If “smith2”, the data refer tolayout.smith2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesreal,imagandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattersmith.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterternary(a=None, asrc=None, b=None, bsrc=None, c=None, cliponaxis=None, connectgaps=None, csrc=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, sum=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Scatterternary trace
Provides similar functionality to the “scatter” type but on a ternary phase diagram. The data is provided by at least two arrays out of
a,b,ctriplets.- Parameters
a – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.asrc – Sets the source reference on Chart Studio Cloud for
a.b – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.bsrc – Sets the source reference on Chart Studio Cloud for
b.c – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
csrc – Sets the source reference on Chart Studio Cloud for
c.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterternary.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterternary.Legendgroup titleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterternary.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterternary.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scatterternary.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterternary.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a ternary subplot. If “ternary” (the default value), the data refer to
layout.ternary. If “ternary2”, the data refer tolayout.ternary2, and so on.sum – The number each triplet should sum to, if only two of
a,b, andcare provided. This overridesternary<i>.sumto normalize this specific trace, but does not affect the values displayed on the axes. 0 (or missing) means to use ternary<i>.sumtext – Sets text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,b,candtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterternary.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_selection(arg=None, line=None, name=None, opacity=None, path=None, templateitemname=None, type=None, x0=None, x1=None, xref=None, y0=None, y1=None, yref=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Create and add a new selection to the figure’s layout
- Parameters
arg – instance of Selection or dict with compatible properties
line –
plotly.graph_objects.layout.selection.Lineinstance or dict with compatible propertiesname – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the selection.
path – For
type“path” - a valid SVG path similar toshapes.pathin data coordinates. Allowed segments are: M, L and Z.templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.type – Specifies the selection type to be drawn. If “rect”, a rectangle is drawn linking (
x0,`y0`), (x1,`y0`), (x1,`y1`) and (x0,`y1`). If “path”, draw a custom SVG path usingpath.x0 – Sets the selection’s starting x position.
x1 – Sets the selection’s end x position.
xref – Sets the selection’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.y0 – Sets the selection’s starting y position.
y1 – Sets the selection’s end y position.
yref – Sets the selection’s x coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.row – Subplot row for selection. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for selection. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add selection to secondary y-axis
exclude_empty_subplots – If True, selection will not be added to subplots without traces.
- Returns
- Return type
-
add_shape(arg=None, editable=None, fillcolor=None, fillrule=None, label=None, layer=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, name=None, opacity=None, path=None, showlegend=None, templateitemname=None, type=None, visible=None, x0=None, x0shift=None, x1=None, x1shift=None, xanchor=None, xref=None, xsizemode=None, y0=None, y0shift=None, y1=None, y1shift=None, yanchor=None, yref=None, ysizemode=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Create and add a new shape to the figure’s layout
- Parameters
arg – instance of Shape or dict with compatible properties
editable – Determines whether the shape could be activated for edit or not. Has no effect when the older editable shapes mode is enabled via
config.editableorconfig.edits.shapePosition.fillcolor – Sets the color filling the shape’s interior. Only applies to closed shapes.
fillrule – Determines which regions of complex paths constitute the interior. For more info please visit https://developer.mozilla.org/en- US/docs/Web/SVG/Attribute/fill-rule
label –
plotly.graph_objects.layout.shape.Labelinstance or dict with compatible propertieslayer – Specifies whether shapes are drawn below gridlines (“below”), between gridlines and traces (“between”) or above traces (“above”).
legend – Sets the reference to a legend to show this shape in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this shape. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.layout.shape.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this shape. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this shape.
line –
plotly.graph_objects.layout.shape.Lineinstance or dict with compatible propertiesname – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the shape.
path – For
type“path” - a valid SVG path with the pixel values replaced by data values inxsizemode/ysizemodebeing “scaled” and taken unmodified as pixels relative toxanchorandyanchorin case of “pixel” size mode. There are a few restrictions / quirks only absolute instructions, not relative. So the allowed segments are: M, L, H, V, Q, C, T, S, and Z arcs (A) are not allowed because radius rx and ry are relative. In the future we could consider supporting relative commands, but we would have to decide on how to handle date and log axes. Note that even as is, Q and C Bezier paths that are smooth on linear axes may not be smooth on log, and vice versa. no chained “polybezier” commands - specify the segment type for each one. On category axes, values are numbers scaled to the serial numbers of categories because using the categories themselves there would be no way to describe fractional positions On data axes: because space and T are both normal components of path strings, we can’t use either to separate date from time parts. Therefore we’ll use underscore for this purpose: 2015-02-21_13:45:56.789showlegend – Determines whether or not this shape is shown in the legend.
templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.type – Specifies the shape type to be drawn. If “line”, a line is drawn from (
x0,`y0`) to (x1,`y1`) with respect to the axes’ sizing mode. If “circle”, a circle is drawn from ((x0`+`x1)/2, (y0`+`y1)/2)) with radius (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with respect to the axes’ sizing mode. If “rect”, a rectangle is drawn linking (x0,`y0`), (x1,`y0`), (x1,`y1`), (x0,`y1`), (x0,`y0`) with respect to the axes’ sizing mode. If “path”, draw a custom SVG path usingpath. with respect to the axes’ sizing mode.visible – Determines whether or not this shape is visible. If “legendonly”, the shape is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x0 – Sets the shape’s starting x position. See
typeandxsizemodefor more info.x0shift – Shifts
x0away from the center of the category whenxrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.x1 – Sets the shape’s end x position. See
typeandxsizemodefor more info.x1shift – Shifts
x1away from the center of the category whenxrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.xanchor – Only relevant in conjunction with
xsizemodeset to “pixel”. Specifies the anchor point on the x axis to whichx0,x1and x coordinates withinpathare relative to. E.g. useful to attach a pixel sized shape to a certain data value. No effect whenxsizemodenot set to “pixel”.xref – Sets the shape’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.xsizemode – Sets the shapes’s sizing mode along the x axis. If set to “scaled”,
x0,x1and x coordinates withinpathrefer to data values on the x axis or a fraction of the plot area’s width (xrefset to “paper”). If set to “pixel”,xanchorspecifies the x position in terms of data or plot fraction butx0,x1and x coordinates withinpathare pixels relative toxanchor. This way, the shape can have a fixed width while maintaining a position relative to data or plot fraction.y0 – Sets the shape’s starting y position. See
typeandysizemodefor more info.y0shift – Shifts
y0away from the center of the category whenyrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.y1 – Sets the shape’s end y position. See
typeandysizemodefor more info.y1shift – Shifts
y1away from the center of the category whenyrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.yanchor – Only relevant in conjunction with
ysizemodeset to “pixel”. Specifies the anchor point on the y axis to whichy0,y1and y coordinates withinpathare relative to. E.g. useful to attach a pixel sized shape to a certain data value. No effect whenysizemodenot set to “pixel”.yref – Sets the shape’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.ysizemode – Sets the shapes’s sizing mode along the y axis. If set to “scaled”,
y0,y1and y coordinates withinpathrefer to data values on the y axis or a fraction of the plot area’s height (yrefset to “paper”). If set to “pixel”,yanchorspecifies the y position in terms of data or plot fraction buty0,y1and y coordinates withinpathare pixels relative toyanchor. This way, the shape can have a fixed height while maintaining a position relative to data or plot fraction.row – Subplot row for shape. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for shape. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add shape to secondary y-axis
exclude_empty_subplots – If True, shape will not be added to subplots without traces.
- Returns
- Return type
-
add_splom(customdata=None, customdatasrc=None, diagonal=None, dimensions=None, dimensiondefaults=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, showlowerhalf=None, showupperhalf=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxes=None, xhoverformat=None, yaxes=None, yhoverformat=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Splom trace
Splom traces generate scatter plot matrix visualizations. Each splom
dimensionsitems correspond to a generated axis. Values for each of those dimensions are set indimensions[i].values. Splom traces support allscatterglmarker style attributes. Specifylayout.gridattributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style.- Parameters
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.diagonal –
plotly.graph_objects.splom.Diagonalinstance or dict with compatible propertiesdimensions – A tuple of
plotly.graph_objects.splom.Dimensioninstances or dicts with compatible propertiesdimensiondefaults – When used in a template (as layout.template.data.splom.dimensiondefaults), sets the default property values to use for elements of splom.dimensions
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.splom.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.splom.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.splom.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.splom.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showlowerhalf – Determines whether or not subplots on the lower half from the diagonal are displayed.
showupperhalf – Determines whether or not subplots on the upper half from the diagonal are displayed.
stream –
plotly.graph_objects.splom.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair to appear on hover. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.splom.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxes – Sets the list of x axes corresponding to dimensions of this splom trace. By default, a splom will match the first N xaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.yaxes – Sets the list of y axes corresponding to dimensions of this splom trace. By default, a splom will match the first N yaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_streamtube(autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, maxdisplayed=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizeref=None, starts=None, stream=None, text=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Streamtube trace
Use a streamtube trace to visualize flow in a vector field. Specify a vector field using 6 1D arrays of equal length, 3 position arrays
x,yandzand 3 vector component arraysu,v, andw. By default, the tubes’ starting positions will be cut from the vector field’s x-z plane at its minimum y value. To specify your own starting position, use attributesstarts.x,starts.yandstarts.z. The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w).- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.streamtube.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.streamtube.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablestubex,tubey,tubez,tubeu,tubev,tubew,normanddivergence. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.streamtube.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.streamtube.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.streamtube.Lightpositioninstance or dict with compatible propertiesmaxdisplayed – The maximum number of displayed segments in a streamtube.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
sizeref – The scaling factor for the streamtubes. The default is 1, which avoids two max divergence tubes from touching at adjacent starting positions.
starts –
plotly.graph_objects.streamtube.Startsinstance or dict with compatible propertiesstream –
plotly.graph_objects.streamtube.Streaminstance or dict with compatible propertiestext – Sets a text element associated with this trace. If trace
hoverinfocontains a “text” flag, this text element will be seen in all hover labels. Note that streamtube traces do not support arraytextvalues.u – Sets the x components of the vector field.
uhoverformat – Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.usrc – Sets the source reference on Chart Studio Cloud for
u.v – Sets the y components of the vector field.
vhoverformat – Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
vsrc – Sets the source reference on Chart Studio Cloud for
v.w – Sets the z components of the vector field.
whoverformat – Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.wsrc – Sets the source reference on Chart Studio Cloud for
w.x – Sets the x coordinates of the vector field.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates of the vector field.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates of the vector field.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_sunburst(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, root=None, rotation=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Sunburst trace
Visualize hierarchal data spanning outward radially from root to leaves. The sunburst sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.sunburst.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.sunburst.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.insidetextorientation – Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.leaf –
plotly.graph_objects.sunburst.Leafinstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.sunburst.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.sunburst.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented at the center of a sunburst graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.root –
plotly.graph_objects.sunburst.Rootinstance or dict with compatible propertiesrotation – Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o’clock.
sort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.sunburst.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_surface(autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, hidesurface=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, surfacecolor=None, surfacecolorsrc=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Surface trace
The data the describes the coordinates of the surface is set in
z. Data inzshould be a 2D list. Coordinates inxandycan either be 1D lists or 2D lists (e.g. to graph parametric surfaces). If not provided inxandy, the x and y coordinates are assumed to be linear starting at 0 with a unit step. The color scale corresponds to thezvalues by default. For custom color scales, usesurfacecolorwhich should be a 2D list, where its bounds can be controlled usingcminandcmax.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here z or surfacecolor) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as z or surfacecolor. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.surface.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in.contours –
plotly.graph_objects.surface.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hidesurface – Determines whether or not a surface is drawn. For example, set
hidesurfaceto Falsecontours.x.showto True andcontours.y.showto True to draw a wire frame plot.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.surface.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.surface.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.surface.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.surface.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.opacityscale – Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.surface.Streaminstance or dict with compatible propertiessurfacecolor – Sets the surface color values, used for setting a color scale independent of
z.surfacecolorsrc – Sets the source reference on Chart Studio Cloud for
surfacecolor.text – Sets the text elements associated with each z value. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates.
zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_table(cells=None, columnorder=None, columnordersrc=None, columnwidth=None, columnwidthsrc=None, customdata=None, customdatasrc=None, domain=None, header=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, stream=None, uid=None, uirevision=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Table trace
Table view for detailed data viewing. The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a column- major order, ie. the grid is represented as a vector of column vectors.
- Parameters
cells –
plotly.graph_objects.table.Cellsinstance or dict with compatible propertiescolumnorder – Specifies the rendered order of the data columns; for example, a value
2at position0means that column index0in the data will be rendered as the third column, as columns have an index base of zero.columnordersrc – Sets the source reference on Chart Studio Cloud for
columnorder.columnwidth – The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths.
columnwidthsrc – Sets the source reference on Chart Studio Cloud for
columnwidth.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.table.Domaininstance or dict with compatible propertiesheader –
plotly.graph_objects.table.Headerinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.table.Hoverlabelinstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.table.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
stream –
plotly.graph_objects.table.Streaminstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_trace(trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False) → plotly.graph_objects._figure.Figure¶ Add a trace to the figure
- Parameters
trace (BaseTraceType or dict) –
- Either:
An instances of a trace classe from the plotly.graph_objects package (e.g plotly.graph_objects.Scatter, plotly.graph_objects.Bar)
or a dicts where:
The ‘type’ property specifies the trace type (e.g. ‘scatter’, ‘bar’, ‘area’, etc.). If the dict has no ‘type’ property then ‘scatter’ is assumed.
All remaining properties are passed to the constructor of the specified trace type.
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots. If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots. If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
The trace argument is a 2D cartesian trace (scatter, bar, etc.)
exclude_empty_subplots (boolean) – If True, the trace will not be added to subplots that don’t already have traces.
- Returns
The Figure that add_trace was called on
- Return type
Examples
>>> from plotly import subplots >>> import plotly.graph_objects as go
Add two Scatter traces to a figure
>>> fig = go.Figure() >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) Figure(...) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) Figure(...)
Add two Scatter traces to vertically stacked subplots
>>> fig = subplots.make_subplots(rows=2) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) Figure(...) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) Figure(...)
-
add_traces(data, rows=None, cols=None, secondary_ys=None, exclude_empty_subplots=False) → plotly.graph_objects._figure.Figure¶ Add traces to the figure
- Parameters
data (list[BaseTraceType or dict]) –
A list of trace specifications to be added. Trace specifications may be either:
Instances of trace classes from the plotly.graph_objects package (e.g plotly.graph_objects.Scatter, plotly.graph_objects.Bar)
Dicts where:
The ‘type’ property specifies the trace type (e.g. ‘scatter’, ‘bar’, ‘area’, etc.). If the dict has no ‘type’ property then ‘scatter’ is assumed.
All remaining properties are passed to the constructor of the specified trace type.
rows (None, list[int], or int (default None)) – List of subplot row indexes (starting from 1) for the traces to be added. Only valid if figure was created using
plotly.tools.make_subplotsIf a single integer is passed, all traces will be added to row numbercols (None or list[int] (default None)) – List of subplot column indexes (starting from 1) for the traces to be added. Only valid if figure was created using
plotly.tools.make_subplotsIf a single integer is passed, all traces will be added to column number
- secondary_ys: None or list[boolean] (default None)
List of secondary_y booleans for traces to be added. See the docstring for
add_tracefor more info.- exclude_empty_subplots: boolean
If True, the trace will not be added to subplots that don’t already have traces.
- Returns
The Figure that add_traces was called on
- Return type
Examples
>>> from plotly import subplots >>> import plotly.graph_objects as go
Add two Scatter traces to a figure
>>> fig = go.Figure() >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), ... go.Scatter(x=[1,2,3], y=[2,1,2])]) Figure(...)
Add two Scatter traces to vertically stacked subplots
>>> fig = subplots.make_subplots(rows=2) >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), ... go.Scatter(x=[1,2,3], y=[2,1,2])], ... rows=[1, 2], cols=[1, 1]) Figure(...)
-
add_treemap(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Treemap trace
Visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. The treemap sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.treemap.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.treemap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.treemap.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.treemap.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.pathbar –
plotly.graph_objects.treemap.Pathbarinstance or dict with compatible propertiesroot –
plotly.graph_objects.treemap.Rootinstance or dict with compatible propertiessort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.treemap.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Sets the positions of the
textelements.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.tiling –
plotly.graph_objects.treemap.Tilinginstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_violin(alignmentgroup=None, bandwidth=None, box=None, customdata=None, customdatasrc=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meanline=None, meta=None, metasrc=None, name=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, points=None, quartilemethod=None, scalegroup=None, scalemode=None, selected=None, selectedpoints=None, showlegend=None, side=None, span=None, spanmode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Violin trace
In vertical (horizontal) violin plots, statistics are computed using
y(x) values. By supplying anx(y) array, one violin per distinct x (y) value is drawn If nox(y) list is provided, a single violin is drawn. That violin position is then positioned with withnameor withx0(y0) if provided.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
bandwidth – Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman’s rule of thumb.
box –
plotly.graph_objects.violin.Boxinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.violin.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual violins or sample points or the kernel density estimate or any combination of them?
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.jitter – Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the violins.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.violin.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.violin.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.violin.Markerinstance or dict with compatible propertiesmeanline –
plotly.graph_objects.violin.Meanlineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover. For violin traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categorical. Note that the trace name is also used as a default value for attributescalegroup(please see its description for details).offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the violin(s). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
pointpos – Sets the position of the sample points in relation to the violins. If 0, the sample points are places over the center of the violins. Positive (negative) values correspond to positions to the right (left) for vertical violins and above (below) for horizontal violins.
points – If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the violins are shown with no sample points. Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set, otherwise defaults to “outliers”.quartilemethod – Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
scalegroup – If there are multiple violins that should be sized according to to some metric (see
scalemode), link them by providing a non-empty group id here shared by every trace in the same group. If a violin’swidthis undefined,scalegroupwill default to the trace’s name. In this case, violins with the same names will be linked togetherscalemode – Sets the metric by which the width of each violin is determined. “width” means each violin has the same (max) width “count” means the violins are scaled by the number of sample points making up each violin.
selected –
plotly.graph_objects.violin.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
side – Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under “overlay” mode, where one trace has
sideset to “positive” and the other to “negative”.span – Sets the span in data space for which the density function will be computed. Has an effect only when
spanmodeis set to “manual”.spanmode – Sets the method by which the span in data space where the density function will be computed. “soft” means the span goes from the sample’s minimum value minus two bandwidths to the sample’s maximum value plus two bandwidths. “hard” means the span goes from the sample’s minimum to its maximum value. For custom span settings, use mode “manual” and fill in the
spanattribute.stream –
plotly.graph_objects.violin.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.violin.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the width of the violin in data coordinates. If 0 (default value) the width is automatically selected based on the positions of other violin traces in the same subplot.
x – Sets the x sample data or coordinates. See overview for more info.
x0 – Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y sample data or coordinates. See overview for more info.
y0 – Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_vline(x, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a vertical line to a plot or subplot that extends infinitely in the y-dimension.
- Parameters
x (float or int) – A number representing the x coordinate of the vertical line.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the line. Example positions are “bottom left”, “right top”, “right”, “bottom”. If an annotation is added but annotation_position is not specified, this defaults to “top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_volume(autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Volume trace
Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the
value,x,yandzof every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.caps –
plotly.graph_objects.volume.Capsinstance or dict with compatible propertiescauto – Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.volume.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.volume.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.volume.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.isomax – Sets the maximum boundary for iso-surface plot.
isomin – Sets the minimum boundary for iso-surface plot.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.volume.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.volume.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.volume.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.opacityscale – Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
slices –
plotly.graph_objects.volume.Slicesinstance or dict with compatible propertiesspaceframe –
plotly.graph_objects.volume.Spaceframeinstance or dict with compatible propertiesstream –
plotly.graph_objects.volume.Streaminstance or dict with compatible propertiessurface –
plotly.graph_objects.volume.Surfaceinstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the 4th dimension (value) of the vertices.
valuehoverformat – Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.valuesrc – Sets the source reference on Chart Studio Cloud for
value.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices on X axis.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices on Y axis.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices on Z axis.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_vrect(x0, x1, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a rectangle to a plot or subplot that extends infinitely in the y-dimension.
- Parameters
x0 (float or int) – A number representing the x coordinate of one side of the rectangle.
x1 (float or int) – A number representing the x coordinate of the other side of the rectangle.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["inside", "outside"], ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the rectangle. Example positions are “outside top left”, “inside bottom”, “right”, “inside left”, “inside” (“outside” is not supported). If an annotation is added but annotation_position is not specified this defaults to “inside top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_waterfall(alignmentgroup=None, base=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, decreasing=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, measure=None, measuresrc=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, totals=None, uid=None, uirevision=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Add a new Waterfall trace
Draws waterfall trace which is useful graph to displays the contribution of various elements (either positive or negative) in a bar chart. The data visualized by the span of the bars is set in
yiforientationis set to “v” (the default) and the labels are set inx. By settingorientationto “h”, the roles are interchanged.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
base – Sets where the bar base is drawn (in position axis units).
cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connector –
plotly.graph_objects.waterfall.Connectorinstance or dict with compatible propertiesconstraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.waterfall.Decreasinginstance or dict with compatible propertiesdx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.waterfall.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,deltaandfinal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.waterfall.Increasinginstance or dict with compatible propertiesinsidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.waterfall.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
measure – An array containing types of values. By default the values are considered as ‘relative’. However; it is possible to use ‘total’ to compute the sums. Also ‘absolute’ could be applied to reset the computed total or to declare an initial value where needed.
measuresrc – Sets the source reference on Chart Studio Cloud for
measure.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.waterfall.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textinfo – Determines which trace information appear on the graph. In the case of having multiple waterfalls, totals are computed separately (per trace).
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,delta,finalandlabel.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.totals –
plotly.graph_objects.waterfall.Totalsinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
for_each_annotation(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all annotations that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single annotation object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotations that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotations that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_coloraxis(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all coloraxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single coloraxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_geo(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all geo objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single geo object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_layout_image(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all images that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single image object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those images that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those images that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_legend(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all legend objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single legend object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_map(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all map objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single map object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_mapbox(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all mapbox objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single mapbox object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_polar(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all polar objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single polar object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_scene(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all scene objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single scene object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_selection(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all selections that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single selection object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selections that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selections that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_shape(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all shapes that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single shape object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shapes that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shapes that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_smith(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all smith objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single smith object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_ternary(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all ternary objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single ternary object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_trace(fn, selector=None, row=None, col=None, secondary_y=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all traces that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single trace object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all traces are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each trace and those for which the function returned True will be in the selection. If an int N, the Nth trace matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
col (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
secondary_y (boolean or None (default None)) –
If True, only select traces associated with the secondary y-axis of the subplot.
If False, only select traces associated with the primary y-axis of the subplot.
If None (the default), do not filter traces based on secondary y-axis.
To select traces by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_xaxis(fn, selector=None, row=None, col=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all xaxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single xaxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_yaxis(fn, selector=None, row=None, col=None, secondary_y=None) → plotly.graph_objects._figure.Figure¶ Apply a function to all yaxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single yaxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
select_annotations(selector=None, row=None, col=None, secondary_y=None)¶ Select annotations from a particular subplot cell and/or annotations that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the annotations that satisfy all of the specified selection criteria
- Return type
generator
-
select_coloraxes(selector=None, row=None, col=None)¶ Select coloraxis subplot objects from a particular subplot cell and/or coloraxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
- Returns
Generator that iterates through all of the coloraxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_geos(selector=None, row=None, col=None)¶ Select geo subplot objects from a particular subplot cell and/or geo subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
- Returns
Generator that iterates through all of the geo objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_layout_images(selector=None, row=None, col=None, secondary_y=None)¶ Select images from a particular subplot cell and/or images that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the images that satisfy all of the specified selection criteria
- Return type
generator
-
select_legends(selector=None, row=None, col=None)¶ Select legend subplot objects from a particular subplot cell and/or legend subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
- Returns
Generator that iterates through all of the legend objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_mapboxes(selector=None, row=None, col=None)¶ Select mapbox subplot objects from a particular subplot cell and/or mapbox subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
- Returns
Generator that iterates through all of the mapbox objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_maps(selector=None, row=None, col=None)¶ Select map subplot objects from a particular subplot cell and/or map subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
- Returns
Generator that iterates through all of the map objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_polars(selector=None, row=None, col=None)¶ Select polar subplot objects from a particular subplot cell and/or polar subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
- Returns
Generator that iterates through all of the polar objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_scenes(selector=None, row=None, col=None)¶ Select scene subplot objects from a particular subplot cell and/or scene subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
- Returns
Generator that iterates through all of the scene objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_selections(selector=None, row=None, col=None, secondary_y=None)¶ Select selections from a particular subplot cell and/or selections that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the selections that satisfy all of the specified selection criteria
- Return type
generator
-
select_shapes(selector=None, row=None, col=None, secondary_y=None)¶ Select shapes from a particular subplot cell and/or shapes that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the shapes that satisfy all of the specified selection criteria
- Return type
generator
-
select_smiths(selector=None, row=None, col=None)¶ Select smith subplot objects from a particular subplot cell and/or smith subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
- Returns
Generator that iterates through all of the smith objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_ternaries(selector=None, row=None, col=None)¶ Select ternary subplot objects from a particular subplot cell and/or ternary subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
- Returns
Generator that iterates through all of the ternary objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_xaxes(selector=None, row=None, col=None)¶ Select xaxis subplot objects from a particular subplot cell and/or xaxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
- Returns
Generator that iterates through all of the xaxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_yaxes(selector=None, row=None, col=None, secondary_y=None)¶ Select yaxis subplot objects from a particular subplot cell and/or yaxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the yaxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
set_subplots(rows=None, cols=None, **make_subplots_args) → plotly.graph_objects._figure.Figure¶ Add subplots to this figure. If the figure already contains subplots, then this throws an error. Accepts any keyword arguments that plotly.subplots.make_subplots accepts.
-
update(dict1=None, overwrite=False, **kwargs) → plotly.graph_objects._figure.Figure¶ Update the properties of the figure with a dict and/or with keyword arguments.
This recursively updates the structure of the figure object with the values in the input dict / keyword arguments.
- Parameters
dict1 (dict) – Dictionary of properties to be updated
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
kwargs – Keyword/value pair of properties to be updated
Examples
>>> import plotly.graph_objects as go >>> fig = go.Figure(data=[{'y': [1, 2, 3]}]) >>> fig.update(data=[{'y': [4, 5, 6]}]) Figure(...) >>> fig.to_plotly_json() {'data': [{'type': 'scatter', 'uid': 'e86a7c7a-346a-11e8-8aa8-a0999b0c017b', 'y': array([4, 5, 6], dtype=int32)}], 'layout': {}}
>>> fig = go.Figure(layout={'xaxis': ... {'color': 'green', ... 'range': [0, 1]}}) >>> fig.update({'layout': {'xaxis': {'color': 'pink'}}}) Figure(...) >>> fig.to_plotly_json() {'data': [], 'layout': {'xaxis': {'color': 'pink', 'range': [0, 1]}}}
- Returns
Updated figure
- Return type
-
update_annotations(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all annotations that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all annotations that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected annotation. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_coloraxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all coloraxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all coloraxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
**kwargs – Additional property updates to apply to each selected coloraxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_geos(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all geo objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all geo objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
**kwargs – Additional property updates to apply to each selected geo object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_layout(dict1=None, overwrite=False, **kwargs) → plotly.graph_objects._figure.Figure¶ Update the properties of the figure’s layout with a dict and/or with keyword arguments.
This recursively updates the structure of the original layout with the values in the input dict / keyword arguments.
- Parameters
dict1 (dict) – Dictionary of properties to be updated
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
kwargs – Keyword/value pair of properties to be updated
- Returns
The Figure object that the update_layout method was called on
- Return type
-
update_layout_images(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all images that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all images that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected image. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_legends(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all legend objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all legend objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
**kwargs – Additional property updates to apply to each selected legend object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_mapboxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all mapbox objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all mapbox objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
**kwargs – Additional property updates to apply to each selected mapbox object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_maps(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all map objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all map objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
**kwargs – Additional property updates to apply to each selected map object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_polars(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all polar objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all polar objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
**kwargs – Additional property updates to apply to each selected polar object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_scenes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all scene objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all scene objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
**kwargs – Additional property updates to apply to each selected scene object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_selections(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all selections that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all selections that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected selection. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_shapes(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all shapes that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all shapes that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected shape. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_smiths(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all smith objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all smith objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
**kwargs – Additional property updates to apply to each selected smith object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_ternaries(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all ternary objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all ternary objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
**kwargs – Additional property updates to apply to each selected ternary object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_traces(patch=None, selector=None, row=None, col=None, secondary_y=None, overwrite=False, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all traces that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all traces that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all traces are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each trace and those for which the function returned True will be in the selection. If an int N, the Nth trace matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
col (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
secondary_y (boolean or None (default None)) –
If True, only select traces associated with the secondary y-axis of the subplot.
If False, only select traces associated with the primary y-axis of the subplot.
If None (the default), do not filter traces based on secondary y-axis.
To select traces by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
**kwargs – Additional property updates to apply to each selected trace. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_xaxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all xaxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all xaxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
**kwargs – Additional property updates to apply to each selected xaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_yaxes(patch=None, selector=None, overwrite=False, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figure.Figure¶ Perform a property update operation on all yaxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all yaxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected yaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
-
class
plotly.graph_objects.FigureWidget(**kwargs: Any)¶ Bases:
plotly.basewidget.BaseFigureWidget-
add_annotation(arg=None, align=None, arrowcolor=None, arrowhead=None, arrowside=None, arrowsize=None, arrowwidth=None, ax=None, axref=None, ay=None, ayref=None, bgcolor=None, bordercolor=None, borderpad=None, borderwidth=None, captureevents=None, clicktoshow=None, font=None, height=None, hoverlabel=None, hovertext=None, name=None, opacity=None, showarrow=None, standoff=None, startarrowhead=None, startarrowsize=None, startstandoff=None, templateitemname=None, text=None, textangle=None, valign=None, visible=None, width=None, x=None, xanchor=None, xclick=None, xref=None, xshift=None, y=None, yanchor=None, yclick=None, yref=None, yshift=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Create and add a new annotation to the figure’s layout
- Parameters
arg – instance of Annotation or dict with compatible properties
align – Sets the horizontal alignment of the
textwithin the box. Has an effect only iftextspans two or more lines (i.e.textcontains one or more <br> HTML tags) or if an explicit width is set to override the text width.arrowcolor – Sets the color of the annotation arrow.
arrowhead – Sets the end annotation arrow head style.
arrowside – Sets the annotation arrow head position.
arrowsize – Sets the size of the end annotation arrow head, relative to
arrowwidth. A value of 1 (default) gives a head about 3x as wide as the line.arrowwidth – Sets the width (in px) of annotation arrow line.
ax – Sets the x component of the arrow tail about the arrow head. If
axrefispixel, a positive (negative) component corresponds to an arrow pointing from right to left (left to right). Ifaxrefis notpixeland is exactly the same asxref, this is an absolute value on that axis, likex, specified in the same coordinates asxref.axref – Indicates in what coordinates the tail of the annotation (ax,ay) is specified. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis. In order for absolute positioning of the arrow to work, “axref” must be exactly the same as “xref”, otherwise “axref” will revert to “pixel” (explained next). For relative positioning, “axref” can be set to “pixel”, in which case the “ax” value is specified in pixels relative to “x”. Absolute positioning is useful for trendline annotations which should continue to indicate the correct trend when zoomed. Relative positioning is useful for specifying the text offset for an annotated point.ay – Sets the y component of the arrow tail about the arrow head. If
ayrefispixel, a positive (negative) component corresponds to an arrow pointing from bottom to top (top to bottom). Ifayrefis notpixeland is exactly the same asyref, this is an absolute value on that axis, likey, specified in the same coordinates asyref.ayref – Indicates in what coordinates the tail of the annotation (ax,ay) is specified. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis. In order for absolute positioning of the arrow to work, “ayref” must be exactly the same as “yref”, otherwise “ayref” will revert to “pixel” (explained next). For relative positioning, “ayref” can be set to “pixel”, in which case the “ay” value is specified in pixels relative to “y”. Absolute positioning is useful for trendline annotations which should continue to indicate the correct trend when zoomed. Relative positioning is useful for specifying the text offset for an annotated point.bgcolor – Sets the background color of the annotation.
bordercolor – Sets the color of the border enclosing the annotation
text.borderpad – Sets the padding (in px) between the
textand the enclosing border.borderwidth – Sets the width (in px) of the border enclosing the annotation
text.captureevents – Determines whether the annotation text box captures mouse move and click events, or allows those events to pass through to data points in the plot that may be behind the annotation. By default
captureeventsis False unlesshovertextis provided. If you use the eventplotly_clickannotationwithouthovertextyou must explicitly enablecaptureevents.clicktoshow – Makes this annotation respond to clicks on the plot. If you click a data point that exactly matches the
xandyvalues of this annotation, and it is hidden (visible: false), it will appear. In “onoff” mode, you must click the same point again to make it disappear, so if you click multiple points, you can show multiple annotations. In “onout” mode, a click anywhere else in the plot (on another data point or not) will hide this annotation. If you need to show/hide this annotation in response to differentxoryvalues, you can setxclickand/oryclick. This is useful for example to label the side of a bar. To label markers though,standoffis preferred overxclickandyclick.font – Sets the annotation text font.
height – Sets an explicit height for the text box. null (default) lets the text set the box height. Taller text will be clipped.
hoverlabel –
plotly.graph_objects.layout.annotation.Hoverlab elinstance or dict with compatible propertieshovertext – Sets text to appear when hovering over this annotation. If omitted or blank, no hover label will appear.
name – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the annotation (text + arrow).
showarrow – Determines whether or not the annotation is drawn with an arrow. If True,
textis placed near the arrow’s tail. If False,textlines up with thexandyprovided.standoff – Sets a distance, in pixels, to move the end arrowhead away from the position it is pointing at, for example to point at the edge of a marker independent of zoom. Note that this shortens the arrow from the
ax/ayvector, in contrast toxshift/yshiftwhich moves everything by this amount.startarrowhead – Sets the start annotation arrow head style.
startarrowsize – Sets the size of the start annotation arrow head, relative to
arrowwidth. A value of 1 (default) gives a head about 3x as wide as the line.startstandoff – Sets a distance, in pixels, to move the start arrowhead away from the position it is pointing at, for example to point at the edge of a marker independent of zoom. Note that this shortens the arrow from the
ax/ayvector, in contrast toxshift/yshiftwhich moves everything by this amount.templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.text – Sets the text associated with this annotation. Plotly uses a subset of HTML tags to do things like newline (
<br>), bold (<b></b>), italics (<i></i>), hyperlinks (<a href='...'></a>). Tags<em>,<sup>,<sub>,<s>,<u>, and<span>are also supported.textangle – Sets the angle at which the
textis drawn with respect to the horizontal.valign – Sets the vertical alignment of the
textwithin the box. Has an effect only if an explicit height is set to override the text height.visible – Determines whether or not this annotation is visible.
width – Sets an explicit width for the text box. null (default) lets the text set the box width. Wider text will be clipped. There is no automatic wrapping; use <br> to start a new line.
x – Sets the annotation’s x position. If the axis
typeis “log”, then you must take the log of your desired range. If the axistypeis “date”, it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axistypeis “category”, it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.xanchor – Sets the text box’s horizontal position anchor This anchor binds the
xposition to the “left”, “center” or “right” of the annotation. For example, ifxis set to 1,xrefto “paper” andxanchorto “right” then the right-most portion of the annotation lines up with the right-most edge of the plotting area. If “auto”, the anchor is equivalent to “center” for data- referenced annotations or if there is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side.xclick – Toggle this annotation when clicking a data point whose
xvalue isxclickrather than the annotation’sxvalue.xref – Sets the annotation’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.xshift – Shifts the position of the whole annotation and arrow to the right (positive) or left (negative) by this many pixels.
y – Sets the annotation’s y position. If the axis
typeis “log”, then you must take the log of your desired range. If the axistypeis “date”, it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axistypeis “category”, it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.yanchor – Sets the text box’s vertical position anchor This anchor binds the
yposition to the “top”, “middle” or “bottom” of the annotation. For example, ifyis set to 1,yrefto “paper” andyanchorto “top” then the top-most portion of the annotation lines up with the top-most edge of the plotting area. If “auto”, the anchor is equivalent to “middle” for data-referenced annotations or if there is an arrow, whereas for paper- referenced with no arrow, the anchor picked corresponds to the closest side.yclick – Toggle this annotation when clicking a data point whose
yvalue isyclickrather than the annotation’syvalue.yref – Sets the annotation’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.yshift – Shifts the position of the whole annotation and arrow up (positive) or down (negative) by this many pixels.
row – Subplot row for annotation. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for annotation. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add annotation to secondary y-axis
exclude_empty_subplots – If True, annotation will not be added to subplots without traces.
- Returns
- Return type
-
add_bar(alignmentgroup=None, base=None, basesrc=None, cliponaxis=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Bar trace
The data visualized by the span of the bars is set in
yiforientationis set to “v” (the default) and the labels are set inx. By settingorientationto “h”, the roles are interchanged.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
base – Sets where the bar base is drawn (in position axis units). In “stack” or “relative” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
basesrc – Sets the source reference on Chart Studio Cloud for
base.cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.constraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.bar.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.bar.ErrorYinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.bar.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.bar.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.bar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selected –
plotly.graph_objects.bar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.bar.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesvalueandlabel.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.bar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_barpolar(base=None, basesrc=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetsrc=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textsrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, widthsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Barpolar trace
The data visualized by the radial span of the bars is set in
r- Parameters
base – Sets where the bar base is drawn (in radial axis units). In “stack” barmode, traces that set “base” will be excluded and drawn in “overlay” mode instead.
basesrc – Sets the source reference on Chart Studio Cloud for
base.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.barpolar.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.barpolar.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.barpolar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the angular position where the bar is drawn (in “thetatunit” units).
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.barpolar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.barpolar.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
textsrc – Sets the source reference on Chart Studio Cloud for
text.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.barpolar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar angular width (in “thetaunit” units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_box(alignmentgroup=None, boxmean=None, boxpoints=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lowerfence=None, lowerfencesrc=None, marker=None, mean=None, meansrc=None, median=None, mediansrc=None, meta=None, metasrc=None, name=None, notched=None, notchspan=None, notchspansrc=None, notchwidth=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, q1=None, q1src=None, q3=None, q3src=None, quartilemethod=None, sd=None, sdmultiple=None, sdsrc=None, selected=None, selectedpoints=None, showlegend=None, showwhiskers=None, sizemode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, upperfence=None, upperfencesrc=None, visible=None, whiskerwidth=None, width=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Box trace
Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second quartile (Q2, i.e. the median) is marked by a line inside the box. The fences grow outward from the boxes’ edges, by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1), The sample mean and standard deviation as well as notches and the sample, outlier and suspected outliers points can be optionally added to the box plot. The values and positions corresponding to each boxes can be input using two signatures. The first signature expects users to supply the sample values in the
ydata array for vertical boxes (xfor horizontal boxes). By supplying anx(y) array, one box per distinctx(y) value is drawn If nox(y) list is provided, a single box is drawn. In this case, the box is positioned with the tracenameor withx0(y0) if provided. The second signature expects users to supply the boxes corresponding Q1, median and Q3 statistics in theq1,medianandq3data arrays respectively. Other box features relying on statistics namelylowerfence,upperfence,notchspancan be set directly by the users. To have plotly compute them or to show sample points besides the boxes, users can set theydata array for vertical boxes (xfor horizontal boxes) to a 2D array with the outer length corresponding to the number of boxes in the traces and the inner length corresponding the sample size.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
boxmean – If True, the mean of the box(es)’ underlying distribution is drawn as a dashed line inside the box(es). If “sd” the standard deviation is also drawn. Defaults to True when
meanis set. Defaults to “sd” whensdis set Otherwise defaults to False.boxpoints – If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the box(es) are shown with no sample points Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set. Defaults to “all” under the q1/median/q3 signature. Otherwise defaults to “outliers”.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step for multi-box traces set using q1/median/q3.
dy – Sets the y coordinate step for multi-box traces set using q1/median/q3.
fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.box.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual boxes or sample points or both?
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.jitter – Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the box(es).
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.box.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.box.Lineinstance or dict with compatible propertieslowerfence – Sets the lower fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
lowerfenceis not provided but a sample (inyorx) is set, we compute the lower as the last sample point below 1.5 times the IQR.lowerfencesrc – Sets the source reference on Chart Studio Cloud for
lowerfence.marker –
plotly.graph_objects.box.Markerinstance or dict with compatible propertiesmean – Sets the mean values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
meanis not provided but a sample (inyorx) is set, we compute the mean for each box using the sample values.meansrc – Sets the source reference on Chart Studio Cloud for
mean.median – Sets the median values. There should be as many items as the number of boxes desired.
mediansrc – Sets the source reference on Chart Studio Cloud for
median.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categoricalnotched – Determines whether or not notches are drawn. Notches displays a confidence interval around the median. We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N), where IQR is the interquartile range and N is the sample size. If two boxes’ notches do not overlap there is 95% confidence their medians differ. See https://sites.google.com/site/davidsstatistics/home /notched-box-plots for more info. Defaults to False unless
notchwidthornotchspanis set.notchspan – Sets the notch span from the boxes’
medianvalues. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. Ifnotchspanis not provided but a sample (inyorx) is set, we compute it as 1.57 * IQR / sqrt(N), where N is the sample size.notchspansrc – Sets the source reference on Chart Studio Cloud for
notchspan.notchwidth – Sets the width of the notches relative to the box width. For example, with 0, the notches are as wide as the box(es).
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the box(es). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
pointpos – Sets the position of the sample points in relation to the box(es). If 0, the sample points are places over the center of the box(es). Positive (negative) values correspond to positions to the right (left) for vertical boxes and above (below) for horizontal boxes
q1 – Sets the Quartile 1 values. There should be as many items as the number of boxes desired.
q1src – Sets the source reference on Chart Studio Cloud for
q1.q3 – Sets the Quartile 3 values. There should be as many items as the number of boxes desired.
q3src – Sets the source reference on Chart Studio Cloud for
q3.quartilemethod – Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
sd – Sets the standard deviation values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
sdis not provided but a sample (inyorx) is set, we compute the standard deviation for each box using the sample values.sdmultiple – Scales the box size when sizemode=sd Allowing boxes to be drawn across any stddev range For example 1-stddev, 3-stddev, 5-stddev
sdsrc – Sets the source reference on Chart Studio Cloud for
sd.selected –
plotly.graph_objects.box.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showwhiskers – Determines whether or not whiskers are visible. Defaults to true for
sizemode“quartiles”, false for “sd”.sizemode – Sets the upper and lower bound for the boxes quartiles means box is drawn between Q1 and Q3 SD means the box is drawn between Mean +- Standard Deviation Argument sdmultiple (default 1) to scale the box size So it could be drawn 1-stddev, 3-stddev etc
stream –
plotly.graph_objects.box.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.box.Unselectedinstance or dict with compatible propertiesupperfence – Sets the upper fence values. There should be as many items as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature. If
upperfenceis not provided but a sample (inyorx) is set, we compute the upper as the last sample point above 1.5 times the IQR.upperfencesrc – Sets the source reference on Chart Studio Cloud for
upperfence.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
whiskerwidth – Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
width – Sets the width of the box in data coordinate If 0 (default value) the width is automatically selected based on the positions of other box traces in the same subplot.
x – Sets the x sample data or coordinates. See overview for more info.
x0 – Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y sample data or coordinates. See overview for more info.
y0 – Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_candlestick(close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, whiskerwidth=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Candlestick trace
The candlestick is a style of financial chart describing open, high, low and close for a given
xcoordinate (most likely time). The boxes represent the spread between theopenandclosevalues and the lines represent the spread between thelowandhighvalues Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red.- Parameters
close – Sets the close values.
closesrc – Sets the source reference on Chart Studio Cloud for
close.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.candlestick.Decreasinginstance or dict with compatible propertieshigh – Sets the high values.
highsrc – Sets the source reference on Chart Studio Cloud for
high.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.candlestick.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.candlestick.Increasinginstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.candlestick.Legendgrouptit leinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.candlestick.Lineinstance or dict with compatible propertieslow – Sets the low values.
lowsrc – Sets the source reference on Chart Studio Cloud for
low.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
open – Sets the open values.
opensrc – Sets the source reference on Chart Studio Cloud for
open.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.candlestick.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
whiskerwidth – Sets the width of the whiskers relative to the box width. For example, with 1, the whiskers are as wide as the box(es).
x – Sets the x coordinates. If absent, linear coordinate will be generated.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_carpet(a=None, a0=None, aaxis=None, asrc=None, b=None, b0=None, baxis=None, bsrc=None, carpet=None, cheaterslope=None, color=None, customdata=None, customdatasrc=None, da=None, db=None, font=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, stream=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xsrc=None, y=None, yaxis=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Carpet trace
The data describing carpet axis layout is set in
yand (optionally) alsox. If onlyyis present,xthe plot is interpreted as a cheater plot and is filled in using theyvalues.xandymay either be 2D arrays matching with each dimension matching that ofaandb, or they may be 1D arrays with total length equal to that ofaandb.- Parameters
a – An array containing values of the first parameter value
a0 – Alternate to
a. Builds a linear space of a coordinates. Use withdawherea0is the starting coordinate anddathe step.aaxis –
plotly.graph_objects.carpet.Aaxisinstance or dict with compatible propertiesasrc – Sets the source reference on Chart Studio Cloud for
a.b – A two dimensional array of y coordinates at each carpet point.
b0 – Alternate to
b. Builds a linear space of a coordinates. Use withdbwhereb0is the starting coordinate anddbthe step.baxis –
plotly.graph_objects.carpet.Baxisinstance or dict with compatible propertiesbsrc – Sets the source reference on Chart Studio Cloud for
b.carpet – An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they liecheaterslope – The shift applied to each successive row of data in creating a cheater plot. Only used if
xis been omitted.color – Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.da – Sets the a coordinate step. See
a0for more info.db – Sets the b coordinate step. See
b0for more info.font – The default font used for axis & tick labels on this carpet
ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.carpet.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
stream –
plotly.graph_objects.carpet.Streaminstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – A two dimensional array of x coordinates at each carpet point. If omitted, the plot is a cheater plot and the xaxis is hidden by default.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – A two dimensional array of y coordinates at each carpet point.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_choropleth(autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locationmode=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Choropleth trace
The data that describes the choropleth value-to-color mapping is set in
z. The geographic locations corresponding to each value inzare set inlocations.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choropleth.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.geo – Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.geojson – Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choropleth.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choropleth.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locationmode – The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.locations – Sets the coordinates via location IDs or names. See
locationmodefor more info.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choropleth.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choropleth.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choropleth.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choropleth.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_choroplethmap(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Choroplethmap trace
GeoJSON features to be filled are set in
geojsonThe data that describes the choropleth value-to-color mapping is set inlocationsandz.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmap traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choroplethmap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.geojson – Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choroplethmap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choroplethmap.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locations – Sets which features found in “geojson” to plot using their feature
idfield.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choroplethmap.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choroplethmap.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choroplethmap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choroplethmap.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_choroplethmapbox(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, featureidkey=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, locations=None, locationssrc=None, marker=None, meta=None, metasrc=None, name=None, reversescale=None, selected=None, selectedpoints=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Choroplethmapbox trace
“choroplethmapbox” trace is deprecated! Please consider switching to the “choroplethmap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ GeoJSON features to be filled are set ingeojsonThe data that describes the choropleth value-to-color mapping is set inlocationsandz.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the choropleth polygons will be inserted before the layer with the specified ID. By default, choroplethmapbox traces are placed above the water layers. If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.choroplethmapbox.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Support nested property, for example “properties.name”.geojson – Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.choroplethmapbox.Hoverlabe linstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablepropertiesAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.choroplethmapbox.Legendgro uptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
locations – Sets which features found in “geojson” to plot using their feature
idfield.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.marker –
plotly.graph_objects.choroplethmapbox.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.selected –
plotly.graph_objects.choroplethmapbox.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.choroplethmapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets the text elements associated with each location.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.choroplethmapbox.Unselecte dinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the color values.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_cone(anchor=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizemode=None, sizeref=None, stream=None, text=None, textsrc=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Cone trace
Use cone traces to visualize vector fields. Specify a vector field using 6 1D arrays, 3 position arrays
x,yandzand 3 vector component arraysu,v,w. The cones are drawn exactly at the positions given byx,yandz.- Parameters
anchor – Sets the cones’ anchor with respect to their x/y/z positions. Note that “cm” denote the cone’s center of mass which corresponds to 1/4 from the tail to tip.
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.cone.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.cone.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablenormAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.cone.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.cone.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.cone.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
sizemode – Determines whether
sizerefis set as a “scaled” (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as “absolute” value (in the same units as the vector field). To display sizes in actual vector length use “raw”.sizeref – Adjusts the cone size scaling. The size of the cones is determined by their u/v/w norm multiplied a factor and
sizeref. This factor (computed internally) corresponds to the minimum “time” to travel across two successive x/y/z positions at the average velocity of those two successive positions. All cones in a given trace use the same factor. Withsizemodeset to “raw”, its default value is 1. Withsizemodeset to “scaled”,sizerefis unitless, its default value is 0.5. Withsizemodeset to “absolute”,sizerefhas the same units as the u/v/w vector field, its the default value is half the sample’s maximum vector norm.stream –
plotly.graph_objects.cone.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with the cones. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.u – Sets the x components of the vector field.
uhoverformat – Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.usrc – Sets the source reference on Chart Studio Cloud for
u.v – Sets the y components of the vector field.
vhoverformat – Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
vsrc – Sets the source reference on Chart Studio Cloud for
v.w – Sets the z components of the vector field.
whoverformat – Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.wsrc – Sets the source reference on Chart Studio Cloud for
w.x – Sets the x coordinates of the vector field and of the displayed cones.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates of the vector field and of the displayed cones.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates of the vector field and of the displayed cones.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_contour(autocolorscale=None, autocontour=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, dx=None, dy=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Contour trace
The data from which contour lines are computed is set in
z. Data inzmust be a 2D list of numbers. Say thatzhas N rows and M columns, then by default, these N rows correspond to N y coordinates (set inyor auto-generated) and the M columns correspond to M x coordinates (set inxor auto- generated). By settingtransposeto True, the above behavior is flipped.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.contour.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array otherwise it is defaulted to false.contours –
plotly.graph_objects.contour.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.fillcolor – Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.contour.Hoverlabelinstance or dict with compatible propertieshoverongaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.contour.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.contour.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.contour.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textfont – For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.xtype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.ytype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_contourcarpet(a=None, a0=None, asrc=None, atype=None, autocolorscale=None, autocontour=None, b=None, b0=None, bsrc=None, btype=None, carpet=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, da=None, db=None, fillcolor=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, transpose=None, uid=None, uirevision=None, visible=None, xaxis=None, yaxis=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zorder=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Contourcarpet trace
Plots contours on either the first carpet axis or the carpet axis with a matching
carpetattribute. Datazis interpreted as matching that of the corresponding carpet axis.- Parameters
a – Sets the x coordinates.
a0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.asrc – Sets the source reference on Chart Studio Cloud for
a.atype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.b – Sets the y coordinates.
b0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.bsrc – Sets the source reference on Chart Studio Cloud for
b.btype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)carpet – The
carpetof the carpet axes on which this contour trace liescoloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.contourcarpet.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contours –
plotly.graph_objects.contourcarpet.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.da – Sets the x coordinate step. See
x0for more info.db – Sets the y coordinate step. See
y0for more info.fillcolor – Sets the fill color if
contours.typeis “constraint”. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.contourcarpet.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.contourcarpet.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.contourcarpet.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textsrc – Sets the source reference on Chart Studio Cloud for
text.transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_densitymap(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Densitymap trace
Draws a bivariate kernel density estimation with a Gaussian kernel from
lonandlatcoordinates and optionalzvalues using a colorscale.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the densitymap trace will be inserted before the layer with the specified ID. By default, densitymap traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.densitymap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.densitymap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.densitymap.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
radius – Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymap trace smoother, but less detailed.radiussrc – Sets the source reference on Chart Studio Cloud for
radius.reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.densitymap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_densitymapbox(autocolorscale=None, below=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lon=None, lonsrc=None, meta=None, metasrc=None, name=None, opacity=None, radius=None, radiussrc=None, reversescale=None, showlegend=None, showscale=None, stream=None, subplot=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, z=None, zauto=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Densitymapbox trace
“densitymapbox” trace is deprecated! Please consider switching to the “densitymap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ Draws a bivariate kernel density estimation with a Gaussian kernel fromlonandlatcoordinates and optionalzvalues using a colorscale.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.below – Determines if the densitymapbox trace will be inserted before the layer with the specified ID. By default, densitymapbox traces are placed below the first layer of type symbol If set to ‘’, the layer will be inserted above every existing layer.
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.densitymapbox.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.densitymapbox.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.densitymapbox.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
radius – Sets the radius of influence of one
lon/latpoint in pixels. Increasing the value makes the densitymapbox trace smoother, but less detailed.radiussrc – Sets the source reference on Chart Studio Cloud for
radius.reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.densitymapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
z – Sets the points’ weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_funnel(alignmentgroup=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Funnel trace
Visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a “drop-off” representation wherein each item appears in each stage it traversed. See also the “funnelarea” trace type for a different approach to visualizing funnel data.
- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connector –
plotly.graph_objects.funnel.Connectorinstance or dict with compatible propertiesconstraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.funnel.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPreviousandpercentTotal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.funnel.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.funnel.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the funnels. With “v” (“h”), the value of the each bar spans along the vertical (horizontal). By default funnels are tend to be oriented horizontally; unless only “y” array is presented or orientation is set to “v”. Also regarding graphs including only ‘horizontal’ funnels, “autorange” on the “y-axis” are set to “reversed”.
outsidetextfont – Sets the font used for
textlying outside the bar.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.funnel.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textinfo – Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPrevious,percentTotal,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_funnelarea(aspectratio=None, baseratio=None, customdata=None, customdatasrc=None, dlabel=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, scalegroup=None, showlegend=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Funnelarea trace
Visualize stages in a process using area-encoded trapezoids. This trace can be used to show data in a part-to-whole representation similar to a “pie” trace, wherein each item appears in a single stage. See also the “funnel” trace type for a different approach to visualizing funnel data.
- Parameters
aspectratio – Sets the ratio between height and width
baseratio – Sets the ratio between bottom length and maximum top length.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dlabel – Sets the label step. See
label0for more info.domain –
plotly.graph_objects.funnelarea.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.funnelarea.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.label0 – Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.labels – Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.funnelarea.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.funnelarea.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
scalegroup – If there are multiple funnelareas that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.funnelarea.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Specifies the location of the
textinfo.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.title –
plotly.graph_objects.funnelarea.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values of the sectors. If omitted, we count occurrences of each label.
valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_heatmap(autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xgap=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, ygap=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Heatmap trace
The data that describes the heatmap value-to-color mapping is set in
z. Data inzcan either be a 2D list of values (ragged or not) or a 1D array of values. In the case wherezis a 2D list, say thatzhas N rows and M columns. Then, by default, the resulting heatmap will have N partitions along the y axis and M partitions along the x axis. In other words, the i-th row/ j-th column cell inzis mapped to the i-th partition of the y axis (starting from the bottom of the plot) and the j-th partition of the x-axis (starting from the left of the plot). This behavior can be flipped by usingtranspose. Moreover,x(y) can be provided with M or M+1 (N or N+1) elements. If M (N), then the coordinates correspond to the center of the heatmap cells and the cells have equal width. If M+1 (N+1), then the coordinates correspond to the edges of the heatmap cells. In the case wherezis a 1D list, the x and y coordinates must be provided inxandyrespectively to form data triplets.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.heatmap.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array andzsmoothis not false; otherwise it is defaulted to false.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.heatmap.Hoverlabelinstance or dict with compatible propertieshoverongaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.heatmap.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.heatmap.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textfont – Sets the text font.
textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
transpose – Transposes the z data.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xgap – Sets the horizontal gap (in pixels) between bricks.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.xtype – If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.ygap – Sets the vertical gap (in pixels) between bricks.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.ytype – If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)z – Sets the z data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsmooth – Picks a smoothing algorithm use to smooth
zdata.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram(alignmentgroup=None, autobinx=None, autobiny=None, bingroup=None, cliponaxis=None, constraintext=None, cumulative=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, xaxis=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Histogram trace
The sample data from which statistics are computed is set in
xfor vertically spanning histograms and inyfor horizontally spanning histograms. Binning options are setxbinsandybinsrespectively if no aggregation data is provided.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.bingroup – Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same “orientation” under
barmode“stack”, “relative” and “group” are forced into the same bingroup, Usingbingroup, traces underbarmode“overlay” and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d* trace can share the samebingroupcliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.constraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
cumulative –
plotly.graph_objects.histogram.Cumulativeinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.error_x –
plotly.graph_objects.histogram.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.histogram.ErrorYinstance or dict with compatible propertieshistfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablebinNumberAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.histogram.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.histogram.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selected –
plotly.graph_objects.histogram.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.histogram.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the text font.
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.histogram.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbins –
plotly.graph_objects.histogram.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybins –
plotly.graph_objects.histogram.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram2d(autobinx=None, autobiny=None, autocolorscale=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xgap=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, ygap=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Histogram2d trace
The sample data from which statistics are computed is set in
xandy(wherexandyrepresent marginal distributions, binning is set inxbinsandybinsin this case) orz(wherezrepresent the 2D distribution and binning set, binning is set byxandyin this case). The resulting distribution is visualized as a heatmap.- Parameters
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.bingroup – Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.histogram2d.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.histfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram2d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.histogram2d.Legendgrouptit leinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.histogram2d.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.histogram2d.Streaminstance or dict with compatible propertiestextfont – Sets the text font.
texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableztexttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbingroup – Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroupxbins –
plotly.graph_objects.histogram2d.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xgap – Sets the horizontal gap (in pixels) between bricks.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybingroup – Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroupybins –
plotly.graph_objects.histogram2d.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.ygap – Sets the vertical gap (in pixels) between bricks.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the aggregation data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsmooth – Picks a smoothing algorithm use to smooth
zdata.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_histogram2dcontour(autobinx=None, autobiny=None, autocolorscale=None, autocontour=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Histogram2dContour trace
The sample data from which statistics are computed is set in
xandy(wherexandyrepresent marginal distributions, binning is set inxbinsandybinsin this case) orz(wherezrepresent the 2D distribution and binning set, binning is set byxandyin this case). The resulting distribution is visualized as a contour plot.- Parameters
autobinx – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.autobiny – Obsolete: since v1.42 each bin attribute is auto- determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.autocontour – Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.bingroup – Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.histogram2dcontour.ColorBa rinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contours –
plotly.graph_objects.histogram2dcontour.Contour sinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.histfunc – Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
histnorm – Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.histogram2dcontour.Hoverla belinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.histogram2dcontour.Legendg rouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.histogram2dcontour.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.histogram2dcontour.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
nbinsx – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.nbinsy – Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.ncontours – Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.opacity – Sets the opacity of the trace.
reversescale – Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.histogram2dcontour.Streaminstance or dict with compatible propertiestextfont – For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.texttemplate – For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the sample data to be binned on the x axis.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xbingroup – Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroupxbins –
plotly.graph_objects.histogram2dcontour.XBinsinstance or dict with compatible propertiesxcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the sample data to be binned on the y axis.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ybingroup – Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroupybins –
plotly.graph_objects.histogram2dcontour.YBinsinstance or dict with compatible propertiesycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the aggregation data.
zauto – Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.zmax – Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.zmid – Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.zmin – Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_hline(y, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a horizontal line to a plot or subplot that extends infinitely in the x-dimension.
- Parameters
y (float or int) – A number representing the y coordinate of the horizontal line.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the line. Example positions are “bottom left”, “right top”, “right”, “bottom”. If an annotation is added but annotation_position is not specified, this defaults to “top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_hrect(y0, y1, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a rectangle to a plot or subplot that extends infinitely in the x-dimension.
- Parameters
y0 (float or int) – A number representing the y coordinate of one side of the rectangle.
y1 (float or int) – A number representing the y coordinate of the other side of the rectangle.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["inside", "outside"], ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the rectangle. Example positions are “outside top left”, “inside bottom”, “right”, “inside left”, “inside” (“outside” is not supported). If an annotation is added but annotation_position is not specified this defaults to “inside top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_icicle(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Icicle trace
Visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. The icicle sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.icicle.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.icicle.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.leaf –
plotly.graph_objects.icicle.Leafinstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.icicle.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.icicle.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.pathbar –
plotly.graph_objects.icicle.Pathbarinstance or dict with compatible propertiesroot –
plotly.graph_objects.icicle.Rootinstance or dict with compatible propertiessort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.icicle.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Sets the positions of the
textelements.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.tiling –
plotly.graph_objects.icicle.Tilinginstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_image(colormodel=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, source=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x0=None, xaxis=None, y0=None, yaxis=None, z=None, zmax=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Image trace
Display an image, i.e. data on a 2D regular raster. By default, when an image is displayed in a subplot, its y axis will be reversed (ie.
autorange: 'reversed'), constrained to the domain (ie.constrain: 'domain') and it will have the same scale as its x axis (ie.scaleanchor: 'x,) in order for pixels to be rendered as squares.- Parameters
colormodel – Color model used to map the numerical color components described in
zinto colors. Ifsourceis specified, this attribute will be set torgba256otherwise it defaults torgb.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Set the pixel’s horizontal size.
dy – Set the pixel’s vertical size
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.image.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesz,colorandcolormodel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.image.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
source – Specifies the data URI of the image to be visualized. The URI consists of “data:image/[<media subtype>][;base64],<data>”
stream –
plotly.graph_objects.image.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each z value.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x0 – Set the image’s x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.y0 – Set the image’s y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.z – A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color.
zmax – Array defining the higher bound for each color component. Note that the default value will depend on the colormodel. For the
rgbcolormodel, it is [255, 255, 255]. For thergbacolormodel, it is [255, 255, 255, 1]. For thergba256colormodel, it is [255, 255, 255, 255]. For thehslcolormodel, it is [360, 100, 100]. For thehslacolormodel, it is [360, 100, 100, 1].zmin – Array defining the lower bound for each color component. Note that the default value will depend on the colormodel. For the
rgbcolormodel, it is [0, 0, 0]. For thergbacolormodel, it is [0, 0, 0, 0]. For thergba256colormodel, it is [0, 0, 0, 0]. For thehslcolormodel, it is [0, 0, 0]. For thehslacolormodel, it is [0, 0, 0, 0].zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.zsmooth – Picks a smoothing algorithm used to smooth
zdata. This only applies for image traces that use thesourceattribute.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_indicator(align=None, customdata=None, customdatasrc=None, delta=None, domain=None, gauge=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, mode=None, name=None, number=None, stream=None, title=None, uid=None, uirevision=None, value=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Indicator trace
An indicator is used to visualize a single
valuealong with some contextual information such asstepsor athreshold, using a combination of three visual elements: a number, a delta, and/or a gauge. Deltas are taken with respect to areference. Gauges can be either angular or bullet (aka linear) gauges.- Parameters
align – Sets the horizontal alignment of the
textwithin the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centeredcustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.delta –
plotly.graph_objects.indicator.Deltainstance or dict with compatible propertiesdomain –
plotly.graph_objects.indicator.Domaininstance or dict with compatible propertiesgauge – The gauge of the Indicator plot.
ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle – :class:`plotly.graph_objects.indicator.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines how the value is displayed on the graph.
numberdisplays the value numerically in text.deltadisplays the difference to a reference value in text. Finally,gaugedisplays the value graphically on an axis.name – Sets the trace name. The trace name appears as the legend item and on hover.
number –
plotly.graph_objects.indicator.Numberinstance or dict with compatible propertiesstream –
plotly.graph_objects.indicator.Streaminstance or dict with compatible propertiestitle –
plotly.graph_objects.indicator.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the number to be displayed.
visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_isosurface(autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Isosurface trace
Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the
value,x,yandzof every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.caps –
plotly.graph_objects.isosurface.Capsinstance or dict with compatible propertiescauto – Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.isosurface.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.isosurface.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.isosurface.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.isomax – Sets the maximum boundary for iso-surface plot.
isomin – Sets the minimum boundary for iso-surface plot.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.isosurface.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.isosurface.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.isosurface.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
slices –
plotly.graph_objects.isosurface.Slicesinstance or dict with compatible propertiesspaceframe –
plotly.graph_objects.isosurface.Spaceframeinstance or dict with compatible propertiesstream –
plotly.graph_objects.isosurface.Streaminstance or dict with compatible propertiessurface –
plotly.graph_objects.isosurface.Surfaceinstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the 4th dimension (value) of the vertices.
valuehoverformat – Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.valuesrc – Sets the source reference on Chart Studio Cloud for
value.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices on X axis.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices on Y axis.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices on Z axis.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_layout_image(arg=None, layer=None, name=None, opacity=None, sizex=None, sizey=None, sizing=None, source=None, templateitemname=None, visible=None, x=None, xanchor=None, xref=None, y=None, yanchor=None, yref=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Create and add a new image to the figure’s layout
- Parameters
arg – instance of Image or dict with compatible properties
layer – Specifies whether images are drawn below or above traces. When
xrefandyrefare both set topaper, image is drawn below the entire plot area.name – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the image.
sizex – Sets the image container size horizontally. The image will be sized based on the
positionvalue. Whenxrefis set topaper, units are sized relative to the plot width. Whenxrefends with ` domain`, units are sized relative to the axis width.sizey – Sets the image container size vertically. The image will be sized based on the
positionvalue. Whenyrefis set topaper, units are sized relative to the plot height. Whenyrefends with ` domain`, units are sized relative to the axis height.sizing – Specifies which dimension of the image to constrain.
source – Specifies the URL of the image to be used. The URL must be accessible from the domain where the plot code is run, and can be either relative or absolute.
templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.visible – Determines whether or not this image is visible.
x – Sets the image’s x position. When
xrefis set topaper, units are sized relative to the plot height. Seexreffor more infoxanchor – Sets the anchor for the x position
xref – Sets the images’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.y – Sets the image’s y position. When
yrefis set topaper, units are sized relative to the plot height. Seeyreffor more infoyanchor – Sets the anchor for the y position.
yref – Sets the images’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.row – Subplot row for image. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for image. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add image to secondary y-axis
exclude_empty_subplots – If True, image will not be added to subplots without traces.
- Returns
- Return type
-
add_mesh3d(alphahull=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, delaunayaxis=None, facecolor=None, facecolorsrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, i=None, ids=None, idssrc=None, intensity=None, intensitymode=None, intensitysrc=None, isrc=None, j=None, jsrc=None, k=None, ksrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, vertexcolor=None, vertexcolorsrc=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Mesh3d trace
Draws sets of triangles with coordinates given by three 1-dimensional arrays in
x,y,zand (1) a sets ofi,j,kindices (2) Delaunay triangulation or (3) the Alpha- shape algorithm or (4) the Convex-hull algorithm- Parameters
alphahull – Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the
x,yandzarrays, if thei,j,karrays are not supplied. For general use ofmesh3dit is preferred thati,j,kare supplied. If “-1”, Delaunay triangulation is used, which is mainly suitable if the mesh is a single, more or less layer surface that is perpendicular todelaunayaxis. In case thedelaunayaxisintersects the mesh surface at more than one point it will result triangles that are very long in the dimension ofdelaunayaxis. If “>0”, the alpha-shape algorithm is used. In this case, the positivealphahullvalue signals the use of the alpha-shape algorithm, _and_ its value acts as the parameter for the mesh fitting. If 0, the convex-hull algorithm is used. It is suitable for convex bodies or if the intention is to enclose thex,yandzpoint set into a convex hull.autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here
intensity) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
intensityand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asintensity. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
intensityand if set,cmaxmust be set as well.color – Sets the color of the whole mesh
coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.mesh3d.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.mesh3d.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.delaunayaxis – Sets the Delaunay axis, which is the axis that is perpendicular to the surface of the Delaunay triangulation. It has an effect if
i,j,kare not provided andalphahullis set to indicate Delaunay triangulation.facecolor – Sets the color of each face Overrides “color” and “vertexcolor”.
facecolorsrc – Sets the source reference on Chart Studio Cloud for
facecolor.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.mesh3d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.i – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “first” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherei[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inirepresents a point in space, which is the first vertex of a triangle.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.intensity – Sets the intensity values for vertices or cells as defined by
intensitymode. It can be used for plotting fields on meshes.intensitymode – Determines the source of
intensityvalues.intensitysrc – Sets the source reference on Chart Studio Cloud for
intensity.isrc – Sets the source reference on Chart Studio Cloud for
i.j – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “second” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherej[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element injrepresents a point in space, which is the second vertex of a triangle.jsrc – Sets the source reference on Chart Studio Cloud for
j.k – A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “third” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherek[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inkrepresents a point in space, which is the third vertex of a triangle.ksrc – Sets the source reference on Chart Studio Cloud for
k.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.mesh3d.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.mesh3d.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.mesh3d.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.mesh3d.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.vertexcolor – Sets the color of each vertex Overrides “color”. While Red, green and blue colors are in the range of 0 and 255; in the case of having vertex color data in RGBA format, the alpha color should be normalized to be between 0 and 1.
vertexcolorsrc – Sets the source reference on Chart Studio Cloud for
vertexcolor.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_ohlc(close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, tickwidth=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Ohlc trace
The ohlc (short for Open-High-Low-Close) is a style of financial chart describing open, high, low and close for a given
xcoordinate (most likely time). The tip of the lines represent thelowandhighvalues and the horizontal segments represent theopenandclosevalues. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing items are drawn in green whereas decreasing are drawn in red.- Parameters
close – Sets the close values.
closesrc – Sets the source reference on Chart Studio Cloud for
close.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.ohlc.Decreasinginstance or dict with compatible propertieshigh – Sets the high values.
highsrc – Sets the source reference on Chart Studio Cloud for
high.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.ohlc.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.ohlc.Increasinginstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.ohlc.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.ohlc.Lineinstance or dict with compatible propertieslow – Sets the low values.
lowsrc – Sets the source reference on Chart Studio Cloud for
low.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
open – Sets the open values.
opensrc – Sets the source reference on Chart Studio Cloud for
open.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.ohlc.Streaminstance or dict with compatible propertiestext – Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
textsrc – Sets the source reference on Chart Studio Cloud for
text.tickwidth – Sets the width of the open/close tick marks relative to the “x” minimal interval.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates. If absent, linear coordinate will be generated.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_parcats(arrangement=None, bundlecolors=None, counts=None, countssrc=None, dimensions=None, dimensiondefaults=None, domain=None, hoverinfo=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, labelfont=None, legendgrouptitle=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, sortpaths=None, stream=None, tickfont=None, uid=None, uirevision=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Parcats trace
Parallel categories diagram for multidimensional categorical data.
- Parameters
arrangement – Sets the drag interaction mode for categories and dimensions. If
perpendicular, the categories can only move along a line perpendicular to the paths. Iffreeform, the categories can freely move on the plane. Iffixed, the categories and dimensions are stationary.bundlecolors – Sort paths so that like colors are bundled together within each category.
counts – The number of observations represented by each state. Defaults to 1 so that each state represents one observation
countssrc – Sets the source reference on Chart Studio Cloud for
counts.dimensions – The dimensions (variables) of the parallel categories diagram.
dimensiondefaults – When used in a template (as layout.template.data.parcats.dimensiondefaults), sets the default property values to use for elements of parcats.dimensions
domain –
plotly.graph_objects.parcats.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoveron – Sets the hover interaction mode for the parcats diagram. If
category, hover interaction take place per category. Ifcolor, hover interactions take place per color per category. Ifdimension, hover interactions take place across all categories per dimension.hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescount,probability,category,categorycount,colorcountandbandcolorcount. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
labelfont – Sets the font for the
dimensionlabels.legendgrouptitle –
plotly.graph_objects.parcats.Legendgrouptitleinstance or dict with compatible propertieslegendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.parcats.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
sortpaths – Sets the path sorting algorithm. If
forward, sort paths based on dimension categories from left to right. Ifbackward, sort paths based on dimensions categories from right to left.stream –
plotly.graph_objects.parcats.Streaminstance or dict with compatible propertiestickfont – Sets the font for the
categorylabels.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_parcoords(customdata=None, customdatasrc=None, dimensions=None, dimensiondefaults=None, domain=None, ids=None, idssrc=None, labelangle=None, labelfont=None, labelside=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, rangefont=None, stream=None, tickfont=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Parcoords trace
Parallel coordinates for multidimensional exploratory data analysis. The samples are specified in
dimensions. The colors are set inline.color.- Parameters
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dimensions – The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported.
dimensiondefaults – When used in a template (as layout.template.data.parcoords.dimensiondefaults), sets the default property values to use for elements of parcoords.dimensions
domain –
plotly.graph_objects.parcoords.Domaininstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.labelangle – Sets the angle of the labels with respect to the horizontal. For example, a
tickangleof -90 draws the labels vertically. Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.labelfont – Sets the font for the
dimensionlabels.labelside – Specifies the location of the
label. “top” positions labels above, next to the title “bottom” positions labels below the graph Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle – :class:`plotly.graph_objects.parcoords.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.parcoords.Lineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
rangefont – Sets the font for the
dimensionrange values.stream –
plotly.graph_objects.parcoords.Streaminstance or dict with compatible propertiestickfont – Sets the font for the
dimensiontick values.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.parcoords.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_pie(automargin=None, customdata=None, customdatasrc=None, direction=None, dlabel=None, domain=None, hole=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, pull=None, pullsrc=None, rotation=None, scalegroup=None, showlegend=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Pie trace
A data visualized by the sectors of the pie is set in
values. The sector labels are set inlabels. The sector colors are set inmarker.colors- Parameters
automargin – Determines whether outside text labels can push the margins.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.direction – Specifies the direction at which succeeding sectors follow one another.
dlabel – Sets the label step. See
label0for more info.domain –
plotly.graph_objects.pie.Domaininstance or dict with compatible propertieshole – Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.pie.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.insidetextorientation – Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
label0 – Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.labels – Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.pie.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.pie.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector.pull – Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices.
pullsrc – Sets the source reference on Chart Studio Cloud for
pull.rotation – Instead of the first slice starting at 12 o’clock, rotate to some other angle.
scalegroup – If there are multiple pie charts that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
sort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.pie.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Specifies the location of the
textinfo.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.title –
plotly.graph_objects.pie.Titleinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values of the sectors. If omitted, we count occurrences of each label.
valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_sankey(arrangement=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, link=None, meta=None, metasrc=None, name=None, node=None, orientation=None, selectedpoints=None, stream=None, textfont=None, uid=None, uirevision=None, valueformat=None, valuesuffix=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Sankey trace
Sankey plots for network flow data analysis. The nodes are specified in
nodesand the links between sources and targets inlinks. The colors are set innodes[i].colorandlinks[i].color, otherwise defaults are used.- Parameters
arrangement – If value is
snap(the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified vianodepad. If value isperpendicular, the nodes can only move along a line perpendicular to the flow. If value isfreeform, the nodes can freely move on the plane. If value isfixed, the nodes are stationary.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.sankey.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired. Note that this attribute is superseded bynode.hoverinfoandnode.hoverinfofor nodes and links respectively.hoverlabel –
plotly.graph_objects.sankey.Hoverlabelinstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.sankey.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
link – The links of the Sankey plot.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
node – The nodes of the Sankey plot.
orientation – Sets the orientation of the Sankey diagram.
selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.stream –
plotly.graph_objects.sankey.Streaminstance or dict with compatible propertiestextfont – Sets the font for node labels
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.valueformat – Sets the value formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
valuesuffix – Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value.
visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatter(alignmentgroup=None, cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, fillgradient=None, fillpattern=None, groupnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, offsetgroup=None, opacity=None, orientation=None, selected=None, selectedpoints=None, showlegend=None, stackgaps=None, stackgroup=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scatter trace
The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts. The data visualized as scatter point or lines is set in
xandy. Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.scatter.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scatter.ErrorYinstance or dict with compatible propertiesfill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.
fillgradient – Sets a fill gradient. If not specified, the fillcolor is used instead.
fillpattern – Sets the pattern within the marker.
groupnorm – Only relevant when
stackgroupis used, and only the firstgroupnormfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the normalization for the sum of thisstackgroup. With “fraction”, the value of each trace at each location is divided by the sum of all trace values at that location. “percent” is the same but multiplied by 100 to show percentages. If there are multiple subplots, or multiple `stackgroup`s on one subplot, each will be normalized within its own set.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatter.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatter.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatter.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatter.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Only relevant in the following cases: 1. when
scattermodeis set to “group”. 2. whenstackgroupis used, and only the firstorientationfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the stacking direction. With “v” (“h”), the y (x) values of subsequent traces are added. Also affects the default value offill.selected –
plotly.graph_objects.scatter.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stackgaps – Only relevant when
stackgroupis used, and only the firststackgapsfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Determines how we handle locations at which other traces in this group have data but this one does not. With infer zero we insert a zero at these locations. With “interpolate” we linearly interpolate between existing values, and extrapolate a constant beyond the existing values.stackgroup – Set several scatter traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if
orientationis “h”). If blank or omitted this trace will not be stacked. Stacking also turnsfillon by default, using “tonexty” (“tonextx”) iforientationis “h” (“v”) and sets the defaultmodeto “lines” irrespective of point count. You can only stack on a numeric (linear or log) axis. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.stream –
plotly.graph_objects.scatter.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatter.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scatter3d(connectgaps=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, error_z=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, projection=None, scene=None, showlegend=None, stream=None, surfaceaxis=None, surfacecolor=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scatter3d trace
The data visualized as scatter point or lines in 3D dimension is set in
x,y,z. Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorProjections are achieved viaprojection. Surface fills are achieved viasurfaceaxis.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.error_x –
plotly.graph_objects.scatter3d.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scatter3d.ErrorYinstance or dict with compatible propertieserror_z –
plotly.graph_objects.scatter3d.ErrorZinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatter3d.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.scatter3d.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatter3d.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatter3d.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
projection –
plotly.graph_objects.scatter3d.Projectioninstance or dict with compatible propertiesscene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatter3d.Streaminstance or dict with compatible propertiessurfaceaxis – If “-1”, the scatter points are not fill with a surface If 0, 1, 2, the scatter points are filled with a Delaunay surface about the x, y, z respectively.
surfacecolor – Sets the surface fill color.
text – Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates.
zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattercarpet(a=None, asrc=None, b=None, bsrc=None, carpet=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxis=None, yaxis=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattercarpet trace
Plots a scatter trace on either the first carpet axis or the carpet axis with a matching
carpetattribute.- Parameters
a – Sets the a-axis coordinates.
asrc – Sets the source reference on Chart Studio Cloud for
a.b – Sets the b-axis coordinates.
bsrc – Sets the source reference on Chart Studio Cloud for
b.carpet – An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they lieconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattercarpet.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattercarpet.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattercarpet.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattercarpet.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattercarpet.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattercarpet.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,bandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattercarpet.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scattergeo(connectgaps=None, customdata=None, customdatasrc=None, featureidkey=None, fill=None, fillcolor=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, locationmode=None, locations=None, locationssrc=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattergeo trace
The data visualized as scatter point or lines on a geographic map is provided either by longitude/latitude pairs in
lonandlatrespectively or by geographic location IDs or names inlocations.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.featureidkey – Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
geo – Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.geojson – Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used when
locationsis set. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattergeo.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. To be seen, tracehoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattergeo.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattergeo.Lineinstance or dict with compatible propertieslocationmode – The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.locations – Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See
locationmodefor more info.locationssrc – Sets the source reference on Chart Studio Cloud for
locations.lon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattergeo.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattergeo.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattergeo.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lon,locationandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattergeo.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattergl(connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattergl trace
The data visualized as scatter point or lines is set in
xandyusing the WebGL plotting engine. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto a numerical arrays.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.error_x –
plotly.graph_objects.scattergl.ErrorXinstance or dict with compatible propertieserror_y –
plotly.graph_objects.scattergl.ErrorYinstance or dict with compatible propertiesfill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattergl.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.scattergl.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattergl.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattergl.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace.
name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattergl.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattergl.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattergl.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_scattermap(below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattermap trace
The data visualized as scatter point, lines or marker symbols on a MapLibre GL geographic map is provided by longitude/latitude pairs in
lonandlat.- Parameters
below – Determines if this scattermap trace’s layers are to be inserted before the layer with the specified ID. By default, scattermap layers are inserted above all the base layers. To place the scattermap layers above every other layer, set
belowto “’’”.cluster –
plotly.graph_objects.scattermap.Clusterinstance or dict with compatible propertiesconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattermap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattermap.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattermap.Lineinstance or dict with compatible propertieslon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattermap.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattermap.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattermap.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the icon text font (color=map.layer.paint.text- color, size=map.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattermap.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattermapbox(below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattermapbox trace
“scattermapbox” trace is deprecated! Please consider switching to the “scattermap” trace type and
mapsubplots. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs inlonandlat.- Parameters
below – Determines if this scattermapbox trace’s layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set
belowto “’’”.cluster –
plotly.graph_objects.scattermapbox.Clusterinstance or dict with compatible propertiesconnectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattermapbox.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.lat – Sets the latitude coordinates (in degrees North).
latsrc – Sets the source reference on Chart Studio Cloud for
lat.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattermapbox.Legendgroupt itleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattermapbox.Lineinstance or dict with compatible propertieslon – Sets the longitude coordinates (in degrees East).
lonsrc – Sets the source reference on Chart Studio Cloud for
lon.marker –
plotly.graph_objects.scattermapbox.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scattermapbox.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattermapbox.Streaminstance or dict with compatible propertiessubplot – mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre- migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.text – Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the icon text font (color=mapbox.layer.paint.text- color, size=mapbox.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattermapbox.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterpolar(cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scatterpolar trace
The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts in polar coordinates. The data visualized as scatter point or lines is set in
r(radial) andtheta(angular) coordinates Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterpolar has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterpolar.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterpolar.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterpolar.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterpolar.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.scatterpolar.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterpolar.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterpolar.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterpolargl(connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scatterpolargl trace
The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts in polar coordinates using the WebGL plotting engine. The data visualized as scatter point or lines is set in
r(radial) andtheta(angular) coordinates Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.dr – Sets the r coordinate step.
dtheta – Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.fill – Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterpolargl.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterpolargl.Legendgroup titleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterpolargl.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterpolargl.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
r – Sets the radial coordinates
r0 – Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.rsrc – Sets the source reference on Chart Studio Cloud for
r.selected –
plotly.graph_objects.scatterpolargl.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterpolargl.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.theta – Sets the angular coordinates
theta0 – Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.thetasrc – Sets the source reference on Chart Studio Cloud for
theta.thetaunit – Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterpolargl.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scattersmith(cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, imag=None, imagsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, real=None, realsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scattersmith trace
The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts in smith coordinates. The data visualized as scatter point or lines is set in
realandimag(imaginary) coordinates Text (appearing either on the chart or on hover only) is viatext. Bubble charts are achieved by settingmarker.sizeand/ormarker.colorto numerical arrays.- Parameters
cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scattersmith has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scattersmith.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.imag – Sets the imaginary component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
imagsrc – Sets the source reference on Chart Studio Cloud for
imag.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scattersmith.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scattersmith.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scattersmith.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
real – Sets the real component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
realsrc – Sets the source reference on Chart Studio Cloud for
real.selected –
plotly.graph_objects.scattersmith.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scattersmith.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a smith subplot. If “smith” (the default value), the data refer to
layout.smith. If “smith2”, the data refer tolayout.smith2, and so on.text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesreal,imagandtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scattersmith.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_scatterternary(a=None, asrc=None, b=None, bsrc=None, c=None, cliponaxis=None, connectgaps=None, csrc=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, sum=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Scatterternary trace
Provides similar functionality to the “scatter” type but on a ternary phase diagram. The data is provided by at least two arrays out of
a,b,ctriplets.- Parameters
a – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.asrc – Sets the source reference on Chart Studio Cloud for
a.b – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.bsrc – Sets the source reference on Chart Studio Cloud for
b.c – Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.cliponaxis – Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
csrc – Sets the source reference on Chart Studio Cloud for
c.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fill – Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.scatterternary.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.scatterternary.Legendgroup titleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.scatterternary.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.scatterternary.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.mode – Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.scatterternary.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.scatterternary.Streaminstance or dict with compatible propertiessubplot – Sets a reference between this trace’s data coordinates and a ternary subplot. If “ternary” (the default value), the data refer to
layout.ternary. If “ternary2”, the data refer tolayout.ternary2, and so on.sum – The number each triplet should sum to, if only two of
a,b, andcare provided. This overridesternary<i>.sumto normalize this specific trace, but does not affect the values displayed on the axes. 0 (or missing) means to use ternary<i>.sumtext – Sets text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the text font.
textposition – Sets the positions of the
textelements with respects to the (x,y) coordinates.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,b,candtext.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.scatterternary.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_selection(arg=None, line=None, name=None, opacity=None, path=None, templateitemname=None, type=None, x0=None, x1=None, xref=None, y0=None, y1=None, yref=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Create and add a new selection to the figure’s layout
- Parameters
arg – instance of Selection or dict with compatible properties
line –
plotly.graph_objects.layout.selection.Lineinstance or dict with compatible propertiesname – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the selection.
path – For
type“path” - a valid SVG path similar toshapes.pathin data coordinates. Allowed segments are: M, L and Z.templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.type – Specifies the selection type to be drawn. If “rect”, a rectangle is drawn linking (
x0,`y0`), (x1,`y0`), (x1,`y1`) and (x0,`y1`). If “path”, draw a custom SVG path usingpath.x0 – Sets the selection’s starting x position.
x1 – Sets the selection’s end x position.
xref – Sets the selection’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.y0 – Sets the selection’s starting y position.
y1 – Sets the selection’s end y position.
yref – Sets the selection’s x coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.row – Subplot row for selection. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for selection. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add selection to secondary y-axis
exclude_empty_subplots – If True, selection will not be added to subplots without traces.
- Returns
- Return type
-
add_shape(arg=None, editable=None, fillcolor=None, fillrule=None, label=None, layer=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, name=None, opacity=None, path=None, showlegend=None, templateitemname=None, type=None, visible=None, x0=None, x0shift=None, x1=None, x1shift=None, xanchor=None, xref=None, xsizemode=None, y0=None, y0shift=None, y1=None, y1shift=None, yanchor=None, yref=None, ysizemode=None, row=None, col=None, secondary_y=None, exclude_empty_subplots=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Create and add a new shape to the figure’s layout
- Parameters
arg – instance of Shape or dict with compatible properties
editable – Determines whether the shape could be activated for edit or not. Has no effect when the older editable shapes mode is enabled via
config.editableorconfig.edits.shapePosition.fillcolor – Sets the color filling the shape’s interior. Only applies to closed shapes.
fillrule – Determines which regions of complex paths constitute the interior. For more info please visit https://developer.mozilla.org/en- US/docs/Web/SVG/Attribute/fill-rule
label –
plotly.graph_objects.layout.shape.Labelinstance or dict with compatible propertieslayer – Specifies whether shapes are drawn below gridlines (“below”), between gridlines and traces (“between”) or above traces (“above”).
legend – Sets the reference to a legend to show this shape in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this shape. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.layout.shape.Legendgroupti tleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this shape. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this shape.
line –
plotly.graph_objects.layout.shape.Lineinstance or dict with compatible propertiesname – When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto hide it). Has no effect outside of a template.opacity – Sets the opacity of the shape.
path – For
type“path” - a valid SVG path with the pixel values replaced by data values inxsizemode/ysizemodebeing “scaled” and taken unmodified as pixels relative toxanchorandyanchorin case of “pixel” size mode. There are a few restrictions / quirks only absolute instructions, not relative. So the allowed segments are: M, L, H, V, Q, C, T, S, and Z arcs (A) are not allowed because radius rx and ry are relative. In the future we could consider supporting relative commands, but we would have to decide on how to handle date and log axes. Note that even as is, Q and C Bezier paths that are smooth on linear axes may not be smooth on log, and vice versa. no chained “polybezier” commands - specify the segment type for each one. On category axes, values are numbers scaled to the serial numbers of categories because using the categories themselves there would be no way to describe fractional positions On data axes: because space and T are both normal components of path strings, we can’t use either to separate date from time parts. Therefore we’ll use underscore for this purpose: 2015-02-21_13:45:56.789showlegend – Determines whether or not this shape is shown in the legend.
templateitemname – Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true.type – Specifies the shape type to be drawn. If “line”, a line is drawn from (
x0,`y0`) to (x1,`y1`) with respect to the axes’ sizing mode. If “circle”, a circle is drawn from ((x0`+`x1)/2, (y0`+`y1)/2)) with radius (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with respect to the axes’ sizing mode. If “rect”, a rectangle is drawn linking (x0,`y0`), (x1,`y0`), (x1,`y1`), (x0,`y1`), (x0,`y0`) with respect to the axes’ sizing mode. If “path”, draw a custom SVG path usingpath. with respect to the axes’ sizing mode.visible – Determines whether or not this shape is visible. If “legendonly”, the shape is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x0 – Sets the shape’s starting x position. See
typeandxsizemodefor more info.x0shift – Shifts
x0away from the center of the category whenxrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.x1 – Sets the shape’s end x position. See
typeandxsizemodefor more info.x1shift – Shifts
x1away from the center of the category whenxrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.xanchor – Only relevant in conjunction with
xsizemodeset to “pixel”. Specifies the anchor point on the x axis to whichx0,x1and x coordinates withinpathare relative to. E.g. useful to attach a pixel sized shape to a certain data value. No effect whenxsizemodenot set to “pixel”.xref – Sets the shape’s x coordinate axis. If set to a x axis id (e.g. “x” or “x2”), the
xposition refers to a x coordinate. If set to “paper”, thexposition refers to the distance from the left of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right). If set to a x axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., x2 domain refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.xsizemode – Sets the shapes’s sizing mode along the x axis. If set to “scaled”,
x0,x1and x coordinates withinpathrefer to data values on the x axis or a fraction of the plot area’s width (xrefset to “paper”). If set to “pixel”,xanchorspecifies the x position in terms of data or plot fraction butx0,x1and x coordinates withinpathare pixels relative toxanchor. This way, the shape can have a fixed width while maintaining a position relative to data or plot fraction.y0 – Sets the shape’s starting y position. See
typeandysizemodefor more info.y0shift – Shifts
y0away from the center of the category whenyrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.y1 – Sets the shape’s end y position. See
typeandysizemodefor more info.y1shift – Shifts
y1away from the center of the category whenyrefis a “category” or “multicategory” axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.yanchor – Only relevant in conjunction with
ysizemodeset to “pixel”. Specifies the anchor point on the y axis to whichy0,y1and y coordinates withinpathare relative to. E.g. useful to attach a pixel sized shape to a certain data value. No effect whenysizemodenot set to “pixel”.yref – Sets the shape’s y coordinate axis. If set to a y axis id (e.g. “y” or “y2”), the
yposition refers to a y coordinate. If set to “paper”, theyposition refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top). If set to a y axis ID followed by “domain” (separated by a space), the position behaves like for “paper”, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., y2 domain refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.ysizemode – Sets the shapes’s sizing mode along the y axis. If set to “scaled”,
y0,y1and y coordinates withinpathrefer to data values on the y axis or a fraction of the plot area’s height (yrefset to “paper”). If set to “pixel”,yanchorspecifies the y position in terms of data or plot fraction buty0,y1and y coordinates withinpathare pixels relative toyanchor. This way, the shape can have a fixed height while maintaining a position relative to data or plot fraction.row – Subplot row for shape. If ‘all’, addresses all rows in the specified column(s).
col – Subplot column for shape. If ‘all’, addresses all columns in the specified row(s).
secondary_y – Whether to add shape to secondary y-axis
exclude_empty_subplots – If True, shape will not be added to subplots without traces.
- Returns
- Return type
-
add_splom(customdata=None, customdatasrc=None, diagonal=None, dimensions=None, dimensiondefaults=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, showlowerhalf=None, showupperhalf=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxes=None, xhoverformat=None, yaxes=None, yhoverformat=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Splom trace
Splom traces generate scatter plot matrix visualizations. Each splom
dimensionsitems correspond to a generated axis. Values for each of those dimensions are set indimensions[i].values. Splom traces support allscatterglmarker style attributes. Specifylayout.gridattributes and/or layout x-axis and y-axis attributes for more control over the axis positioning and style.- Parameters
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.diagonal –
plotly.graph_objects.splom.Diagonalinstance or dict with compatible propertiesdimensions – A tuple of
plotly.graph_objects.splom.Dimensioninstances or dicts with compatible propertiesdimensiondefaults – When used in a template (as layout.template.data.splom.dimensiondefaults), sets the default property values to use for elements of splom.dimensions
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.splom.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.splom.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker –
plotly.graph_objects.splom.Markerinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
selected –
plotly.graph_objects.splom.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showlowerhalf – Determines whether or not subplots on the lower half from the diagonal are displayed.
showupperhalf – Determines whether or not subplots on the upper half from the diagonal are displayed.
stream –
plotly.graph_objects.splom.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair to appear on hover. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates.
textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.splom.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
xaxes – Sets the list of x axes corresponding to dimensions of this splom trace. By default, a splom will match the first N xaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.yaxes – Sets the list of y axes corresponding to dimensions of this splom trace. By default, a splom will match the first N yaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_streamtube(autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, maxdisplayed=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizeref=None, starts=None, stream=None, text=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Streamtube trace
Use a streamtube trace to visualize flow in a vector field. Specify a vector field using 6 1D arrays of equal length, 3 position arrays
x,yandzand 3 vector component arraysu,v, andw. By default, the tubes’ starting positions will be cut from the vector field’s x-z plane at its minimum y value. To specify your own starting position, use attributesstarts.x,starts.yandstarts.z. The color is encoded by the norm of (u, v, w), and the local radius by the divergence of (u, v, w).- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.streamtube.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.streamtube.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablestubex,tubey,tubez,tubeu,tubev,tubew,normanddivergence. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.streamtube.Legendgrouptitl einstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.streamtube.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.streamtube.Lightpositioninstance or dict with compatible propertiesmaxdisplayed – The maximum number of displayed segments in a streamtube.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
sizeref – The scaling factor for the streamtubes. The default is 1, which avoids two max divergence tubes from touching at adjacent starting positions.
starts –
plotly.graph_objects.streamtube.Startsinstance or dict with compatible propertiesstream –
plotly.graph_objects.streamtube.Streaminstance or dict with compatible propertiestext – Sets a text element associated with this trace. If trace
hoverinfocontains a “text” flag, this text element will be seen in all hover labels. Note that streamtube traces do not support arraytextvalues.u – Sets the x components of the vector field.
uhoverformat – Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.usrc – Sets the source reference on Chart Studio Cloud for
u.v – Sets the y components of the vector field.
vhoverformat – Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
vsrc – Sets the source reference on Chart Studio Cloud for
v.w – Sets the z components of the vector field.
whoverformat – Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.wsrc – Sets the source reference on Chart Studio Cloud for
w.x – Sets the x coordinates of the vector field.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates of the vector field.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates of the vector field.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_sunburst(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, root=None, rotation=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Sunburst trace
Visualize hierarchal data spanning outward radially from root to leaves. The sunburst sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.sunburst.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.sunburst.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.insidetextorientation – Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.leaf –
plotly.graph_objects.sunburst.Leafinstance or dict with compatible propertieslegend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.sunburst.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.sunburst.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented at the center of a sunburst graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.root –
plotly.graph_objects.sunburst.Rootinstance or dict with compatible propertiesrotation – Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o’clock.
sort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.sunburst.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_surface(autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, hidesurface=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, surfacecolor=None, surfacecolorsrc=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Surface trace
The data the describes the coordinates of the surface is set in
z. Data inzshould be a 2D list. Coordinates inxandycan either be 1D lists or 2D lists (e.g. to graph parametric surfaces). If not provided inxandy, the x and y coordinates are assumed to be linear starting at 0 with a unit step. The color scale corresponds to thezvalues by default. For custom color scales, usesurfacecolorwhich should be a 2D list, where its bounds can be controlled usingcminandcmax.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.cauto – Determines whether or not the color domain is computed with respect to the input data (here z or surfacecolor) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as z or surfacecolor. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.surface.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.connectgaps – Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in.contours –
plotly.graph_objects.surface.Contoursinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.hidesurface – Determines whether or not a surface is drawn. For example, set
hidesurfaceto Falsecontours.x.showto True andcontours.y.showto True to draw a wire frame plot.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.surface.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.surface.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.surface.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.surface.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.opacityscale – Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
stream –
plotly.graph_objects.surface.Streaminstance or dict with compatible propertiessurfacecolor – Sets the surface color values, used for setting a color scale independent of
z.surfacecolorsrc – Sets the source reference on Chart Studio Cloud for
surfacecolor.text – Sets the text elements associated with each z value. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the x coordinates.
xcalendar – Sets the calendar system to use with
xdate data.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
ycalendar – Sets the calendar system to use with
ydate data.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the z coordinates.
zcalendar – Sets the calendar system to use with
zdate data.zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_table(cells=None, columnorder=None, columnordersrc=None, columnwidth=None, columnwidthsrc=None, customdata=None, customdatasrc=None, domain=None, header=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, stream=None, uid=None, uirevision=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Table trace
Table view for detailed data viewing. The data are arranged in a grid of rows and columns. Most styling can be specified for columns, rows or individual cells. Table is using a column- major order, ie. the grid is represented as a vector of column vectors.
- Parameters
cells –
plotly.graph_objects.table.Cellsinstance or dict with compatible propertiescolumnorder – Specifies the rendered order of the data columns; for example, a value
2at position0means that column index0in the data will be rendered as the third column, as columns have an index base of zero.columnordersrc – Sets the source reference on Chart Studio Cloud for
columnorder.columnwidth – The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths.
columnwidthsrc – Sets the source reference on Chart Studio Cloud for
columnwidth.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.table.Domaininstance or dict with compatible propertiesheader –
plotly.graph_objects.table.Headerinstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.table.Hoverlabelinstance or dict with compatible propertiesids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.table.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
stream –
plotly.graph_objects.table.Streaminstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_trace(trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a trace to the figure
- Parameters
trace (BaseTraceType or dict) –
- Either:
An instances of a trace classe from the plotly.graph_objects package (e.g plotly.graph_objects.Scatter, plotly.graph_objects.Bar)
or a dicts where:
The ‘type’ property specifies the trace type (e.g. ‘scatter’, ‘bar’, ‘area’, etc.). If the dict has no ‘type’ property then ‘scatter’ is assumed.
All remaining properties are passed to the constructor of the specified trace type.
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots. If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots. If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
The trace argument is a 2D cartesian trace (scatter, bar, etc.)
exclude_empty_subplots (boolean) – If True, the trace will not be added to subplots that don’t already have traces.
- Returns
The Figure that add_trace was called on
- Return type
Examples
>>> from plotly import subplots >>> import plotly.graph_objects as go
Add two Scatter traces to a figure
>>> fig = go.Figure() >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) Figure(...) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) Figure(...)
Add two Scatter traces to vertically stacked subplots
>>> fig = subplots.make_subplots(rows=2) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) Figure(...) >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) Figure(...)
-
add_traces(data, rows=None, cols=None, secondary_ys=None, exclude_empty_subplots=False) → plotly.graph_objects._figurewidget.FigureWidget¶ Add traces to the figure
- Parameters
data (list[BaseTraceType or dict]) –
A list of trace specifications to be added. Trace specifications may be either:
Instances of trace classes from the plotly.graph_objects package (e.g plotly.graph_objects.Scatter, plotly.graph_objects.Bar)
Dicts where:
The ‘type’ property specifies the trace type (e.g. ‘scatter’, ‘bar’, ‘area’, etc.). If the dict has no ‘type’ property then ‘scatter’ is assumed.
All remaining properties are passed to the constructor of the specified trace type.
rows (None, list[int], or int (default None)) – List of subplot row indexes (starting from 1) for the traces to be added. Only valid if figure was created using
plotly.tools.make_subplotsIf a single integer is passed, all traces will be added to row numbercols (None or list[int] (default None)) – List of subplot column indexes (starting from 1) for the traces to be added. Only valid if figure was created using
plotly.tools.make_subplotsIf a single integer is passed, all traces will be added to column number
- secondary_ys: None or list[boolean] (default None)
List of secondary_y booleans for traces to be added. See the docstring for
add_tracefor more info.- exclude_empty_subplots: boolean
If True, the trace will not be added to subplots that don’t already have traces.
- Returns
The Figure that add_traces was called on
- Return type
Examples
>>> from plotly import subplots >>> import plotly.graph_objects as go
Add two Scatter traces to a figure
>>> fig = go.Figure() >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), ... go.Scatter(x=[1,2,3], y=[2,1,2])]) Figure(...)
Add two Scatter traces to vertically stacked subplots
>>> fig = subplots.make_subplots(rows=2) >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), ... go.Scatter(x=[1,2,3], y=[2,1,2])], ... rows=[1, 2], cols=[1, 1]) Figure(...)
-
add_treemap(branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Treemap trace
Visualize hierarchal data from leaves (and/or outer branches) towards root with rectangles. The treemap sectors are determined by the entries in “labels” or “ids” and in “parents”.
- Parameters
branchvalues – Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.count – Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.domain –
plotly.graph_objects.treemap.Domaininstance or dict with compatible propertieshoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.treemap.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.insidetextfont – Sets the font used for
textinfolying inside the sector.labels – Sets the labels of each of the sectors.
labelssrc – Sets the source reference on Chart Studio Cloud for
labels.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgrouptitle –
plotly.graph_objects.treemap.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
level – Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.marker –
plotly.graph_objects.treemap.Markerinstance or dict with compatible propertiesmaxdepth – Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the trace.
outsidetextfont – Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.parents – Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.parentssrc – Sets the source reference on Chart Studio Cloud for
parents.pathbar –
plotly.graph_objects.treemap.Pathbarinstance or dict with compatible propertiesroot –
plotly.graph_objects.treemap.Rootinstance or dict with compatible propertiessort – Determines whether or not the sectors are reordered from largest to smallest.
stream –
plotly.graph_objects.treemap.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textfont – Sets the font used for
textinfo.textinfo – Determines which trace information appear on the graph.
textposition – Sets the positions of the
textelements.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.tiling –
plotly.graph_objects.treemap.Tilinginstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.values – Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.valuessrc – Sets the source reference on Chart Studio Cloud for
values.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_violin(alignmentgroup=None, bandwidth=None, box=None, customdata=None, customdatasrc=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meanline=None, meta=None, metasrc=None, name=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, points=None, quartilemethod=None, scalegroup=None, scalemode=None, selected=None, selectedpoints=None, showlegend=None, side=None, span=None, spanmode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Violin trace
In vertical (horizontal) violin plots, statistics are computed using
y(x) values. By supplying anx(y) array, one violin per distinct x (y) value is drawn If nox(y) list is provided, a single violin is drawn. That violin position is then positioned with withnameor withx0(y0) if provided.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
bandwidth – Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman’s rule of thumb.
box –
plotly.graph_objects.violin.Boxinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.fillcolor – Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.violin.Hoverlabelinstance or dict with compatible propertieshoveron – Do the hover effects highlight individual violins or sample points or the kernel density estimate or any combination of them?
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.jitter – Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the violins.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.violin.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
line –
plotly.graph_objects.violin.Lineinstance or dict with compatible propertiesmarker –
plotly.graph_objects.violin.Markerinstance or dict with compatible propertiesmeanline –
plotly.graph_objects.violin.Meanlineinstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover. For violin traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categorical. Note that the trace name is also used as a default value for attributescalegroup(please see its description for details).offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the violin(s). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
pointpos – Sets the position of the sample points in relation to the violins. If 0, the sample points are places over the center of the violins. Positive (negative) values correspond to positions to the right (left) for vertical violins and above (below) for horizontal violins.
points – If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the violins are shown with no sample points. Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set, otherwise defaults to “outliers”.quartilemethod – Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
scalegroup – If there are multiple violins that should be sized according to to some metric (see
scalemode), link them by providing a non-empty group id here shared by every trace in the same group. If a violin’swidthis undefined,scalegroupwill default to the trace’s name. In this case, violins with the same names will be linked togetherscalemode – Sets the metric by which the width of each violin is determined. “width” means each violin has the same (max) width “count” means the violins are scaled by the number of sample points making up each violin.
selected –
plotly.graph_objects.violin.Selectedinstance or dict with compatible propertiesselectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
side – Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under “overlay” mode, where one trace has
sideset to “positive” and the other to “negative”.span – Sets the span in data space for which the density function will be computed. Has an effect only when
spanmodeis set to “manual”.spanmode – Sets the method by which the span in data space where the density function will be computed. “soft” means the span goes from the sample’s minimum value minus two bandwidths to the sample’s maximum value plus two bandwidths. “hard” means the span goes from the sample’s minimum to its maximum value. For custom span settings, use mode “manual” and fill in the
spanattribute.stream –
plotly.graph_objects.violin.Streaminstance or dict with compatible propertiestext – Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.unselected –
plotly.graph_objects.violin.Unselectedinstance or dict with compatible propertiesvisible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the width of the violin in data coordinates. If 0 (default value) the width is automatically selected based on the positions of other violin traces in the same subplot.
x – Sets the x sample data or coordinates. See overview for more info.
x0 – Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y sample data or coordinates. See overview for more info.
y0 – Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
add_vline(x, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a vertical line to a plot or subplot that extends infinitely in the y-dimension.
- Parameters
x (float or int) – A number representing the x coordinate of the vertical line.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the line. Example positions are “bottom left”, “right top”, “right”, “bottom”. If an annotation is added but annotation_position is not specified, this defaults to “top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_volume(autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Volume trace
Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the
value,x,yandzof every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace.- Parameters
autocolorscale – Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.caps –
plotly.graph_objects.volume.Capsinstance or dict with compatible propertiescauto – Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cmax – Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.cmid – Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.cmin – Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.coloraxis – Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.colorbar –
plotly.graph_objects.volume.ColorBarinstance or dict with compatible propertiescolorscale – Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,C ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.contour –
plotly.graph_objects.volume.Contourinstance or dict with compatible propertiescustomdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.flatshading – Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections.
hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.volume.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Same as
text.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.isomax – Sets the maximum boundary for iso-surface plot.
isomin – Sets the minimum boundary for iso-surface plot.
legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle –
plotly.graph_objects.volume.Legendgrouptitleinstance or dict with compatible propertieslegendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
lighting –
plotly.graph_objects.volume.Lightinginstance or dict with compatible propertieslightposition –
plotly.graph_objects.volume.Lightpositioninstance or dict with compatible propertiesmeta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
opacity – Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.opacityscale – Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.reversescale – Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.scene – Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
showscale – Determines whether or not a colorbar is displayed for this trace.
slices –
plotly.graph_objects.volume.Slicesinstance or dict with compatible propertiesspaceframe –
plotly.graph_objects.volume.Spaceframeinstance or dict with compatible propertiesstream –
plotly.graph_objects.volume.Streaminstance or dict with compatible propertiessurface –
plotly.graph_objects.volume.Surfaceinstance or dict with compatible propertiestext – Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textsrc – Sets the source reference on Chart Studio Cloud for
text.uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.value – Sets the 4th dimension (value) of the vertices.
valuehoverformat – Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d 3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.valuesrc – Sets the source reference on Chart Studio Cloud for
value.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
x – Sets the X coordinates of the vertices on X axis.
xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the Y coordinates of the vertices on Y axis.
yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.ysrc – Sets the source reference on Chart Studio Cloud for
y.z – Sets the Z coordinates of the vertices on Z axis.
zhoverformat – Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.zsrc – Sets the source reference on Chart Studio Cloud for
z.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).
- Returns
- Return type
-
add_vrect(x0, x1, row='all', col='all', exclude_empty_subplots=True, annotation=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a rectangle to a plot or subplot that extends infinitely in the y-dimension.
- Parameters
x0 (float or int) – A number representing the x coordinate of one side of the rectangle.
x1 (float or int) – A number representing the x coordinate of the other side of the rectangle.
exclude_empty_subplots (Boolean) – If True (default) do not place the shape on subplots that have no data plotted on them.
row (None, int or 'all') – Subplot row for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
col (None, int or 'all') – Subplot column for shape indexed starting at 1. If ‘all’, addresses all rows in the specified column(s). If both row and col are None, addresses the first subplot if subplots exist, or the only plot. By default is “all”.
annotation (dict or plotly.graph_objects.layout.Annotation. If dict(),) – it is interpreted as describing an annotation. The annotation is placed relative to the shape based on annotation_position (see below) unless its x or y value has been specified for the annotation passed here. xref and yref are always the same as for the added shape and cannot be overridden.
annotation_position (a string containing optionally ["inside", "outside"], ["top", "bottom"]) – and [“left”, “right”] specifying where the text should be anchored to on the rectangle. Example positions are “outside top left”, “inside bottom”, “right”, “inside left”, “inside” (“outside” is not supported). If an annotation is added but annotation_position is not specified this defaults to “inside top right”.
annotation_* (any parameters to go.layout.Annotation can be passed as) – keywords by prefixing them with “annotation_”. For example, to specify the annotation text “example” you can pass annotation_text=”example” as a keyword argument.
**kwargs – Any named function parameters that can be passed to ‘add_shape’, except for x0, x1, y0, y1 or type.
-
add_waterfall(alignmentgroup=None, base=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, decreasing=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, measure=None, measuresrc=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, totals=None, uid=None, uirevision=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Add a new Waterfall trace
Draws waterfall trace which is useful graph to displays the contribution of various elements (either positive or negative) in a bar chart. The data visualized by the span of the bars is set in
yiforientationis set to “v” (the default) and the labels are set inx. By settingorientationto “h”, the roles are interchanged.- Parameters
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
base – Sets where the bar base is drawn (in position axis units).
cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.connector –
plotly.graph_objects.waterfall.Connectorinstance or dict with compatible propertiesconstraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for
customdata.decreasing –
plotly.graph_objects.waterfall.Decreasinginstance or dict with compatible propertiesdx – Sets the x coordinate step. See
x0for more info.dy – Sets the y coordinate step. See
y0for more info.hoverinfo – Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.hoverinfosrc – Sets the source reference on Chart Studio Cloud for
hoverinfo.hoverlabel –
plotly.graph_objects.waterfall.Hoverlabelinstance or dict with compatible propertieshovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,deltaandfinal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.hovertemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for
hovertemplate.hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.hovertextsrc – Sets the source reference on Chart Studio Cloud for
hovertext.ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for
ids.increasing –
plotly.graph_objects.waterfall.Increasinginstance or dict with compatible propertiesinsidetextanchor – Determines if texts are kept at center or start/end points in
textposition“inside” mode.insidetextfont – Sets the font used for
textlying inside the bar.legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.legendgroup – Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – :class:`plotly.graph_objects.waterfall.Legendgrouptitle ` instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.legendwidth – Sets the width (in px or fraction) of the legend for this trace.
measure – An array containing types of values. By default the values are considered as ‘relative’. However; it is possible to use ‘total’ to compute the sums. Also ‘absolute’ could be applied to reset the computed total or to declare an initial value where needed.
measuresrc – Sets the source reference on Chart Studio Cloud for
measure.meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.metasrc – Sets the source reference on Chart Studio Cloud for
meta.name – Sets the trace name. The trace name appears as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
offsetsrc – Sets the source reference on Chart Studio Cloud for
offset.opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
outsidetextfont – Sets the font used for
textlying outside the bar.selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream –
plotly.graph_objects.waterfall.Streaminstance or dict with compatible propertiestext – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.textangle – Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.textfont – Sets the font used for
text.textinfo – Determines which trace information appear on the graph. In the case of having multiple waterfalls, totals are computed separately (per trace).
textposition – Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.textpositionsrc – Sets the source reference on Chart Studio Cloud for
textposition.textsrc – Sets the source reference on Chart Studio Cloud for
text.texttemplate – Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,delta,finalandlabel.texttemplatefallback – Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
texttemplatesrc – Sets the source reference on Chart Studio Cloud for
texttemplate.totals –
plotly.graph_objects.waterfall.Totalsinstance or dict with compatible propertiesuid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
widthsrc – Sets the source reference on Chart Studio Cloud for
width.x – Sets the x coordinates.
x0 – Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.xhoverformat – Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.xperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.xperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.xperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.xsrc – Sets the source reference on Chart Studio Cloud for
x.y – Sets the y coordinates.
y0 – Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.yhoverformat – Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.yperiod – Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.yperiod0 – Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.yperiodalignment – Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.ysrc – Sets the source reference on Chart Studio Cloud for
y.zorder – Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.row ('all', int or None (default)) – Subplot row index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all rows in the specified column(s).col ('all', int or None (default)) – Subplot col index (starting from 1) for the trace to be added. Only valid if figure was created using
plotly.tools.make_subplots.If ‘all’, addresses all columns in the specified row(s).secondary_y (boolean or None (default None)) –
If True, associate this trace with the secondary y-axis of the subplot at the specified row and col. Only valid if all of the following conditions are satisfied:
The figure was created using
plotly.subplots.make_subplots.The row and col arguments are not None
The subplot at the specified row and col has type xy (which is the default) and secondary_y True. These properties are specified in the specs argument to make_subplots. See the make_subplots docstring for more info.
- Returns
- Return type
-
for_each_annotation(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all annotations that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single annotation object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotations that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotations that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_coloraxis(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all coloraxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single coloraxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_geo(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all geo objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single geo object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_layout_image(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all images that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single image object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those images that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those images that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_legend(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all legend objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single legend object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_map(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all map objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single map object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_mapbox(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all mapbox objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single mapbox object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_polar(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all polar objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single polar object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_scene(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all scene objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single scene object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_selection(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all selections that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single selection object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selections that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selections that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_shape(fn, selector=None, row=None, col=None, secondary_y=None)¶ Apply a function to all shapes that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single shape object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shapes that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shapes that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_smith(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all smith objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single smith object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_ternary(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all ternary objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single ternary object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_trace(fn, selector=None, row=None, col=None, secondary_y=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all traces that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single trace object.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all traces are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each trace and those for which the function returned True will be in the selection. If an int N, the Nth trace matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
col (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
secondary_y (boolean or None (default None)) –
If True, only select traces associated with the secondary y-axis of the subplot.
If False, only select traces associated with the primary y-axis of the subplot.
If None (the default), do not filter traces based on secondary y-axis.
To select traces by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
for_each_xaxis(fn, selector=None, row=None, col=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all xaxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single xaxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
for_each_yaxis(fn, selector=None, row=None, col=None, secondary_y=None) → plotly.graph_objects._figurewidget.FigureWidget¶ Apply a function to all yaxis objects that satisfy the specified selection criteria
- Parameters
fn – Function that inputs a single yaxis object.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
select_annotations(selector=None, row=None, col=None, secondary_y=None)¶ Select annotations from a particular subplot cell and/or annotations that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the annotations that satisfy all of the specified selection criteria
- Return type
generator
-
select_coloraxes(selector=None, row=None, col=None)¶ Select coloraxis subplot objects from a particular subplot cell and/or coloraxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
- Returns
Generator that iterates through all of the coloraxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_geos(selector=None, row=None, col=None)¶ Select geo subplot objects from a particular subplot cell and/or geo subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
- Returns
Generator that iterates through all of the geo objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_layout_images(selector=None, row=None, col=None, secondary_y=None)¶ Select images from a particular subplot cell and/or images that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the images that satisfy all of the specified selection criteria
- Return type
generator
-
select_legends(selector=None, row=None, col=None)¶ Select legend subplot objects from a particular subplot cell and/or legend subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
- Returns
Generator that iterates through all of the legend objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_mapboxes(selector=None, row=None, col=None)¶ Select mapbox subplot objects from a particular subplot cell and/or mapbox subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
- Returns
Generator that iterates through all of the mapbox objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_maps(selector=None, row=None, col=None)¶ Select map subplot objects from a particular subplot cell and/or map subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
- Returns
Generator that iterates through all of the map objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_polars(selector=None, row=None, col=None)¶ Select polar subplot objects from a particular subplot cell and/or polar subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
- Returns
Generator that iterates through all of the polar objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_scenes(selector=None, row=None, col=None)¶ Select scene subplot objects from a particular subplot cell and/or scene subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
- Returns
Generator that iterates through all of the scene objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_selections(selector=None, row=None, col=None, secondary_y=None)¶ Select selections from a particular subplot cell and/or selections that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the selections that satisfy all of the specified selection criteria
- Return type
generator
-
select_shapes(selector=None, row=None, col=None, secondary_y=None)¶ Select shapes from a particular subplot cell and/or shapes that satisfy custom selection criteria.
- Parameters
selector (dict, function, int, str, or None (default None)) – Dict to use as selection criteria. Annotations will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the shapes that satisfy all of the specified selection criteria
- Return type
generator
-
select_smiths(selector=None, row=None, col=None)¶ Select smith subplot objects from a particular subplot cell and/or smith subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
- Returns
Generator that iterates through all of the smith objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_ternaries(selector=None, row=None, col=None)¶ Select ternary subplot objects from a particular subplot cell and/or ternary subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
- Returns
Generator that iterates through all of the ternary objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_xaxes(selector=None, row=None, col=None)¶ Select xaxis subplot objects from a particular subplot cell and/or xaxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
- Returns
Generator that iterates through all of the xaxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
select_yaxes(selector=None, row=None, col=None, secondary_y=None)¶ Select yaxis subplot objects from a particular subplot cell and/or yaxis subplot objects that satisfy custom selection criteria.
- Parameters
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
- Returns
Generator that iterates through all of the yaxis objects that satisfy all of the specified selection criteria
- Return type
generator
-
set_subplots(rows=None, cols=None, **make_subplots_args) → plotly.graph_objects._figurewidget.FigureWidget¶ Add subplots to this figure. If the figure already contains subplots, then this throws an error. Accepts any keyword arguments that plotly.subplots.make_subplots accepts.
-
update(dict1=None, overwrite=False, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Update the properties of the figure with a dict and/or with keyword arguments.
This recursively updates the structure of the figure object with the values in the input dict / keyword arguments.
- Parameters
dict1 (dict) – Dictionary of properties to be updated
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
kwargs – Keyword/value pair of properties to be updated
Examples
>>> import plotly.graph_objects as go >>> fig = go.Figure(data=[{'y': [1, 2, 3]}]) >>> fig.update(data=[{'y': [4, 5, 6]}]) Figure(...) >>> fig.to_plotly_json() {'data': [{'type': 'scatter', 'uid': 'e86a7c7a-346a-11e8-8aa8-a0999b0c017b', 'y': array([4, 5, 6], dtype=int32)}], 'layout': {}}
>>> fig = go.Figure(layout={'xaxis': ... {'color': 'green', ... 'range': [0, 1]}}) >>> fig.update({'layout': {'xaxis': {'color': 'pink'}}}) Figure(...) >>> fig.to_plotly_json() {'data': [], 'layout': {'xaxis': {'color': 'pink', 'range': [0, 1]}}}
- Returns
Updated figure
- Return type
-
update_annotations(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all annotations that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all annotations that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all annotations are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each annotation and those for which the function returned True will be in the selection. If an int N, the Nth annotation matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
col (int or None (default None)) – Subplot row and column index of annotations to select. To select annotations by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those annotation that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all annotations are selected.
secondary_y (boolean or None (default None)) –
If True, only select annotations associated with the secondary y-axis of the subplot.
If False, only select annotations associated with the primary y-axis of the subplot.
If None (the default), do not filter annotations based on secondary y-axis.
To select annotations by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected annotation. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_coloraxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all coloraxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all coloraxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. coloraxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all coloraxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each coloraxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
col (int or None (default None)) – Subplot row and column index of coloraxis objects to select. To select coloraxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all coloraxis objects are selected.
**kwargs – Additional property updates to apply to each selected coloraxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_geos(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all geo objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all geo objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. geo objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all geo objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each geo and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
col (int or None (default None)) – Subplot row and column index of geo objects to select. To select geo objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all geo objects are selected.
**kwargs – Additional property updates to apply to each selected geo object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_layout(dict1=None, overwrite=False, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Update the properties of the figure’s layout with a dict and/or with keyword arguments.
This recursively updates the structure of the original layout with the values in the input dict / keyword arguments.
- Parameters
dict1 (dict) – Dictionary of properties to be updated
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
kwargs – Keyword/value pair of properties to be updated
- Returns
The Figure object that the update_layout method was called on
- Return type
-
update_layout_images(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all images that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all images that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all images are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each image and those for which the function returned True will be in the selection. If an int N, the Nth image matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
col (int or None (default None)) – Subplot row and column index of images to select. To select images by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those image that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all images are selected.
secondary_y (boolean or None (default None)) –
If True, only select images associated with the secondary y-axis of the subplot.
If False, only select images associated with the primary y-axis of the subplot.
If None (the default), do not filter images based on secondary y-axis.
To select images by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected image. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_legends(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all legend objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all legend objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. legend objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all legend objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each legend and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
col (int or None (default None)) – Subplot row and column index of legend objects to select. To select legend objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all legend objects are selected.
**kwargs – Additional property updates to apply to each selected legend object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_mapboxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all mapbox objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all mapbox objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. mapbox objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all mapbox objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each mapbox and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
col (int or None (default None)) – Subplot row and column index of mapbox objects to select. To select mapbox objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all mapbox objects are selected.
**kwargs – Additional property updates to apply to each selected mapbox object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_maps(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all map objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all map objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. map objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all map objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each map and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
col (int or None (default None)) – Subplot row and column index of map objects to select. To select map objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all map objects are selected.
**kwargs – Additional property updates to apply to each selected map object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_polars(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all polar objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all polar objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. polar objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all polar objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each polar and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
col (int or None (default None)) – Subplot row and column index of polar objects to select. To select polar objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all polar objects are selected.
**kwargs – Additional property updates to apply to each selected polar object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_scenes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all scene objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all scene objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. scene objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all scene objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each scene and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
col (int or None (default None)) – Subplot row and column index of scene objects to select. To select scene objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all scene objects are selected.
**kwargs – Additional property updates to apply to each selected scene object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_selections(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all selections that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all selections that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all selections are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each selection and those for which the function returned True will be in the selection. If an int N, the Nth selection matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
col (int or None (default None)) – Subplot row and column index of selections to select. To select selections by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those selection that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all selections are selected.
secondary_y (boolean or None (default None)) –
If True, only select selections associated with the secondary y-axis of the subplot.
If False, only select selections associated with the primary y-axis of the subplot.
If None (the default), do not filter selections based on secondary y-axis.
To select selections by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected selection. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_shapes(patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all shapes that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all shapes that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all shapes are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each shape and those for which the function returned True will be in the selection. If an int N, the Nth shape matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
col (int or None (default None)) – Subplot row and column index of shapes to select. To select shapes by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those shape that are in paper coordinates, set row and col to the string ‘paper’. If None (the default), all shapes are selected.
secondary_y (boolean or None (default None)) –
If True, only select shapes associated with the secondary y-axis of the subplot.
If False, only select shapes associated with the primary y-axis of the subplot.
If None (the default), do not filter shapes based on secondary y-axis.
To select shapes by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected shape. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_smiths(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all smith objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all smith objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. smith objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all smith objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each smith and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
col (int or None (default None)) – Subplot row and column index of smith objects to select. To select smith objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all smith objects are selected.
**kwargs – Additional property updates to apply to each selected smith object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_ternaries(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all ternary objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all ternary objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. ternary objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all ternary objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each ternary and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
col (int or None (default None)) – Subplot row and column index of ternary objects to select. To select ternary objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all ternary objects are selected.
**kwargs – Additional property updates to apply to each selected ternary object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_traces(patch=None, selector=None, row=None, col=None, secondary_y=None, overwrite=False, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all traces that satisfy the specified selection criteria
- Parameters
patch (dict or None (default None)) – Dictionary of property updates to be applied to all traces that satisfy the selection criteria.
selector (dict, function, int, str or None (default None)) – Dict to use as selection criteria. Traces will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all traces are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each trace and those for which the function returned True will be in the selection. If an int N, the Nth trace matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S).
row (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
col (int or None (default None)) – Subplot row and column index of traces to select. To select traces by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all traces are selected.
secondary_y (boolean or None (default None)) –
If True, only select traces associated with the secondary y-axis of the subplot.
If False, only select traces associated with the primary y-axis of the subplot.
If None (the default), do not filter traces based on secondary y-axis.
To select traces by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
**kwargs – Additional property updates to apply to each selected trace. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the Figure object that the method was called on
- Return type
self
-
update_xaxes(patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all xaxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all xaxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. xaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all xaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each xaxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of xaxis objects to select. To select xaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all xaxis objects are selected.
**kwargs – Additional property updates to apply to each selected xaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
update_yaxes(patch=None, selector=None, overwrite=False, row=None, col=None, secondary_y=None, **kwargs) → plotly.graph_objects._figurewidget.FigureWidget¶ Perform a property update operation on all yaxis objects that satisfy the specified selection criteria
- Parameters
patch (dict) – Dictionary of property updates to be applied to all yaxis objects that satisfy the selection criteria.
selector (dict, function, or None (default None)) – Dict to use as selection criteria. yaxis objects will be selected if they contain properties corresponding to all of the dictionary’s keys, with values that exactly match the supplied values. If None (the default), all yaxis objects are selected. If a function, it must be a function accepting a single argument and returning a boolean. The function will be called on each yaxis and those for which the function returned True will be in the selection.
overwrite (bool) – If True, overwrite existing properties. If False, apply updates to existing properties recursively, preserving existing properties that are not specified in the update operation.
row (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
col (int or None (default None)) – Subplot row and column index of yaxis objects to select. To select yaxis objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all yaxis objects are selected.
secondary_y (boolean or None (default None)) –
If True, only select yaxis objects associated with the secondary y-axis of the subplot.
If False, only select yaxis objects associated with the primary y-axis of the subplot.
If None (the default), do not filter yaxis objects based on a secondary y-axis condition.
To select yaxis objects by secondary y-axis, the Figure must have been created using plotly.subplots.make_subplots. See the docstring for the specs argument to make_subplots for more info on creating subplots with secondary y-axes.
**kwargs – Additional property updates to apply to each selected yaxis object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence.
- Returns
Returns the FigureWidget object that the method was called on
- Return type
self
-
-
class
plotly.graph_objects.Font(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Font is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.Font
plotly.graph_objects.layout.hoverlabel.Font
etc.
-
class
plotly.graph_objects.Frame(arg=None, baseframe=None, data=None, group=None, layout=None, name=None, traces=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseFrameHierarchyType-
property
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.
- The ‘baseframe’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
data¶ A list of traces this frame modifies. The format is identical to the normal trace definition.
- Returns
- Return type
Any
-
property
group¶ An identifier that specifies the group to which the frame belongs, used by animate to select a subset of frames.
- The ‘group’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
layout¶ Layout properties which this frame modifies. The format is identical to the normal layout definition.
- Returns
- Return type
Any
-
property
name¶ A label by which to identify the frame
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
traces¶ A list of trace indices that identify the respective traces in the data attribute
The ‘traces’ property accepts values of any type
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Frames(*args, **kwargs)¶ Bases:
listplotly.graph_objects.Frames is deprecated.
- Please replace it with a list or tuple of instances of the following types
plotly.graph_objects.Frame
-
class
plotly.graph_objects.Funnel(arg=None, alignmentgroup=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cliponaxis¶ Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connector¶ The ‘connector’ property is an instance of Connector that may be specified as:
An instance of
plotly.graph_objects.funnel.ConnectorA dict of string/value properties that will be passed to the Connector constructor
- Returns
- Return type
-
property
constraintext¶ Constrain the size of text inside or outside a bar to be no larger than the bar itself.
- The ‘constraintext’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘both’, ‘none’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘name’, ‘x’, ‘y’, ‘text’, ‘percent initial’, ‘percent previous’, ‘percent total’] joined with ‘+’ characters (e.g. ‘name+x’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.funnel.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPreviousandpercentTotal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextanchor¶ Determines if texts are kept at center or start/end points in
textposition“inside” mode.- The ‘insidetextanchor’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘end’, ‘middle’, ‘start’]
- Returns
- Return type
Any
-
property
insidetextfont¶ Sets the font used for
textlying inside the bar.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.funnel.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.funnel.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.funnel.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offset¶ Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
- The ‘offset’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the funnels. With “v” (“h”), the value of the each bar spans along the vertical (horizontal). By default funnels are tend to be oriented horizontally; unless only “y” array is presented or orientation is set to “v”. Also regarding graphs including only ‘horizontal’ funnels, “autorange” on the “y-axis” are set to “reversed”.
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
outsidetextfont¶ Sets the font used for
textlying outside the bar.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.funnel.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.funnel.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textangle¶ Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.The ‘textangle’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
textfont¶ Sets the font used for
text.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.funnel.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘percent initial’, ‘percent previous’, ‘percent total’, ‘value’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘auto’, ‘none’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablespercentInitial,percentPrevious,percentTotal,labelandvalue.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
width¶ Sets the bar width (in position axis units).
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Funnelarea(arg=None, aspectratio=None, baseratio=None, customdata=None, customdatasrc=None, dlabel=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, scalegroup=None, showlegend=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
aspectratio¶ Sets the ratio between height and width
- The ‘aspectratio’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
baseratio¶ Sets the ratio between bottom length and maximum top length.
- The ‘baseratio’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dlabel¶ Sets the label step. See
label0for more info.- The ‘dlabel’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.funnelarea.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘percent’, ‘name’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.funnelarea.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextfont¶ Sets the font used for
textinfolying inside the sector.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.funnelarea.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
label0¶ Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.- The ‘label0’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
labels¶ Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.The ‘labels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelssrc¶ Sets the source reference on Chart Studio Cloud for
labels.The ‘labelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.funnelarea.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.funnelarea.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
scalegroup¶ If there are multiple funnelareas that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
- The ‘scalegroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.funnelarea.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the font used for
textinfo.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.funnelarea.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph.
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘percent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Specifies the location of the
textinfo.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘none’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,textandpercent.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
title¶ The ‘title’ property is an instance of Title that may be specified as:
An instance of
plotly.graph_objects.funnelarea.TitleA dict of string/value properties that will be passed to the Title constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
values¶ Sets the values of the sectors. If omitted, we count occurrences of each label.
The ‘values’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuessrc¶ Sets the source reference on Chart Studio Cloud for
values.The ‘valuessrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Heatmap(arg=None, autocolorscale=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoverongaps=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, text=None, textfont=None, textsrc=None, texttemplate=None, texttemplatefallback=None, transpose=None, uid=None, uirevision=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xgap=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, xtype=None, y=None, y0=None, yaxis=None, ycalendar=None, ygap=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, ytype=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.heatmap.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in. It is defaulted to true ifzis a one dimensional array andzsmoothis not false; otherwise it is defaulted to false.The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.heatmap.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoverongaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata have hover labels associated with them.The ‘hoverongaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.The ‘hovertext’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.heatmap.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.heatmap.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each z value.
The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.heatmap.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
transpose¶ Transposes the z data.
The ‘transpose’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xgap¶ Sets the horizontal gap (in pixels) between bricks.
- The ‘xgap’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
xtype¶ If “array”, the heatmap’s x coordinates are given by “x” (the default behavior when
xis provided). If “scaled”, the heatmap’s x coordinates are given by “x0” and “dx” (the default behavior whenxis not provided).- The ‘xtype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
ygap¶ Sets the vertical gap (in pixels) between bricks.
- The ‘ygap’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ytype¶ If “array”, the heatmap’s y coordinates are given by “y” (the default behavior when
yis provided) If “scaled”, the heatmap’s y coordinates are given by “y0” and “dy” (the default behavior whenyis not provided)- The ‘ytype’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘array’, ‘scaled’]
- Returns
- Return type
Any
-
property
z¶ Sets the z data.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
zsmooth¶ Picks a smoothing algorithm use to smooth
zdata.- The ‘zsmooth’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘fast’, ‘best’, False]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Histogram(arg=None, alignmentgroup=None, autobinx=None, autobiny=None, bingroup=None, cliponaxis=None, constraintext=None, cumulative=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, offsetgroup=None, opacity=None, orientation=None, outsidetextfont=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, xaxis=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
autobinx¶ since v1.42 each bin attribute is auto-determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.The ‘autobinx’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
autobiny¶ since v1.42 each bin attribute is auto-determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.The ‘autobiny’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
bingroup¶ Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same “orientation” under
barmode“stack”, “relative” and “group” are forced into the same bingroup, Usingbingroup, traces underbarmode“overlay” and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d* trace can share the samebingroup- The ‘bingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cliponaxis¶ Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
constraintext¶ Constrain the size of text inside or outside a bar to be no larger than the bar itself.
- The ‘constraintext’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘both’, ‘none’]
- Returns
- Return type
Any
-
property
cumulative¶ The ‘cumulative’ property is an instance of Cumulative that may be specified as:
An instance of
plotly.graph_objects.histogram.CumulativeA dict of string/value properties that will be passed to the Cumulative constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
error_x¶ The ‘error_x’ property is an instance of ErrorX that may be specified as:
An instance of
plotly.graph_objects.histogram.ErrorXA dict of string/value properties that will be passed to the ErrorX constructor
- Returns
- Return type
-
property
error_y¶ The ‘error_y’ property is an instance of ErrorY that may be specified as:
An instance of
plotly.graph_objects.histogram.ErrorYA dict of string/value properties that will be passed to the ErrorY constructor
- Returns
- Return type
-
property
histfunc¶ Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
- The ‘histfunc’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘count’, ‘sum’, ‘avg’, ‘min’, ‘max’]
- Returns
- Return type
Any
-
property
histnorm¶ Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
- The ‘histnorm’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘’, ‘percent’, ‘probability’, ‘density’, ‘probability density’]
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.histogram.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablebinNumberAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextanchor¶ Determines if texts are kept at center or start/end points in
textposition“inside” mode.- The ‘insidetextanchor’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘end’, ‘middle’, ‘start’]
- Returns
- Return type
Any
-
property
insidetextfont¶ Sets the font used for
textlying inside the bar.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.histogram.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.histogram.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.histogram.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
nbinsx¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.- The ‘nbinsx’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
nbinsy¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.- The ‘nbinsy’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
outsidetextfont¶ Sets the font used for
textlying outside the bar.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.histogram.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.histogram.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.histogram.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets hover text elements associated with each bar. If a single string, the same string appears over all bars. If an array of string, the items are mapped in order to the this trace’s coordinates.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textangle¶ Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.The ‘textangle’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.histogram.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘auto’, ‘none’]
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabelandvalue.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.histogram.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the sample data to be binned on the x axis.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xbins¶ The ‘xbins’ property is an instance of XBins that may be specified as:
An instance of
plotly.graph_objects.histogram.XBinsA dict of string/value properties that will be passed to the XBins constructor
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the sample data to be binned on the y axis.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ybins¶ The ‘ybins’ property is an instance of YBins that may be specified as:
An instance of
plotly.graph_objects.histogram.YBinsA dict of string/value properties that will be passed to the YBins constructor
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Histogram2d(arg=None, autobinx=None, autobiny=None, autocolorscale=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xgap=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, ygap=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsmooth=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autobinx¶ since v1.42 each bin attribute is auto-determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.The ‘autobinx’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
autobiny¶ since v1.42 each bin attribute is auto-determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.The ‘autobiny’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
bingroup¶ Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.- The ‘bingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.histogram2d.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
histfunc¶ Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
- The ‘histfunc’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘count’, ‘sum’, ‘avg’, ‘min’, ‘max’]
- Returns
- Return type
Any
-
property
histnorm¶ Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
- The ‘histnorm’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘’, ‘percent’, ‘probability’, ‘density’, ‘probability density’]
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.histogram2d.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.histogram2d.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.histogram2d.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
nbinsx¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.- The ‘nbinsx’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
nbinsy¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.- The ‘nbinsy’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.histogram2d.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.histogram2d.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablez- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the sample data to be binned on the x axis.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xbingroup¶ Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroup- The ‘xbingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xbins¶ The ‘xbins’ property is an instance of XBins that may be specified as:
An instance of
plotly.graph_objects.histogram2d.XBinsA dict of string/value properties that will be passed to the XBins constructor
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xgap¶ Sets the horizontal gap (in pixels) between bricks.
- The ‘xgap’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the sample data to be binned on the y axis.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ybingroup¶ Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroup- The ‘ybingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ybins¶ The ‘ybins’ property is an instance of YBins that may be specified as:
An instance of
plotly.graph_objects.histogram2d.YBinsA dict of string/value properties that will be passed to the YBins constructor
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
ygap¶ Sets the vertical gap (in pixels) between bricks.
- The ‘ygap’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the aggregation data.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zsmooth¶ Picks a smoothing algorithm use to smooth
zdata.- The ‘zsmooth’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘fast’, ‘best’, False]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Histogram2dContour(arg=None, autobinx=None, autobiny=None, autocolorscale=None, autocontour=None, bingroup=None, coloraxis=None, colorbar=None, colorscale=None, contours=None, customdata=None, customdatasrc=None, histfunc=None, histnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, name=None, nbinsx=None, nbinsy=None, ncontours=None, opacity=None, reversescale=None, showlegend=None, showscale=None, stream=None, textfont=None, texttemplate=None, texttemplatefallback=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xbingroup=None, xbins=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, yaxis=None, ybingroup=None, ybins=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zauto=None, zhoverformat=None, zmax=None, zmid=None, zmin=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autobinx¶ since v1.42 each bin attribute is auto-determined separately and
autobinxis not needed. However, we acceptautobinx: trueorfalseand will updatexbinsaccordingly before deletingautobinxfrom the trace.The ‘autobinx’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
autobiny¶ since v1.42 each bin attribute is auto-determined separately and
autobinyis not needed. However, we acceptautobiny: trueorfalseand will updateybinsaccordingly before deletingautobinyfrom the trace.The ‘autobiny’ property must be specified as a bool (either True, or False)
- Returns
- Return type
- Type
Obsolete
-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
autocontour¶ Determines whether or not the contour level attributes are picked by an algorithm. If True, the number of contour levels can be set in
ncontours. If False, set the contour level attributes incontours.The ‘autocontour’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
bingroup¶ Set the
xbingroupandybingroupdefault prefix For example, setting abingroupof 1 on two histogram2d traces will make them their x-bins and y-bins match separately.- The ‘bingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usezminandzmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
contours¶ The ‘contours’ property is an instance of Contours that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.ContoursA dict of string/value properties that will be passed to the Contours constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
histfunc¶ Specifies the binning function used for this histogram trace. If “count”, the histogram values are computed by counting the number of values lying inside each bin. If “sum”, “avg”, “min”, “max”, the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.
- The ‘histfunc’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘count’, ‘sum’, ‘avg’, ‘min’, ‘max’]
- Returns
- Return type
Any
-
property
histnorm¶ Specifies the type of normalization used for this histogram trace. If “”, the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If “percent” / “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).
- The ‘histnorm’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘’, ‘percent’, ‘probability’, ‘density’, ‘probability density’]
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablezAnything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
nbinsx¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
xbins.sizeis provided.- The ‘nbinsx’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
nbinsy¶ Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if
ybins.sizeis provided.- The ‘nbinsy’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
ncontours¶ Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of
ncontours. Has an effect only ifautocontouris True or ifcontours.sizeis missing.- The ‘ncontours’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [1, 9223372036854775807]
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
zminwill correspond to the last color in the array andzmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
textfont¶ For this trace it only has an effect if
coloringis set to “heatmap”. Sets the text font.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
texttemplate¶ For this trace it only has an effect if
coloringis set to “heatmap”. Template string used for rendering the information text that appears on points. Note that this will overridetextinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesx,y,zandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the sample data to be binned on the x axis.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xbingroup¶ Set a group of histogram traces which will have compatible x-bin settings. Using
xbingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the samexbingroupvalue can be used to set (1D) histogrambingroup- The ‘xbingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xbins¶ The ‘xbins’ property is an instance of XBins that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.XBinsA dict of string/value properties that will be passed to the XBins constructor
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the sample data to be binned on the y axis.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ybingroup¶ Set a group of histogram traces which will have compatible y-bin settings. Using
ybingroup, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the sameybingroupvalue can be used to set (1D) histogrambingroup- The ‘ybingroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ybins¶ The ‘ybins’ property is an instance of YBins that may be specified as:
An instance of
plotly.graph_objects.histogram2dcontour.YBinsA dict of string/value properties that will be passed to the YBins constructor
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the aggregation data.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zauto¶ Determines whether or not the color domain is computed with respect to the input data (here in
z) or the bounds set inzminandzmaxDefaults tofalsewhenzminandzmaxare set by the user.The ‘zauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zmax¶ Sets the upper bound of the color domain. Value should have the same units as in
zand if set,zminmust be set as well.- The ‘zmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmid¶ Sets the mid-point of the color domain by scaling
zminand/orzmaxto be equidistant to this point. Value should have the same units as inz. Has no effect whenzautoisfalse.- The ‘zmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
zmin¶ Sets the lower bound of the color domain. Value should have the same units as in
zand if set,zmaxmust be set as well.- The ‘zmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
-
class
plotly.graph_objects.Histogram2dcontour(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Histogram2dcontour is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.Histogram2dContour
-
class
plotly.graph_objects.Icicle(arg=None, branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
branchvalues¶ Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.- The ‘branchvalues’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘remainder’, ‘total’]
- Returns
- Return type
Any
-
property
count¶ Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.The ‘count’ property is a flaglist and may be specified as a string containing:
Any combination of [‘branches’, ‘leaves’] joined with ‘+’ characters (e.g. ‘branches+leaves’)
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.icicle.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘name’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.icicle.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextfont¶ Sets the font used for
textinfolying inside the sector.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.icicle.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
labels¶ Sets the labels of each of the sectors.
The ‘labels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelssrc¶ Sets the source reference on Chart Studio Cloud for
labels.The ‘labelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
leaf¶ The ‘leaf’ property is an instance of Leaf that may be specified as:
An instance of
plotly.graph_objects.icicle.LeafA dict of string/value properties that will be passed to the Leaf constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.icicle.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
level¶ Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.The ‘level’ property accepts values of any type
- Returns
- Return type
Any
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.icicle.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
maxdepth¶ Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.- The ‘maxdepth’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
outsidetextfont¶ Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.icicle.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
parents¶ Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.The ‘parents’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
parentssrc¶ Sets the source reference on Chart Studio Cloud for
parents.The ‘parentssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
pathbar¶ The ‘pathbar’ property is an instance of Pathbar that may be specified as:
An instance of
plotly.graph_objects.icicle.PathbarA dict of string/value properties that will be passed to the Pathbar constructor
- Returns
- Return type
-
property
root¶ The ‘root’ property is an instance of Root that may be specified as:
An instance of
plotly.graph_objects.icicle.RootA dict of string/value properties that will be passed to the Root constructor
- Returns
- Return type
-
property
sort¶ Determines whether or not the sectors are reordered from largest to smallest.
The ‘sort’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.icicle.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the font used for
textinfo.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.icicle.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph.
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Sets the positions of the
textelements.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
tiling¶ The ‘tiling’ property is an instance of Tiling that may be specified as:
An instance of
plotly.graph_objects.icicle.TilingA dict of string/value properties that will be passed to the Tiling constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
values¶ Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.The ‘values’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuessrc¶ Sets the source reference on Chart Studio Cloud for
values.The ‘valuessrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Image(arg=None, colormodel=None, customdata=None, customdatasrc=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, opacity=None, source=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x0=None, xaxis=None, y0=None, yaxis=None, z=None, zmax=None, zmin=None, zorder=None, zsmooth=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
colormodel¶ Color model used to map the numerical color components described in
zinto colors. Ifsourceis specified, this attribute will be set torgba256otherwise it defaults torgb.- The ‘colormodel’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘rgb’, ‘rgba’, ‘rgba256’, ‘hsl’, ‘hsla’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Set the pixel’s horizontal size.
- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Set the pixel’s vertical size
- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘color’, ‘name’, ‘text’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.image.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesz,colorandcolormodel. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.The ‘hovertext’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.image.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
source¶ Specifies the data URI of the image to be visualized. The URI consists of “data:image/[<media subtype>][;base64],<data>”
- The ‘source’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.image.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each z value.
The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x0¶ Set the image’s x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2
The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
y0¶ Set the image’s y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range.
The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
z¶ A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zmax¶ - Array defining the higher bound for each color component. Note
that the default value will depend on the colormodel. For the
rgbcolormodel, it is [255, 255, 255]. For thergbacolormodel, it is [255, 255, 255, 1]. For thergba256colormodel, it is [255, 255, 255, 255]. For thehslcolormodel, it is [360, 100, 100]. For thehslacolormodel, it is [360, 100, 100, 1].The ‘zmax’ property is an info array that may be specified as:
a list or tuple of 4 elements where:
- The ‘zmax[0]’ property is a number and may be specified as:
An int or float
- The ‘zmax[1]’ property is a number and may be specified as:
An int or float
- The ‘zmax[2]’ property is a number and may be specified as:
An int or float
- The ‘zmax[3]’ property is a number and may be specified as:
An int or float
list
-
property
zmin¶ - Array defining the lower bound for each color component. Note
that the default value will depend on the colormodel. For the
rgbcolormodel, it is [0, 0, 0]. For thergbacolormodel, it is [0, 0, 0, 0]. For thergba256colormodel, it is [0, 0, 0, 0]. For thehslcolormodel, it is [0, 0, 0]. For thehslacolormodel, it is [0, 0, 0, 0].The ‘zmin’ property is an info array that may be specified as:
a list or tuple of 4 elements where:
- The ‘zmin[0]’ property is a number and may be specified as:
An int or float
- The ‘zmin[1]’ property is a number and may be specified as:
An int or float
- The ‘zmin[2]’ property is a number and may be specified as:
An int or float
- The ‘zmin[3]’ property is a number and may be specified as:
An int or float
list
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
zsmooth¶ Picks a smoothing algorithm used to smooth
zdata. This only applies for image traces that use thesourceattribute.- The ‘zsmooth’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘fast’, False]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Indicator(arg=None, align=None, customdata=None, customdatasrc=None, delta=None, domain=None, gauge=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, mode=None, name=None, number=None, stream=None, title=None, uid=None, uirevision=None, value=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
align¶ Sets the horizontal alignment of the
textwithin the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centered- The ‘align’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘left’, ‘center’, ‘right’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
delta¶ The ‘delta’ property is an instance of Delta that may be specified as:
An instance of
plotly.graph_objects.indicator.DeltaA dict of string/value properties that will be passed to the Delta constructor
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.indicator.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
gauge¶ The gauge of the Indicator plot.
The ‘gauge’ property is an instance of Gauge that may be specified as:
An instance of
plotly.graph_objects.indicator.GaugeA dict of string/value properties that will be passed to the Gauge constructor
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.indicator.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines how the value is displayed on the graph.
numberdisplays the value numerically in text.deltadisplays the difference to a reference value in text. Finally,gaugedisplays the value graphically on an axis.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘number’, ‘delta’, ‘gauge’] joined with ‘+’ characters (e.g. ‘number+delta’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
number¶ The ‘number’ property is an instance of Number that may be specified as:
An instance of
plotly.graph_objects.indicator.NumberA dict of string/value properties that will be passed to the Number constructor
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.indicator.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
title¶ The ‘title’ property is an instance of Title that may be specified as:
An instance of
plotly.graph_objects.indicator.TitleA dict of string/value properties that will be passed to the Title constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
value¶ Sets the number to be displayed.
- The ‘value’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Isosurface(arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
caps¶ The ‘caps’ property is an instance of Caps that may be specified as:
An instance of
plotly.graph_objects.isosurface.CapsA dict of string/value properties that will be passed to the Caps constructor
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.isosurface.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
contour¶ The ‘contour’ property is an instance of Contour that may be specified as:
An instance of
plotly.graph_objects.isosurface.ContourA dict of string/value properties that will be passed to the Contour constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
flatshading¶ Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections.
The ‘flatshading’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.isosurface.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
isomax¶ Sets the maximum boundary for iso-surface plot.
- The ‘isomax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
isomin¶ Sets the minimum boundary for iso-surface plot.
- The ‘isomin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.isosurface.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.isosurface.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.isosurface.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
slices¶ The ‘slices’ property is an instance of Slices that may be specified as:
An instance of
plotly.graph_objects.isosurface.SlicesA dict of string/value properties that will be passed to the Slices constructor
- Returns
- Return type
-
property
spaceframe¶ The ‘spaceframe’ property is an instance of Spaceframe that may be specified as:
An instance of
plotly.graph_objects.isosurface.SpaceframeA dict of string/value properties that will be passed to the Spaceframe constructor
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.isosurface.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
surface¶ The ‘surface’ property is an instance of Surface that may be specified as:
An instance of
plotly.graph_objects.isosurface.SurfaceA dict of string/value properties that will be passed to the Surface constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
value¶ Sets the 4th dimension (value) of the vertices.
The ‘value’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuehoverformat¶ Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘valuehoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
valuesrc¶ Sets the source reference on Chart Studio Cloud for
value.The ‘valuesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the X coordinates of the vertices on X axis.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the Y coordinates of the vertices on Y axis.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the Z coordinates of the vertices on Z axis.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Layout(arg=None, activeselection=None, activeshape=None, annotations=None, annotationdefaults=None, autosize=None, autotypenumbers=None, barcornerradius=None, bargap=None, bargroupgap=None, barmode=None, barnorm=None, boxgap=None, boxgroupgap=None, boxmode=None, calendar=None, clickmode=None, coloraxis=None, colorscale=None, colorway=None, computed=None, datarevision=None, dragmode=None, editrevision=None, extendfunnelareacolors=None, extendiciclecolors=None, extendpiecolors=None, extendsunburstcolors=None, extendtreemapcolors=None, font=None, funnelareacolorway=None, funnelgap=None, funnelgroupgap=None, funnelmode=None, geo=None, grid=None, height=None, hiddenlabels=None, hiddenlabelssrc=None, hidesources=None, hoverdistance=None, hoverlabel=None, hovermode=None, hoversubplots=None, iciclecolorway=None, images=None, imagedefaults=None, legend=None, map=None, mapbox=None, margin=None, meta=None, metasrc=None, minreducedheight=None, minreducedwidth=None, modebar=None, newselection=None, newshape=None, paper_bgcolor=None, piecolorway=None, plot_bgcolor=None, polar=None, scattergap=None, scattermode=None, scene=None, selectdirection=None, selectionrevision=None, selections=None, selectiondefaults=None, separators=None, shapes=None, shapedefaults=None, showlegend=None, sliders=None, sliderdefaults=None, smith=None, spikedistance=None, sunburstcolorway=None, template=None, ternary=None, title=None, transition=None, treemapcolorway=None, uirevision=None, uniformtext=None, updatemenus=None, updatemenudefaults=None, violingap=None, violingroupgap=None, violinmode=None, waterfallgap=None, waterfallgroupgap=None, waterfallmode=None, width=None, xaxis=None, yaxis=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseLayoutType-
property
activeselection¶ The ‘activeselection’ property is an instance of Activeselection that may be specified as:
An instance of
plotly.graph_objects.layout.ActiveselectionA dict of string/value properties that will be passed to the Activeselection constructor
- Returns
- Return type
-
property
activeshape¶ The ‘activeshape’ property is an instance of Activeshape that may be specified as:
An instance of
plotly.graph_objects.layout.ActiveshapeA dict of string/value properties that will be passed to the Activeshape constructor
- Returns
- Return type
-
property
annotationdefaults¶ When used in a template (as layout.template.layout.annotationdefaults), sets the default property values to use for elements of layout.annotations
The ‘annotationdefaults’ property is an instance of Annotation that may be specified as:
An instance of
plotly.graph_objects.layout.AnnotationA dict of string/value properties that will be passed to the Annotation constructor
- Returns
- Return type
-
property
annotations¶ The ‘annotations’ property is a tuple of instances of Annotation that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Annotation
A list or tuple of dicts of string/value properties that will be passed to the Annotation constructor
- Returns
- Return type
-
property
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.
The ‘autosize’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
autotypenumbers¶ Using “strict” a numeric string in trace data is not converted to a number. Using convert types a numeric string in trace data may be treated as a number during automatic axis
typedetection. This is the default value; however it could be overridden for individual axes.- The ‘autotypenumbers’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘convert types’, ‘strict’]
- Returns
- Return type
Any
-
property
barcornerradius¶ Sets the rounding of bar corners. May be an integer number of pixels, or a percentage of bar width (as a string ending in %).
The ‘barcornerradius’ property accepts values of any type
- Returns
- Return type
Any
-
property
bargap¶ Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- The ‘bargap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
bargroupgap¶ Sets the gap (in plot fraction) between bars of the same location coordinate.
- The ‘bargroupgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
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 reduce “opacity” to see multiple bars.
- The ‘barmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘stack’, ‘group’, ‘overlay’, ‘relative’]
- Returns
- Return type
Any
-
property
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.
- The ‘barnorm’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘’, ‘fraction’, ‘percent’]
- Returns
- Return type
Any
-
property
boxgap¶ Sets the gap (in plot fraction) between boxes of adjacent location coordinates. Has no effect on traces that have “width” set.
- The ‘boxgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
boxgroupgap¶ Sets the gap (in plot fraction) between boxes of the same location coordinate. Has no effect on traces that have “width” set.
- The ‘boxgroupgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
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.
- The ‘boxmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘group’, ‘overlay’]
- Returns
- Return type
Any
-
property
calendar¶ Sets the default calendar system to use for interpreting and displaying dates throughout the plot.
- The ‘calendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
clickmode¶ Determines the mode of single click interactions. “event” is the default value and emits the
plotly_clickevent. In addition this mode emits theplotly_selectedevent 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” withhovermode: “x” can be confusing, consider explicitly settinghovermode: “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_clickandplotly_selectedevents are not fired.The ‘clickmode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘event’, ‘select’] joined with ‘+’ characters (e.g. ‘event+select’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
coloraxis¶ The ‘coloraxis’ property is an instance of Coloraxis that may be specified as:
An instance of
plotly.graph_objects.layout.ColoraxisA dict of string/value properties that will be passed to the Coloraxis constructor
- Returns
- Return type
-
property
colorscale¶ The ‘colorscale’ property is an instance of Colorscale that may be specified as:
An instance of
plotly.graph_objects.layout.ColorscaleA dict of string/value properties that will be passed to the Colorscale constructor
- Returns
- Return type
-
property
colorway¶ Sets the default trace colors.
The ‘colorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
computed¶ Placeholder for exporting automargin-impacting values namely
margin.t,margin.b,margin.landmargin.rin “full- json” mode.The ‘computed’ property accepts values of any type
- Returns
- Return type
Any
-
property
datarevision¶ If provided, a changed value tells
Plotly.reactthat 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.reactassumes that data arrays are being treated as immutable, thus any data array with a different identity from its predecessor contains new data.The ‘datarevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
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.
- The ‘dragmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘zoom’, ‘pan’, ‘select’, ‘lasso’, ‘drawclosedpath’, ‘drawopenpath’, ‘drawline’, ‘drawrect’, ‘drawcircle’, ‘orbit’, ‘turntable’, False]
- Returns
- Return type
Any
-
property
editrevision¶ true` configuration, other than trace names and axis titles. Defaults to
layout.uirevision.The ‘editrevision’ property accepts values of any type
- Returns
- Return type
Any
- Type
Controls persistence of user-driven changes in `editable
-
property
extendfunnelareacolors¶ If
true, the funnelarea slice colors (whether given byfunnelareacolorwayor inherited fromcolorway) 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 setfalseto disable. Colors provided in the trace, usingmarker.colors, are never extended.The ‘extendfunnelareacolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
extendiciclecolors¶ If
true, the icicle slice colors (whether given byiciclecolorwayor inherited fromcolorway) 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 setfalseto disable. Colors provided in the trace, usingmarker.colors, are never extended.The ‘extendiciclecolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
extendpiecolors¶ If
true, the pie slice colors (whether given bypiecolorwayor inherited fromcolorway) 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 setfalseto disable. Colors provided in the trace, usingmarker.colors, are never extended.The ‘extendpiecolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
extendsunburstcolors¶ If
true, the sunburst slice colors (whether given bysunburstcolorwayor inherited fromcolorway) 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 setfalseto disable. Colors provided in the trace, usingmarker.colors, are never extended.The ‘extendsunburstcolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
extendtreemapcolors¶ If
true, the treemap slice colors (whether given bytreemapcolorwayor inherited fromcolorway) 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 setfalseto disable. Colors provided in the trace, usingmarker.colors, are never extended.The ‘extendtreemapcolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
font¶ Sets the global font. Note that fonts used in traces and other layout components inherit from the global font.
The ‘font’ property is an instance of Font that may be specified as:
An instance of
plotly.graph_objects.layout.FontA dict of string/value properties that will be passed to the Font constructor
- Returns
- Return type
-
property
funnelareacolorway¶ Sets the default funnelarea slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendfunnelareacolors.The ‘funnelareacolorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
funnelgap¶ Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- The ‘funnelgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
funnelgroupgap¶ Sets the gap (in plot fraction) between bars of the same location coordinate.
- The ‘funnelgroupgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
funnelmode¶ 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 “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 reduce “opacity” to see multiple bars.
- The ‘funnelmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘stack’, ‘group’, ‘overlay’]
- Returns
- Return type
Any
-
property
geo¶ The ‘geo’ property is an instance of Geo that may be specified as:
An instance of
plotly.graph_objects.layout.GeoA dict of string/value properties that will be passed to the Geo constructor
- Returns
- Return type
-
property
grid¶ The ‘grid’ property is an instance of Grid that may be specified as:
An instance of
plotly.graph_objects.layout.GridA dict of string/value properties that will be passed to the Grid constructor
- Returns
- Return type
-
property
height¶ Sets the plot’s height (in px).
- The ‘height’ property is a number and may be specified as:
An int or float in the interval [10, inf]
- Returns
- Return type
int|float
hiddenlabels is the funnelarea & pie chart analog of visible:’legendonly’ but it can contain many labels, and can simultaneously hide slices from several pies/funnelarea charts
The ‘hiddenlabels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
Sets the source reference on Chart Studio Cloud for
hiddenlabels.The ‘hiddenlabelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
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 Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise).
The ‘hidesources’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
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.
- The ‘hoverdistance’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807]
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.layout.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovermode¶ Determines the mode of hover interactions. If “closest”, a single hoverlabel will appear for the “closest” point within the
hoverdistance. If “x” (or “y”), multiple hoverlabels will appear for multiple points at the “closest” x- (or y-) coordinate within thehoverdistance, with the caveat that no more than one hoverlabel will appear per trace. If x unified (or y unified), a single hoverlabel will appear multiple points at the closest x- (or y-) coordinate within thehoverdistancewith the caveat that no more than one hoverlabel will appear per trace. In this mode, spikelines are enabled by default perpendicular to the specified axis. If false, hover interactions are disabled.- The ‘hovermode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘x’, ‘y’, ‘closest’, False, ‘x unified’, ‘y unified’]
- Returns
- Return type
Any
-
property
hoversubplots¶ Determines expansion of hover effects to other subplots If “single” just the axis pair of the primary point is included without overlaying subplots. If “overlaying” all subplots using the main axis and occupying the same space are included. If “axis”, also include stacked subplots using the same axis when
hovermodeis set to “x”, x unified, “y” or y unified.- The ‘hoversubplots’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘single’, ‘overlaying’, ‘axis’]
- Returns
- Return type
Any
-
property
iciclecolorway¶ Sets the default icicle slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendiciclecolors.The ‘iciclecolorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
imagedefaults¶ When used in a template (as layout.template.layout.imagedefaults), sets the default property values to use for elements of layout.images
The ‘imagedefaults’ property is an instance of Image that may be specified as:
An instance of
plotly.graph_objects.layout.ImageA dict of string/value properties that will be passed to the Image constructor
- Returns
- Return type
-
property
images¶ The ‘images’ property is a tuple of instances of Image that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Image
A list or tuple of dicts of string/value properties that will be passed to the Image constructor
- Returns
- Return type
-
property
legend¶ The ‘legend’ property is an instance of Legend that may be specified as:
An instance of
plotly.graph_objects.layout.LegendA dict of string/value properties that will be passed to the Legend constructor
- Returns
- Return type
-
property
map¶ The ‘map’ property is an instance of Map that may be specified as:
An instance of
plotly.graph_objects.layout.MapA dict of string/value properties that will be passed to the Map constructor
- Returns
- Return type
-
property
mapbox¶ The ‘mapbox’ property is an instance of Mapbox that may be specified as:
An instance of
plotly.graph_objects.layout.MapboxA dict of string/value properties that will be passed to the Mapbox constructor
- Returns
- Return type
-
property
margin¶ The ‘margin’ property is an instance of Margin that may be specified as:
An instance of
plotly.graph_objects.layout.MarginA dict of string/value properties that will be passed to the Margin constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information that can be used in various
textattributes. Attributes such as the graph, axis and colorbartitle.text, annotationtexttrace.namein legend items,rangeselector,updatemenusandsliderslabeltext all supportmeta. One can accessmetafields using template strings:%{meta[i]}whereiis the index of themetaitem in question.metacan also be an object for example{key: value}which can be accessed %{meta[key]}.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
minreducedheight¶ Minimum height of the plot with margin.automargin applied (in px)
- The ‘minreducedheight’ property is a number and may be specified as:
An int or float in the interval [2, inf]
- Returns
- Return type
int|float
-
property
minreducedwidth¶ Minimum width of the plot with margin.automargin applied (in px)
- The ‘minreducedwidth’ property is a number and may be specified as:
An int or float in the interval [2, inf]
- Returns
- Return type
int|float
-
property
modebar¶ The ‘modebar’ property is an instance of Modebar that may be specified as:
An instance of
plotly.graph_objects.layout.ModebarA dict of string/value properties that will be passed to the Modebar constructor
- Returns
- Return type
-
property
newselection¶ The ‘newselection’ property is an instance of Newselection that may be specified as:
An instance of
plotly.graph_objects.layout.NewselectionA dict of string/value properties that will be passed to the Newselection constructor
- Returns
- Return type
-
property
newshape¶ The ‘newshape’ property is an instance of Newshape that may be specified as:
An instance of
plotly.graph_objects.layout.NewshapeA dict of string/value properties that will be passed to the Newshape constructor
- Returns
- Return type
-
property
paper_bgcolor¶ Sets the background color of the paper where the graph is drawn.
- The ‘paper_bgcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
piecolorway¶ Sets the default pie slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendpiecolors.The ‘piecolorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
plot_bgcolor¶ Sets the background color of the plotting area in-between x and y axes.
- The ‘plot_bgcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
polar¶ The ‘polar’ property is an instance of Polar that may be specified as:
An instance of
plotly.graph_objects.layout.PolarA dict of string/value properties that will be passed to the Polar constructor
- Returns
- Return type
-
re= <module 're' from '/home/circleci/.pyenv/versions/3.9.25/lib/python3.9/re.py'>¶
-
property
scattergap¶ Sets the gap (in plot fraction) between scatter points of adjacent location coordinates. Defaults to
bargap.- The ‘scattergap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
scattermode¶ Determines how scatter points at the same location coordinate are displayed on the graph. With “group”, the scatter points are plotted next to one another centered around the shared location. With “overlay”, the scatter points are plotted over one another, you might need to reduce “opacity” to see multiple scatter points.
- The ‘scattermode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘group’, ‘overlay’]
- Returns
- Return type
Any
-
property
scene¶ The ‘scene’ property is an instance of Scene that may be specified as:
An instance of
plotly.graph_objects.layout.SceneA dict of string/value properties that will be passed to the Scene constructor
- Returns
- Return type
-
property
selectdirection¶ When
dragmodeis 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.- The ‘selectdirection’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘h’, ‘v’, ‘d’, ‘any’]
- Returns
- Return type
Any
-
property
selectiondefaults¶ When used in a template (as layout.template.layout.selectiondefaults), sets the default property values to use for elements of layout.selections
The ‘selectiondefaults’ property is an instance of Selection that may be specified as:
An instance of
plotly.graph_objects.layout.SelectionA dict of string/value properties that will be passed to the Selection constructor
- Returns
- Return type
-
property
selectionrevision¶ Controls persistence of user-driven changes in selected points from all traces.
The ‘selectionrevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
selections¶ The ‘selections’ property is a tuple of instances of Selection that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Selection
A list or tuple of dicts of string/value properties that will be passed to the Selection constructor
- Returns
- Return type
-
property
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.
- The ‘separators’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
shapedefaults¶ When used in a template (as layout.template.layout.shapedefaults), sets the default property values to use for elements of layout.shapes
The ‘shapedefaults’ property is an instance of Shape that may be specified as:
An instance of
plotly.graph_objects.layout.ShapeA dict of string/value properties that will be passed to the Shape constructor
- Returns
- Return type
-
property
shapes¶ The ‘shapes’ property is a tuple of instances of Shape that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Shape
A list or tuple of dicts of string/value properties that will be passed to the Shape constructor
- Returns
- Return type
-
property
showlegend¶ Determines whether or not a legend is drawn. Default is
trueif 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 withshowlegend: true.The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
sliderdefaults¶ When used in a template (as layout.template.layout.sliderdefaults), sets the default property values to use for elements of layout.sliders
The ‘sliderdefaults’ property is an instance of Slider that may be specified as:
An instance of
plotly.graph_objects.layout.SliderA dict of string/value properties that will be passed to the Slider constructor
- Returns
- Return type
-
property
sliders¶ The ‘sliders’ property is a tuple of instances of Slider that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Slider
A list or tuple of dicts of string/value properties that will be passed to the Slider constructor
- Returns
- Return type
-
property
smith¶ The ‘smith’ property is an instance of Smith that may be specified as:
An instance of
plotly.graph_objects.layout.SmithA dict of string/value properties that will be passed to the Smith constructor
- Returns
- Return type
-
property
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.
- The ‘spikedistance’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807]
- Returns
- Return type
-
property
sunburstcolorway¶ Sets the default sunburst slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendsunburstcolors.The ‘sunburstcolorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
template¶ Default attributes to be applied to the plot. This should be a dict with format:
{'layout': layoutTemplate, 'data': {trace_type: [traceTemplate, ...], ...}}wherelayoutTemplateis a dict matching the structure offigure.layoutandtraceTemplateis a dict matching the structure of the trace with typetrace_type(e.g. ‘scatter’). Alternatively, this may be specified as an instance of plotly.graph_objects.layout.Template. Trace templates are applied cyclically to traces of each type. Container arrays (egannotations) have special handling: An object ending indefaults(egannotationdefaults) is applied to each array item. But if an item has atemplateitemnamekey we look in the template array for an item with matchingnameand apply that instead. If no matchingnameis 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 matchingtemplateitemnameandvisible: false.The ‘template’ property is an instance of Template that may be specified as:
An instance of
plotly.graph_objects.layout.TemplateA dict of string/value properties that will be passed to the Template constructor
The name of a registered template where current registered templates are stored in the plotly.io.templates configuration object. The names of all registered templates can be retrieved with:
>>> import plotly.io as pio >>> list(pio.templates) ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', ...]
A string containing multiple registered template names, joined on ‘+’ characters (e.g. ‘template1+template2’). In this case the resulting template is computed by merging together the collection of registered templates
- Returns
- Return type
-
property
ternary¶ The ‘ternary’ property is an instance of Ternary that may be specified as:
An instance of
plotly.graph_objects.layout.TernaryA dict of string/value properties that will be passed to the Ternary constructor
- Returns
- Return type
-
property
title¶ The ‘title’ property is an instance of Title that may be specified as:
An instance of
plotly.graph_objects.layout.TitleA dict of string/value properties that will be passed to the Title constructor
- Returns
- Return type
-
property
transition¶ Sets transition options used during Plotly.react updates.
The ‘transition’ property is an instance of Transition that may be specified as:
An instance of
plotly.graph_objects.layout.TransitionA dict of string/value properties that will be passed to the Transition constructor
- Returns
- Return type
-
property
treemapcolorway¶ Sets the default treemap slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendtreemapcolors.The ‘treemapcolorway’ property is a colorlist that may be specified as a tuple, list, one-dimensional numpy array, or pandas Series of valid color strings
- Returns
- Return type
-
property
uirevision¶ Used to allow user interactions with the plot to persist after
Plotly.reactcalls that are unaware of these interactions. Ifuirevisionis omitted, or if it is given and it changed from the previousPlotly.reactcall, the exact new figure is used. Ifuirevisionis 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.uirevisionattribute serves as the default foruirevisionattributes 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 setxaxis.uirevision=*time*andyaxis.uirevision=*cost*. Then if only the y data is changed, you can updateyaxis.uirevision=*quantity*and the y axis range will reset but the x axis range will retain any user- driven zoom.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
uniformtext¶ The ‘uniformtext’ property is an instance of Uniformtext that may be specified as:
An instance of
plotly.graph_objects.layout.UniformtextA dict of string/value properties that will be passed to the Uniformtext constructor
- Returns
- Return type
When used in a template (as layout.template.layout.updatemenudefaults), sets the default property values to use for elements of layout.updatemenus
The ‘updatemenudefaults’ property is an instance of Updatemenu that may be specified as:
An instance of
plotly.graph_objects.layout.UpdatemenuA dict of string/value properties that will be passed to the Updatemenu constructor
- Returns
- Return type
The ‘updatemenus’ property is a tuple of instances of Updatemenu that may be specified as:
A list or tuple of instances of plotly.graph_objects.layout.Updatemenu
A list or tuple of dicts of string/value properties that will be passed to the Updatemenu constructor
- Returns
- Return type
-
property
violingap¶ Sets the gap (in plot fraction) between violins of adjacent location coordinates. Has no effect on traces that have “width” set.
- The ‘violingap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
violingroupgap¶ Sets the gap (in plot fraction) between violins of the same location coordinate. Has no effect on traces that have “width” set.
- The ‘violingroupgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
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.
- The ‘violinmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘group’, ‘overlay’]
- Returns
- Return type
Any
-
property
waterfallgap¶ Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- The ‘waterfallgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
waterfallgroupgap¶ Sets the gap (in plot fraction) between bars of the same location coordinate.
- The ‘waterfallgroupgap’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
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 reduce “opacity” to see multiple bars.
- The ‘waterfallmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘group’, ‘overlay’]
- Returns
- Return type
Any
-
property
width¶ Sets the plot’s width (in px).
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [10, inf]
- Returns
- Return type
int|float
-
property
xaxis¶ The ‘xaxis’ property is an instance of XAxis that may be specified as:
An instance of
plotly.graph_objects.layout.XAxisA dict of string/value properties that will be passed to the XAxis constructor
- Returns
- Return type
-
property
yaxis¶ The ‘yaxis’ property is an instance of YAxis that may be specified as:
An instance of
plotly.graph_objects.layout.YAxisA dict of string/value properties that will be passed to the YAxis constructor
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Legend(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Legend is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.Legend
-
class
plotly.graph_objects.Line(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Line is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.Line
plotly.graph_objects.layout.shape.Line
etc.
-
class
plotly.graph_objects.Margin(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Margin is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.Margin
-
class
plotly.graph_objects.Marker(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Marker is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.Marker
plotly.graph_objects.histogram.selected.Marker
etc.
-
class
plotly.graph_objects.Mesh3d(arg=None, alphahull=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, delaunayaxis=None, facecolor=None, facecolorsrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, i=None, ids=None, idssrc=None, intensity=None, intensitymode=None, intensitysrc=None, isrc=None, j=None, jsrc=None, k=None, ksrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, vertexcolor=None, vertexcolorsrc=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alphahull¶ Determines how the mesh surface triangles are derived from the set of vertices (points) represented by the
x,yandzarrays, if thei,j,karrays are not supplied. For general use ofmesh3dit is preferred thati,j,kare supplied. If “-1”, Delaunay triangulation is used, which is mainly suitable if the mesh is a single, more or less layer surface that is perpendicular todelaunayaxis. In case thedelaunayaxisintersects the mesh surface at more than one point it will result triangles that are very long in the dimension ofdelaunayaxis. If “>0”, the alpha-shape algorithm is used. In this case, the positivealphahullvalue signals the use of the alpha-shape algorithm, _and_ its value acts as the parameter for the mesh fitting. If 0, the convex-hull algorithm is used. It is suitable for convex bodies or if the intention is to enclose thex,yandzpoint set into a convex hull.- The ‘alphahull’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here
intensity) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as
intensityand if set,cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asintensity. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as
intensityand if set,cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
color¶ Sets the color of the whole mesh
- The ‘color’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
A number that will be interpreted as a color according to mesh3d.colorscale
- Returns
- Return type
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.mesh3d.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
contour¶ The ‘contour’ property is an instance of Contour that may be specified as:
An instance of
plotly.graph_objects.mesh3d.ContourA dict of string/value properties that will be passed to the Contour constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
delaunayaxis¶ Sets the Delaunay axis, which is the axis that is perpendicular to the surface of the Delaunay triangulation. It has an effect if
i,j,kare not provided andalphahullis set to indicate Delaunay triangulation.- The ‘delaunayaxis’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘x’, ‘y’, ‘z’]
- Returns
- Return type
Any
-
property
facecolor¶ Sets the color of each face Overrides “color” and “vertexcolor”.
The ‘facecolor’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
facecolorsrc¶ Sets the source reference on Chart Studio Cloud for
facecolor.The ‘facecolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
flatshading¶ Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections.
The ‘flatshading’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.mesh3d.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
i¶ A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “first” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherei[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inirepresents a point in space, which is the first vertex of a triangle.The ‘i’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
intensity¶ Sets the intensity values for vertices or cells as defined by
intensitymode. It can be used for plotting fields on meshes.The ‘intensity’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
intensitymode¶ Determines the source of
intensityvalues.- The ‘intensitymode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘vertex’, ‘cell’]
- Returns
- Return type
Any
-
property
intensitysrc¶ Sets the source reference on Chart Studio Cloud for
intensity.The ‘intensitysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
isrc¶ Sets the source reference on Chart Studio Cloud for
i.The ‘isrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
j¶ A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “second” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherej[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element injrepresents a point in space, which is the second vertex of a triangle.The ‘j’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
jsrc¶ Sets the source reference on Chart Studio Cloud for
j.The ‘jsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
k¶ A vector of vertex indices, i.e. integer values between 0 and the length of the vertex vectors, representing the “third” vertex of a triangle. For example,
{i[m], j[m], k[m]}together represent face m (triangle m) in the mesh, wherek[m] = npoints to the triplet{x[n], y[n], z[n]}in the vertex arrays. Therefore, each element inkrepresents a point in space, which is the third vertex of a triangle.The ‘k’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
ksrc¶ Sets the source reference on Chart Studio Cloud for
k.The ‘ksrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.mesh3d.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.mesh3d.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.mesh3d.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.mesh3d.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
vertexcolor¶ Sets the color of each vertex Overrides “color”. While Red, green and blue colors are in the range of 0 and 255; in the case of having vertex color data in RGBA format, the alpha color should be normalized to be between 0 and 1.
The ‘vertexcolor’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
vertexcolorsrc¶ Sets the source reference on Chart Studio Cloud for
vertexcolor.The ‘vertexcolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the X coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the Y coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the Z coordinates of the vertices. The nth element of vectors
x,yandzjointly represent the X, Y and Z coordinates of the nth vertex.The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zcalendar¶ Sets the calendar system to use with
zdate data.- The ‘zcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Ohlc(arg=None, close=None, closesrc=None, customdata=None, customdatasrc=None, decreasing=None, high=None, highsrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, low=None, lowsrc=None, meta=None, metasrc=None, name=None, opacity=None, open=None, opensrc=None, selectedpoints=None, showlegend=None, stream=None, text=None, textsrc=None, tickwidth=None, uid=None, uirevision=None, visible=None, x=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, yaxis=None, yhoverformat=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
close¶ Sets the close values.
The ‘close’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
closesrc¶ Sets the source reference on Chart Studio Cloud for
close.The ‘closesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
decreasing¶ The ‘decreasing’ property is an instance of Decreasing that may be specified as:
An instance of
plotly.graph_objects.ohlc.DecreasingA dict of string/value properties that will be passed to the Decreasing constructor
- Returns
- Return type
-
property
high¶ Sets the high values.
The ‘high’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
highsrc¶ Sets the source reference on Chart Studio Cloud for
high.The ‘highsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.ohlc.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesopen,high,lowandclose. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
increasing¶ The ‘increasing’ property is an instance of Increasing that may be specified as:
An instance of
plotly.graph_objects.ohlc.IncreasingA dict of string/value properties that will be passed to the Increasing constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.ohlc.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.ohlc.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
low¶ Sets the low values.
The ‘low’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lowsrc¶ Sets the source reference on Chart Studio Cloud for
low.The ‘lowsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
open¶ Sets the open values.
The ‘open’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
opensrc¶ Sets the source reference on Chart Studio Cloud for
open.The ‘opensrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.ohlc.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets hover text elements associated with each sample point. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to this trace’s sample points.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
tickwidth¶ Sets the width of the open/close tick marks relative to the “x” minimal interval.
- The ‘tickwidth’ property is a number and may be specified as:
An int or float in the interval [0, 0.5]
- Returns
- Return type
int|float
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates. If absent, linear coordinate will be generated.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Parcats(arg=None, arrangement=None, bundlecolors=None, counts=None, countssrc=None, dimensions=None, dimensiondefaults=None, domain=None, hoverinfo=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, labelfont=None, legendgrouptitle=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, sortpaths=None, stream=None, tickfont=None, uid=None, uirevision=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
arrangement¶ Sets the drag interaction mode for categories and dimensions. If
perpendicular, the categories can only move along a line perpendicular to the paths. Iffreeform, the categories can freely move on the plane. Iffixed, the categories and dimensions are stationary.- The ‘arrangement’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘perpendicular’, ‘freeform’, ‘fixed’]
- Returns
- Return type
Any
-
property
bundlecolors¶ Sort paths so that like colors are bundled together within each category.
The ‘bundlecolors’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
counts¶ The number of observations represented by each state. Defaults to 1 so that each state represents one observation
- The ‘counts’ property is a number and may be specified as:
An int or float in the interval [0, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
countssrc¶ Sets the source reference on Chart Studio Cloud for
counts.The ‘countssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dimensiondefaults¶ When used in a template (as layout.template.data.parcats.dimensiondefaults), sets the default property values to use for elements of parcats.dimensions
The ‘dimensiondefaults’ property is an instance of Dimension that may be specified as:
An instance of
plotly.graph_objects.parcats.DimensionA dict of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
dimensions¶ The dimensions (variables) of the parallel categories diagram.
The ‘dimensions’ property is a tuple of instances of Dimension that may be specified as:
A list or tuple of instances of plotly.graph_objects.parcats.Dimension
A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.parcats.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘count’, ‘probability’] joined with ‘+’ characters (e.g. ‘count+probability’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
- Returns
- Return type
Any
-
property
hoveron¶ Sets the hover interaction mode for the parcats diagram. If
category, hover interaction take place per category. Ifcolor, hover interactions take place per color per category. Ifdimension, hover interactions take place across all categories per dimension.- The ‘hoveron’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘category’, ‘color’, ‘dimension’]
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescount,probability,category,categorycount,colorcountandbandcolorcount. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
labelfont¶ Sets the font for the
dimensionlabels.The ‘labelfont’ property is an instance of Labelfont that may be specified as:
An instance of
plotly.graph_objects.parcats.LabelfontA dict of string/value properties that will be passed to the Labelfont constructor
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.parcats.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.parcats.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
sortpaths¶ Sets the path sorting algorithm. If
forward, sort paths based on dimension categories from left to right. Ifbackward, sort paths based on dimensions categories from right to left.- The ‘sortpaths’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘forward’, ‘backward’]
- Returns
- Return type
Any
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.parcats.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
tickfont¶ Sets the font for the
categorylabels.The ‘tickfont’ property is an instance of Tickfont that may be specified as:
An instance of
plotly.graph_objects.parcats.TickfontA dict of string/value properties that will be passed to the Tickfont constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Parcoords(arg=None, customdata=None, customdatasrc=None, dimensions=None, dimensiondefaults=None, domain=None, ids=None, idssrc=None, labelangle=None, labelfont=None, labelside=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, meta=None, metasrc=None, name=None, rangefont=None, stream=None, tickfont=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dimensiondefaults¶ When used in a template (as layout.template.data.parcoords.dimensiondefaults), sets the default property values to use for elements of parcoords.dimensions
The ‘dimensiondefaults’ property is an instance of Dimension that may be specified as:
An instance of
plotly.graph_objects.parcoords.DimensionA dict of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
dimensions¶ The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported.
The ‘dimensions’ property is a tuple of instances of Dimension that may be specified as:
A list or tuple of instances of plotly.graph_objects.parcoords.Dimension
A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.parcoords.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
labelangle¶ Sets the angle of the labels with respect to the horizontal. For example, a
tickangleof -90 draws the labels vertically. Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.The ‘labelangle’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
labelfont¶ Sets the font for the
dimensionlabels.The ‘labelfont’ property is an instance of Labelfont that may be specified as:
An instance of
plotly.graph_objects.parcoords.LabelfontA dict of string/value properties that will be passed to the Labelfont constructor
- Returns
- Return type
-
property
labelside¶ Specifies the location of the
label. “top” positions labels above, next to the title “bottom” positions labels below the graph Tilted labels with “labelangle” may be positioned better inside margins whenlabelpositionis set to “bottom”.- The ‘labelside’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top’, ‘bottom’]
- Returns
- Return type
Any
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.parcoords.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.parcoords.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
rangefont¶ Sets the font for the
dimensionrange values.The ‘rangefont’ property is an instance of Rangefont that may be specified as:
An instance of
plotly.graph_objects.parcoords.RangefontA dict of string/value properties that will be passed to the Rangefont constructor
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.parcoords.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
tickfont¶ Sets the font for the
dimensiontick values.The ‘tickfont’ property is an instance of Tickfont that may be specified as:
An instance of
plotly.graph_objects.parcoords.TickfontA dict of string/value properties that will be passed to the Tickfont constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.parcoords.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Pie(arg=None, automargin=None, customdata=None, customdatasrc=None, direction=None, dlabel=None, domain=None, hole=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, label0=None, labels=None, labelssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, pull=None, pullsrc=None, rotation=None, scalegroup=None, showlegend=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, title=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
automargin¶ Determines whether outside text labels can push the margins.
The ‘automargin’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
direction¶ Specifies the direction at which succeeding sectors follow one another.
- The ‘direction’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘clockwise’, ‘counterclockwise’]
- Returns
- Return type
Any
-
property
dlabel¶ Sets the label step. See
label0for more info.- The ‘dlabel’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.pie.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hole¶ Sets the fraction of the radius to cut out of the pie. Use this to make a donut chart.
- The ‘hole’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘percent’, ‘name’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.pie.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextfont¶ Sets the font used for
textinfolying inside the sector.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.pie.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
insidetextorientation¶ Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
- The ‘insidetextorientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘horizontal’, ‘radial’, ‘tangential’, ‘auto’]
- Returns
- Return type
Any
-
property
label0¶ Alternate to
labels. Builds a numeric set of labels. Use withdlabelwherelabel0is the starting label anddlabelthe step.- The ‘label0’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
labels¶ Sets the sector labels. If
labelsentries are duplicated, we sum associatedvaluesor simply count occurrences ifvaluesis not provided. For other array attributes (including color) we use the first non-empty entry among all occurrences of the label.The ‘labels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelssrc¶ Sets the source reference on Chart Studio Cloud for
labels.The ‘labelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.pie.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.pie.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
outsidetextfont¶ Sets the font used for
textinfolying outside the sector.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.pie.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
pull¶ Sets the fraction of larger radius to pull the sectors out from the center. This can be a constant to pull all slices apart from each other equally or an array to highlight one or more slices.
- The ‘pull’ property is a number and may be specified as:
An int or float in the interval [0, 1]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
pullsrc¶ Sets the source reference on Chart Studio Cloud for
pull.The ‘pullsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
rotation¶ Instead of the first slice starting at 12 o’clock, rotate to some other angle.
The ‘rotation’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
scalegroup¶ If there are multiple pie charts that should be sized according to their totals, link them by providing a non-empty group id here shared by every trace in the same group.
- The ‘scalegroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
sort¶ Determines whether or not the sectors are reordered from largest to smallest.
The ‘sort’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.pie.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the font used for
textinfo.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.pie.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph.
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘percent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Specifies the location of the
textinfo.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘auto’, ‘none’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslabel,color,value,percentandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
title¶ The ‘title’ property is an instance of Title that may be specified as:
An instance of
plotly.graph_objects.pie.TitleA dict of string/value properties that will be passed to the Title constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
values¶ Sets the values of the sectors. If omitted, we count occurrences of each label.
The ‘values’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuessrc¶ Sets the source reference on Chart Studio Cloud for
values.The ‘valuessrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.RadialAxis(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.RadialAxis is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.RadialAxis
plotly.graph_objects.layout.polar.RadialAxis
-
class
plotly.graph_objects.Sankey(arg=None, arrangement=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, link=None, meta=None, metasrc=None, name=None, node=None, orientation=None, selectedpoints=None, stream=None, textfont=None, uid=None, uirevision=None, valueformat=None, valuesuffix=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
arrangement¶ If value is
snap(the default), the node arrangement is assisted by automatic snapping of elements to preserve space between nodes specified vianodepad. If value isperpendicular, the nodes can only move along a line perpendicular to the flow. If value isfreeform, the nodes can freely move on the plane. If value isfixed, the nodes are stationary.- The ‘arrangement’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘snap’, ‘perpendicular’, ‘freeform’, ‘fixed’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.sankey.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired. Note that this attribute is superseded bynode.hoverinfoandnode.hoverinfofor nodes and links respectively.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [] joined with ‘+’ characters (e.g. ‘’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
- Returns
- Return type
Any
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.sankey.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.sankey.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
link¶ The links of the Sankey plot.
The ‘link’ property is an instance of Link that may be specified as:
An instance of
plotly.graph_objects.sankey.LinkA dict of string/value properties that will be passed to the Link constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
node¶ The nodes of the Sankey plot.
The ‘node’ property is an instance of Node that may be specified as:
An instance of
plotly.graph_objects.sankey.NodeA dict of string/value properties that will be passed to the Node constructor
- Returns
- Return type
-
property
orientation¶ Sets the orientation of the Sankey diagram.
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.sankey.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
textfont¶ Sets the font for node labels
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.sankey.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
valueformat¶ Sets the value formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
- The ‘valueformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
valuesuffix¶ Adds a unit to follow the value in the hover tooltip. Add a space if a separation is necessary from the value.
- The ‘valuesuffix’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scatter(arg=None, alignmentgroup=None, cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, fillgradient=None, fillpattern=None, groupnorm=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, offsetgroup=None, opacity=None, orientation=None, selected=None, selectedpoints=None, showlegend=None, stackgaps=None, stackgroup=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cliponaxis¶ Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
error_x¶ The ‘error_x’ property is an instance of ErrorX that may be specified as:
An instance of
plotly.graph_objects.scatter.ErrorXA dict of string/value properties that will be passed to the ErrorX constructor
- Returns
- Return type
-
property
error_y¶ The ‘error_y’ property is an instance of ErrorY that may be specified as:
An instance of
plotly.graph_objects.scatter.ErrorYA dict of string/value properties that will be passed to the ErrorY constructor
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill- linked traces are not already consecutive, the later ones will be pushed down in the drawing order.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘tozeroy’, ‘tozerox’, ‘tonexty’, ‘tonextx’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available. If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
fillgradient¶ Sets a fill gradient. If not specified, the fillcolor is used instead.
The ‘fillgradient’ property is an instance of Fillgradient that may be specified as:
An instance of
plotly.graph_objects.scatter.FillgradientA dict of string/value properties that will be passed to the Fillgradient constructor
- Returns
- Return type
-
property
fillpattern¶ Sets the pattern within the marker.
The ‘fillpattern’ property is an instance of Fillpattern that may be specified as:
An instance of
plotly.graph_objects.scatter.FillpatternA dict of string/value properties that will be passed to the Fillpattern constructor
- Returns
- Return type
-
property
groupnorm¶ Only relevant when
stackgroupis used, and only the firstgroupnormfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the normalization for the sum of thisstackgroup. With “fraction”, the value of each trace at each location is divided by the sum of all trace values at that location. “percent” is the same but multiplied by 100 to show percentages. If there are multiple subplots, or multiple `stackgroup`s on one subplot, each will be normalized within its own set.- The ‘groupnorm’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘’, ‘fraction’, ‘percent’]
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scatter.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘points’, ‘fills’] joined with ‘+’ characters (e.g. ‘points+fills’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scatter.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scatter.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scatter.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ 1. when
scattermodeis set to “group”. 2. whenstackgroupis used, and only the firstorientationfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Sets the stacking direction. With “v” (“h”), the y (x) values of subsequent traces are added. Also affects the default value offill.- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
- Type
Only relevant in the following cases
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scatter.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stackgaps¶ Only relevant when
stackgroupis used, and only the firststackgapsfound in thestackgroupwill be used - including ifvisibleis “legendonly” but not if it isfalse. Determines how we handle locations at which other traces in this group have data but this one does not. With infer zero we insert a zero at these locations. With “interpolate” we linearly interpolate between existing values, and extrapolate a constant beyond the existing values.- The ‘stackgaps’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘infer zero’, ‘interpolate’]
- Returns
- Return type
Any
-
property
stackgroup¶ Set several scatter traces (on the same subplot) to the same stackgroup in order to add their y values (or their x values if
orientationis “h”). If blank or omitted this trace will not be stacked. Stacking also turnsfillon by default, using “tonexty” (“tonextx”) iforientationis “h” (“v”) and sets the defaultmodeto “lines” irrespective of point count. You can only stack on a numeric (linear or log) axis. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.- The ‘stackgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scatter.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scatter.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scatter.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Scatter3d(arg=None, connectgaps=None, customdata=None, customdatasrc=None, error_x=None, error_y=None, error_z=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, projection=None, scene=None, showlegend=None, stream=None, surfaceaxis=None, surfacecolor=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
error_x¶ The ‘error_x’ property is an instance of ErrorX that may be specified as:
An instance of
plotly.graph_objects.scatter3d.ErrorXA dict of string/value properties that will be passed to the ErrorX constructor
- Returns
- Return type
-
property
error_y¶ The ‘error_y’ property is an instance of ErrorY that may be specified as:
An instance of
plotly.graph_objects.scatter3d.ErrorYA dict of string/value properties that will be passed to the ErrorY constructor
- Returns
- Return type
-
property
error_z¶ The ‘error_z’ property is an instance of ErrorZ that may be specified as:
An instance of
plotly.graph_objects.scatter3d.ErrorZA dict of string/value properties that will be passed to the ErrorZ constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scatter3d.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scatter3d.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scatter3d.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scatter3d.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
projection¶ The ‘projection’ property is an instance of Projection that may be specified as:
An instance of
plotly.graph_objects.scatter3d.ProjectionA dict of string/value properties that will be passed to the Projection constructor
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scatter3d.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
surfaceaxis¶ If “-1”, the scatter points are not fill with a surface If 0, 1, 2, the scatter points are filled with a Delaunay surface about the x, y, z respectively.
- The ‘surfaceaxis’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[-1, 0, 1, 2]
- Returns
- Return type
Any
-
property
surfacecolor¶ Sets the surface fill color.
- The ‘surfacecolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y,z) triplet. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y,z) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scatter3d.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the z coordinates.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zcalendar¶ Sets the calendar system to use with
zdate data.- The ‘zcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Scattercarpet(arg=None, a=None, asrc=None, b=None, bsrc=None, carpet=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxis=None, yaxis=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
a¶ Sets the a-axis coordinates.
The ‘a’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
asrc¶ Sets the source reference on Chart Studio Cloud for
a.The ‘asrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
b¶ Sets the b-axis coordinates.
The ‘b’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
bsrc¶ Sets the source reference on Chart Studio Cloud for
b.The ‘bsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
carpet¶ An identifier for this carpet, so that
scattercarpetandcontourcarpettraces can specify a carpet plot on which they lie- The ‘carpet’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘a’, ‘b’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘a+b’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘points’, ‘fills’] joined with ‘+’ characters (e.g. ‘points+fills’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (a,b) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,bandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattercarpet.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Scattergeo(arg=None, connectgaps=None, customdata=None, customdatasrc=None, featureidkey=None, fill=None, fillcolor=None, geo=None, geojson=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, locationmode=None, locations=None, locationssrc=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
featureidkey¶ Sets the key in GeoJSON features which is used as id to match the items included in the
locationsarray. Only has an effect whengeojsonis set. Support nested property, for example “properties.name”.- The ‘featureidkey’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
geo¶ Sets a reference between this trace’s geospatial coordinates and a geographic map. If “geo” (the default value), the geospatial coordinates refer to
layout.geo. If “geo2”, the geospatial coordinates refer tolayout.geo2, and so on.The ‘geo’ property is an identifier of a particular subplot, of type ‘geo’, that may be specified as the string ‘geo’ optionally followed by an integer >= 1 (e.g. ‘geo’, ‘geo1’, ‘geo2’, ‘geo3’, etc.)
- Returns
- Return type
-
property
geojson¶ Sets optional GeoJSON data associated with this trace. If not given, the features on the base map are used when
locationsis set. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type “FeatureCollection” or “Feature” with geometries of type “Polygon” or “MultiPolygon”.The ‘geojson’ property accepts values of any type
- Returns
- Return type
Any
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lon’, ‘lat’, ‘location’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘lon+lat’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattergeo.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. To be seen, tracehoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lat¶ Sets the latitude coordinates (in degrees North).
The ‘lat’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
latsrc¶ Sets the source reference on Chart Studio Cloud for
lat.The ‘latsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattergeo.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattergeo.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
locationmode¶ The library used by the country names
locationmodeoption is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries inlocationsto regions on the map. Values “ISO-3”, “USA-states”, country names correspond to features on the base map and value “geojson-id” corresponds to features from a custom GeoJSON linked to thegeojsonattribute.- The ‘locationmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘ISO-3’, ‘USA-states’, ‘country names’, ‘geojson-id’]
- Returns
- Return type
Any
-
property
locations¶ Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location given. See
locationmodefor more info.The ‘locations’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
locationssrc¶ Sets the source reference on Chart Studio Cloud for
locations.The ‘locationssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lon¶ Sets the longitude coordinates (in degrees East).
The ‘lon’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lonsrc¶ Sets the source reference on Chart Studio Cloud for
lon.The ‘lonsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattergeo.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattergeo.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattergeo.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (lon,lat) pair or item in
locations. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) orlocationscoordinates. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattergeo.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lon,locationandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattergeo.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scattergl(arg=None, connectgaps=None, customdata=None, customdatasrc=None, dx=None, dy=None, error_x=None, error_y=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, x=None, x0=None, xaxis=None, xcalendar=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, ycalendar=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
error_x¶ The ‘error_x’ property is an instance of ErrorX that may be specified as:
An instance of
plotly.graph_objects.scattergl.ErrorXA dict of string/value properties that will be passed to the ErrorX constructor
- Returns
- Return type
-
property
error_y¶ The ‘error_y’ property is an instance of ErrorY that may be specified as:
An instance of
plotly.graph_objects.scattergl.ErrorYA dict of string/value properties that will be passed to the ErrorY constructor
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill- linked traces are not already consecutive, the later ones will be pushed down in the drawing order.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘tozeroy’, ‘tozerox’, ‘tonexty’, ‘tonextx’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattergl.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattergl.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattergl.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattergl.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace.
The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattergl.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattergl.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattergl.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattergl.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scattermap(arg=None, below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
below¶ Determines if this scattermap trace’s layers are to be inserted before the layer with the specified ID. By default, scattermap layers are inserted above all the base layers. To place the scattermap layers above every other layer, set
belowto “’’”.- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cluster¶ The ‘cluster’ property is an instance of Cluster that may be specified as:
An instance of
plotly.graph_objects.scattermap.ClusterA dict of string/value properties that will be passed to the Cluster constructor
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lon’, ‘lat’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘lon+lat’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattermap.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lat¶ Sets the latitude coordinates (in degrees North).
The ‘lat’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
latsrc¶ Sets the source reference on Chart Studio Cloud for
lat.The ‘latsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattermap.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattermap.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
lon¶ Sets the longitude coordinates (in degrees East).
The ‘lon’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lonsrc¶ Sets the source reference on Chart Studio Cloud for
lon.The ‘lonsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattermap.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattermap.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattermap.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a map subplot. If “map” (the default value), the data refer to
layout.map. If “map2”, the data refer tolayout.map2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘map’, that may be specified as the string ‘map’ optionally followed by an integer >= 1 (e.g. ‘map’, ‘map1’, ‘map2’, ‘map3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the icon text font (color=map.layer.paint.text-color, size=map.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattermap.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattermap.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scattermapbox(arg=None, below=None, cluster=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, lat=None, latsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, lon=None, lonsrc=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
below¶ Determines if this scattermapbox trace’s layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set
belowto “’’”.- The ‘below’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
cluster¶ The ‘cluster’ property is an instance of Cluster that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.ClusterA dict of string/value properties that will be passed to the Cluster constructor
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lon’, ‘lat’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘lon+lat’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
lat¶ Sets the latitude coordinates (in degrees North).
The ‘lat’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
latsrc¶ Sets the source reference on Chart Studio Cloud for
lat.The ‘latsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
lon¶ Sets the longitude coordinates (in degrees East).
The ‘lon’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
lonsrc¶ Sets the source reference on Chart Studio Cloud for
lon.The ‘lonsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ mapbox subplots and traces are deprecated! Please consider switching to
mapsubplots and traces. Learn more at: https://plotly.com/python/maplibre-migration/ as well as https://plotly.com/javascript/maplibre-migration/ Sets a reference between this trace’s data coordinates and a mapbox subplot. If “mapbox” (the default value), the data refer tolayout.mapbox. If “mapbox2”, the data refer tolayout.mapbox2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘mapbox’, that may be specified as the string ‘mapbox’ optionally followed by an integer >= 1 (e.g. ‘mapbox’, ‘mapbox1’, ‘mapbox2’, ‘mapbox3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (lon,lat) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when
typeis set to “symbol”.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variableslat,lonandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattermapbox.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scatterpolar(arg=None, cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
cliponaxis¶ Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dr¶ Sets the r coordinate step.
- The ‘dr’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dtheta¶ Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.- The ‘dtheta’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterpolar has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘r’, ‘theta’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘r+theta’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘points’, ‘fills’] joined with ‘+’ characters (e.g. ‘points+fills’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
r¶ Sets the radial coordinates
The ‘r’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
r0¶ Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.The ‘r0’ property accepts values of any type
- Returns
- Return type
Any
-
property
rsrc¶ Sets the source reference on Chart Studio Cloud for
r.The ‘rsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘polar’, that may be specified as the string ‘polar’ optionally followed by an integer >= 1 (e.g. ‘polar’, ‘polar1’, ‘polar2’, ‘polar3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
theta¶ Sets the angular coordinates
The ‘theta’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
theta0¶ Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.The ‘theta0’ property accepts values of any type
- Returns
- Return type
Any
-
property
thetasrc¶ Sets the source reference on Chart Studio Cloud for
theta.The ‘thetasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
thetaunit¶ Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
- The ‘thetaunit’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘radians’, ‘degrees’, ‘gradians’]
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scatterpolar.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scatterpolargl(arg=None, connectgaps=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, r=None, r0=None, rsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, theta=None, theta0=None, thetasrc=None, thetaunit=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
dr¶ Sets the r coordinate step.
- The ‘dr’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dtheta¶ Sets the theta coordinate step. By default, the
dthetastep equals the subplot’s period divided by the length of thercoordinates.- The ‘dtheta’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
fill¶ Sets the area to fill with a solid color. Defaults to “none” unless this trace is stacked, then it gets “tonexty” (“tonextx”) if
orientationis “v” (“h”) Use withfillcolorif not “none”. “tozerox” and “tozeroy” fill to x=0 and y=0 respectively. “tonextx” and “tonexty” fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like “tozerox” and “tozeroy”. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other. Traces in astackgroupwill only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill- linked traces are not already consecutive, the later ones will be pushed down in the drawing order.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘tozeroy’, ‘tozerox’, ‘tonexty’, ‘tonextx’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘r’, ‘theta’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘r+theta’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
r¶ Sets the radial coordinates
The ‘r’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
r0¶ Alternate to
r. Builds a linear space of r coordinates. Use withdrwherer0is the starting coordinate anddrthe step.The ‘r0’ property accepts values of any type
- Returns
- Return type
Any
-
property
rsrc¶ Sets the source reference on Chart Studio Cloud for
r.The ‘rsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a polar subplot. If “polar” (the default value), the data refer to
layout.polar. If “polar2”, the data refer tolayout.polar2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘polar’, that may be specified as the string ‘polar’ optionally followed by an integer >= 1 (e.g. ‘polar’, ‘polar1’, ‘polar2’, ‘polar3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesr,thetaandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
theta¶ Sets the angular coordinates
The ‘theta’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
theta0¶ Alternate to
theta. Builds a linear space of theta coordinates. Use withdthetawheretheta0is the starting coordinate anddthetathe step.The ‘theta0’ property accepts values of any type
- Returns
- Return type
Any
-
property
thetasrc¶ Sets the source reference on Chart Studio Cloud for
theta.The ‘thetasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
thetaunit¶ Sets the unit of input “theta” values. Has an effect only when on “linear” angular axes.
- The ‘thetaunit’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘radians’, ‘degrees’, ‘gradians’]
- Returns
- Return type
Any
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scatterpolargl.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scattersmith(arg=None, cliponaxis=None, connectgaps=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, imag=None, imagsrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, real=None, realsrc=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
cliponaxis¶ Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scattersmith has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘real’, ‘imag’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘real+imag’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scattersmith.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘points’, ‘fills’] joined with ‘+’ characters (e.g. ‘points+fills’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
imag¶ Sets the imaginary component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
The ‘imag’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
imagsrc¶ Sets the source reference on Chart Studio Cloud for
imag.The ‘imagsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scattersmith.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scattersmith.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scattersmith.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
real¶ Sets the real component of the data, in units of normalized impedance such that real=1, imag=0 is the center of the chart.
The ‘real’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
realsrc¶ Sets the source reference on Chart Studio Cloud for
real.The ‘realsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scattersmith.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scattersmith.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a smith subplot. If “smith” (the default value), the data refer to
layout.smith. If “smith2”, the data refer tolayout.smith2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘smith’, that may be specified as the string ‘smith’ optionally followed by an integer >= 1 (e.g. ‘smith’, ‘smith1’, ‘smith2’, ‘smith3’, etc.)
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scattersmith.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesreal,imagandtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scattersmith.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scatterternary(arg=None, a=None, asrc=None, b=None, bsrc=None, c=None, cliponaxis=None, connectgaps=None, csrc=None, customdata=None, customdatasrc=None, fill=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meta=None, metasrc=None, mode=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, stream=None, subplot=None, sum=None, text=None, textfont=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, unselected=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
a¶ Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.The ‘a’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
asrc¶ Sets the source reference on Chart Studio Cloud for
a.The ‘asrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
b¶ Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.The ‘b’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
bsrc¶ Sets the source reference on Chart Studio Cloud for
b.The ‘bsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
c¶ Sets the quantity of component
ain each data point. Ifa,b, andcare all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to matchternary<i>.sum.The ‘c’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
cliponaxis¶ Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.
The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
csrc¶ Sets the source reference on Chart Studio Cloud for
c.The ‘csrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fill¶ Sets the area to fill with a solid color. Use with
fillcolorif not “none”. scatterternary has a subset of the options available to scatter. “toself” connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. “tonext” fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like “toself” if there is no trace before it. “tonext” should not be used if one trace does not enclose the other.- The ‘fill’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘none’, ‘toself’, ‘tonext’]
- Returns
- Return type
Any
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘a’, ‘b’, ‘c’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘a+b’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.scatterternary.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is “toself” or “tonext” and there are no markers or text, then the default is “fills”, otherwise it is “points”.
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘points’, ‘fills’] joined with ‘+’ characters (e.g. ‘points+fills’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.scatterternary.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.scatterternary.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.scatterternary.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
mode¶ Determines the drawing mode for this scatter trace. If the provided
modeincludes “text” then thetextelements appear at the coordinates. Otherwise, thetextelements appear on hover. If there are less than 20 points and the trace is not stacked then the default is “lines+markers”. Otherwise, “lines”.The ‘mode’ property is a flaglist and may be specified as a string containing:
Any combination of [‘lines’, ‘markers’, ‘text’] joined with ‘+’ characters (e.g. ‘lines+markers’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.scatterternary.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.scatterternary.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
subplot¶ Sets a reference between this trace’s data coordinates and a ternary subplot. If “ternary” (the default value), the data refer to
layout.ternary. If “ternary2”, the data refer tolayout.ternary2, and so on.The ‘subplot’ property is an identifier of a particular subplot, of type ‘ternary’, that may be specified as the string ‘ternary’ optionally followed by an integer >= 1 (e.g. ‘ternary’, ‘ternary1’, ‘ternary2’, ‘ternary3’, etc.)
- Returns
- Return type
-
property
sum¶ The number each triplet should sum to, if only two of
a,b, andcare provided. This overridesternary<i>.sumto normalize this specific trace, but does not affect the values displayed on the axes. 0 (or missing) means to use ternary<i>.sum- The ‘sum’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
text¶ Sets text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c). If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textfont¶ Sets the text font.
The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.scatterternary.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textposition¶ Sets the positions of the
textelements with respects to the (x,y) coordinates.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesa,b,candtext.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.scatterternary.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Scene(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Scene is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.Scene
-
class
plotly.graph_objects.Splom(arg=None, customdata=None, customdatasrc=None, diagonal=None, dimensions=None, dimensiondefaults=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, marker=None, meta=None, metasrc=None, name=None, opacity=None, selected=None, selectedpoints=None, showlegend=None, showlowerhalf=None, showupperhalf=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, xaxes=None, xhoverformat=None, yaxes=None, yhoverformat=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
diagonal¶ The ‘diagonal’ property is an instance of Diagonal that may be specified as:
An instance of
plotly.graph_objects.splom.DiagonalA dict of string/value properties that will be passed to the Diagonal constructor
- Returns
- Return type
-
property
dimensiondefaults¶ When used in a template (as layout.template.data.splom.dimensiondefaults), sets the default property values to use for elements of splom.dimensions
The ‘dimensiondefaults’ property is an instance of Dimension that may be specified as:
An instance of
plotly.graph_objects.splom.DimensionA dict of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
dimensions¶ The ‘dimensions’ property is a tuple of instances of Dimension that may be specified as:
A list or tuple of instances of plotly.graph_objects.splom.Dimension
A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.splom.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.splom.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.splom.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.splom.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showlowerhalf¶ Determines whether or not subplots on the lower half from the diagonal are displayed.
The ‘showlowerhalf’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showupperhalf¶ Determines whether or not subplots on the upper half from the diagonal are displayed.
The ‘showupperhalf’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.splom.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair to appear on hover. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates.
- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.splom.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
xaxes¶ Sets the list of x axes corresponding to dimensions of this splom trace. By default, a splom will match the first N xaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.The ‘xaxes’ property is an info array that may be specified as: * a list of elements where:
The ‘xaxes[i]’ property is an identifier of a particular
subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yaxes¶ Sets the list of y axes corresponding to dimensions of this splom trace. By default, a splom will match the first N yaxes where N is the number of input dimensions. Note that, in case where
diagonal.visibleis false andshowupperhalforshowlowerhalfis false, this splom trace will generate one less x-axis and one less y-axis.The ‘yaxes’ property is an info array that may be specified as: * a list of elements where:
The ‘yaxes[i]’ property is an identifier of a particular
subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Stream(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Stream is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.scatter.Stream
plotly.graph_objects.area.Stream
-
class
plotly.graph_objects.Streamtube(arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, maxdisplayed=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, sizeref=None, starts=None, stream=None, text=None, u=None, uhoverformat=None, uid=None, uirevision=None, usrc=None, v=None, vhoverformat=None, visible=None, vsrc=None, w=None, whoverformat=None, wsrc=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here u/v/w norm) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as u/v/w norm and if set,
cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as u/v/w norm. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as u/v/w norm and if set,
cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.streamtube.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’, ‘norm’, ‘divergence’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.streamtube.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablestubex,tubey,tubez,tubeu,tubev,tubew,normanddivergence. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.streamtube.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.streamtube.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.streamtube.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
maxdisplayed¶ The maximum number of displayed segments in a streamtube.
- The ‘maxdisplayed’ property is a integer and may be specified as:
An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
sizeref¶ The scaling factor for the streamtubes. The default is 1, which avoids two max divergence tubes from touching at adjacent starting positions.
- The ‘sizeref’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
starts¶ The ‘starts’ property is an instance of Starts that may be specified as:
An instance of
plotly.graph_objects.streamtube.StartsA dict of string/value properties that will be passed to the Starts constructor
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.streamtube.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets a text element associated with this trace. If trace
hoverinfocontains a “text” flag, this text element will be seen in all hover labels. Note that streamtube traces do not support arraytextvalues.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
type¶
-
property
u¶ Sets the x components of the vector field.
The ‘u’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
uhoverformat¶ Sets the hover text formatting rulefor
uusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘uhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
usrc¶ Sets the source reference on Chart Studio Cloud for
u.The ‘usrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
v¶ Sets the y components of the vector field.
The ‘v’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
vhoverformat¶ Sets the hover text formatting rulefor
vusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘vhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
vsrc¶ Sets the source reference on Chart Studio Cloud for
v.The ‘vsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
w¶ Sets the z components of the vector field.
The ‘w’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
whoverformat¶ Sets the hover text formatting rulefor
wusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘whoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
wsrc¶ Sets the source reference on Chart Studio Cloud for
w.The ‘wsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
x¶ Sets the x coordinates of the vector field.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates of the vector field.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the z coordinates of the vector field.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Sunburst(arg=None, branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, insidetextorientation=None, labels=None, labelssrc=None, leaf=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, root=None, rotation=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
branchvalues¶ Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.- The ‘branchvalues’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘remainder’, ‘total’]
- Returns
- Return type
Any
-
property
count¶ Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.The ‘count’ property is a flaglist and may be specified as a string containing:
Any combination of [‘branches’, ‘leaves’] joined with ‘+’ characters (e.g. ‘branches+leaves’)
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.sunburst.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘name’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.sunburst.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextfont¶ Sets the font used for
textinfolying inside the sector.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.sunburst.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
insidetextorientation¶ Controls the orientation of the text inside chart sectors. When set to “auto”, text may be oriented in any direction in order to be as big as possible in the middle of a sector. The “horizontal” option orients text to be parallel with the bottom of the chart, and may make text smaller in order to achieve that goal. The “radial” option orients text along the radius of the sector. The “tangential” option orients text perpendicular to the radius of the sector.
- The ‘insidetextorientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘horizontal’, ‘radial’, ‘tangential’, ‘auto’]
- Returns
- Return type
Any
-
property
labels¶ Sets the labels of each of the sectors.
The ‘labels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelssrc¶ Sets the source reference on Chart Studio Cloud for
labels.The ‘labelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
leaf¶ The ‘leaf’ property is an instance of Leaf that may be specified as:
An instance of
plotly.graph_objects.sunburst.LeafA dict of string/value properties that will be passed to the Leaf constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.sunburst.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
level¶ Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.The ‘level’ property accepts values of any type
- Returns
- Return type
Any
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.sunburst.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
maxdepth¶ Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.- The ‘maxdepth’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
outsidetextfont¶ Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented at the center of a sunburst graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.sunburst.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
parents¶ Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.The ‘parents’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
parentssrc¶ Sets the source reference on Chart Studio Cloud for
parents.The ‘parentssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
root¶ The ‘root’ property is an instance of Root that may be specified as:
An instance of
plotly.graph_objects.sunburst.RootA dict of string/value properties that will be passed to the Root constructor
- Returns
- Return type
-
property
rotation¶ Rotates the whole diagram counterclockwise by some angle. By default the first slice starts at 3 o’clock.
The ‘rotation’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
sort¶ Determines whether or not the sectors are reordered from largest to smallest.
The ‘sort’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.sunburst.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the font used for
textinfo.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.sunburst.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph.
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
values¶ Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.The ‘values’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuessrc¶ Sets the source reference on Chart Studio Cloud for
values.The ‘valuessrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Surface(arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, connectgaps=None, contours=None, customdata=None, customdatasrc=None, hidesurface=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, stream=None, surfacecolor=None, surfacecolorsrc=None, text=None, textsrc=None, uid=None, uirevision=None, visible=None, x=None, xcalendar=None, xhoverformat=None, xsrc=None, y=None, ycalendar=None, yhoverformat=None, ysrc=None, z=None, zcalendar=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here z or surfacecolor) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units as z or surfacecolor. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as z or surfacecolor and if set,
cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.surface.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
connectgaps¶ Determines whether or not gaps (i.e. {nan} or missing values) in the
zdata are filled in.The ‘connectgaps’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
contours¶ The ‘contours’ property is an instance of Contours that may be specified as:
An instance of
plotly.graph_objects.surface.ContoursA dict of string/value properties that will be passed to the Contours constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hidesurface¶ Determines whether or not a surface is drawn. For example, set
hidesurfaceto Falsecontours.x.showto True andcontours.y.showto True to draw a wire frame plot.The ‘hidesurface’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.surface.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.surface.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.surface.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.surface.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
opacityscale¶ Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.The ‘opacityscale’ property accepts values of any type
- Returns
- Return type
Any
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.surface.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
surfacecolor¶ Sets the surface color values, used for setting a color scale independent of
z.The ‘surfacecolor’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
surfacecolorsrc¶ Sets the source reference on Chart Studio Cloud for
surfacecolor.The ‘surfacecolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each z value. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xcalendar¶ Sets the calendar system to use with
xdate data.- The ‘xcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
ycalendar¶ Sets the calendar system to use with
ydate data.- The ‘ycalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the z coordinates.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zcalendar¶ Sets the calendar system to use with
zdate data.- The ‘zcalendar’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘chinese’, ‘coptic’, ‘discworld’, ‘ethiopian’, ‘gregorian’, ‘hebrew’, ‘islamic’, ‘jalali’, ‘julian’, ‘mayan’, ‘nanakshahi’, ‘nepali’, ‘persian’, ‘taiwan’, ‘thai’, ‘ummalqura’]
- Returns
- Return type
Any
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Table(arg=None, cells=None, columnorder=None, columnordersrc=None, columnwidth=None, columnwidthsrc=None, customdata=None, customdatasrc=None, domain=None, header=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, name=None, stream=None, uid=None, uirevision=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
cells¶ The ‘cells’ property is an instance of Cells that may be specified as:
An instance of
plotly.graph_objects.table.CellsA dict of string/value properties that will be passed to the Cells constructor
- Returns
- Return type
-
property
columnorder¶ Specifies the rendered order of the data columns; for example, a value
2at position0means that column index0in the data will be rendered as the third column, as columns have an index base of zero.The ‘columnorder’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
columnordersrc¶ Sets the source reference on Chart Studio Cloud for
columnorder.The ‘columnordersrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
columnwidth¶ The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths.
- The ‘columnwidth’ property is a number and may be specified as:
An int or float
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
columnwidthsrc¶ Sets the source reference on Chart Studio Cloud for
columnwidth.The ‘columnwidthsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.table.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
header¶ The ‘header’ property is an instance of Header that may be specified as:
An instance of
plotly.graph_objects.table.HeaderA dict of string/value properties that will be passed to the Header constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.table.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.table.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.table.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Trace(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.Trace is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.Scatter
plotly.graph_objects.Bar
plotly.graph_objects.Area
plotly.graph_objects.Histogram
etc.
-
class
plotly.graph_objects.Treemap(arg=None, branchvalues=None, count=None, customdata=None, customdatasrc=None, domain=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, insidetextfont=None, labels=None, labelssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, level=None, marker=None, maxdepth=None, meta=None, metasrc=None, name=None, opacity=None, outsidetextfont=None, parents=None, parentssrc=None, pathbar=None, root=None, sort=None, stream=None, text=None, textfont=None, textinfo=None, textposition=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, tiling=None, uid=None, uirevision=None, values=None, valuessrc=None, visible=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
branchvalues¶ Determines how the items in
valuesare summed. When set to “total”, items invaluesare taken to be value of all its descendants. When set to “remainder”, items invaluescorresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves.- The ‘branchvalues’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘remainder’, ‘total’]
- Returns
- Return type
Any
-
property
count¶ Determines default for
valueswhen it is not provided, by inferring a 1 for each of the “leaves” and/or “branches”, otherwise 0.The ‘count’ property is a flaglist and may be specified as a string containing:
Any combination of [‘branches’, ‘leaves’] joined with ‘+’ characters (e.g. ‘branches+leaves’)
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
domain¶ The ‘domain’ property is an instance of Domain that may be specified as:
An instance of
plotly.graph_objects.treemap.DomainA dict of string/value properties that will be passed to the Domain constructor
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘name’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.treemap.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntryandpercentParent. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each sector. If a single string, the same string appears for all data points. If an array of string, the items are mapped in order of this trace’s sectors. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
insidetextfont¶ Sets the font used for
textinfolying inside the sector.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.treemap.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
labels¶ Sets the labels of each of the sectors.
The ‘labels’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
labelssrc¶ Sets the source reference on Chart Studio Cloud for
labels.The ‘labelssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.treemap.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
level¶ Sets the level from which this trace hierarchy is rendered. Set
levelto''to start from the root node in the hierarchy. Must be an “id” ifidsis filled in, otherwise plotly attempts to find a matching item inlabels.The ‘level’ property accepts values of any type
- Returns
- Return type
Any
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.treemap.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
maxdepth¶ Sets the number of rendered sectors from any given
level. Setmaxdepthto “-1” to render all the levels in the hierarchy.- The ‘maxdepth’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
outsidetextfont¶ Sets the font used for
textinfolying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won’t have any effect andinsidetextfontwould be used.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.treemap.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
parents¶ Sets the parent sectors for each of the sectors. Empty string items ‘’ are understood to reference the root node in the hierarchy. If
idsis filled,parentsitems are understood to be “ids” themselves. Whenidsis not set, plotly attempts to find matching items inlabels, but beware they must be unique.The ‘parents’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
parentssrc¶ Sets the source reference on Chart Studio Cloud for
parents.The ‘parentssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
pathbar¶ The ‘pathbar’ property is an instance of Pathbar that may be specified as:
An instance of
plotly.graph_objects.treemap.PathbarA dict of string/value properties that will be passed to the Pathbar constructor
- Returns
- Return type
-
property
root¶ The ‘root’ property is an instance of Root that may be specified as:
An instance of
plotly.graph_objects.treemap.RootA dict of string/value properties that will be passed to the Root constructor
- Returns
- Return type
-
property
sort¶ Determines whether or not the sectors are reordered from largest to smallest.
The ‘sort’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.treemap.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each sector. If trace
textinfocontains a “text” flag, these elements will be seen on the chart. If tracehoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.The ‘text’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
textfont¶ Sets the font used for
textinfo.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.treemap.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph.
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘value’, ‘current path’, ‘percent root’, ‘percent entry’, ‘percent parent’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Sets the positions of the
textelements.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘top left’, ‘top center’, ‘top right’, ‘middle left’, ‘middle center’, ‘middle right’, ‘bottom left’, ‘bottom center’, ‘bottom right’]
- Returns
- Return type
Any
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablescurrentPath,root,entry,percentRoot,percentEntry,percentParent,labelandvalue.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
tiling¶ The ‘tiling’ property is an instance of Tiling that may be specified as:
An instance of
plotly.graph_objects.treemap.TilingA dict of string/value properties that will be passed to the Tiling constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
values¶ Sets the values associated with each of the sectors. Use with
branchvaluesto determine how the values are summed.The ‘values’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuessrc¶ Sets the source reference on Chart Studio Cloud for
values.The ‘valuessrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
-
class
plotly.graph_objects.Violin(arg=None, alignmentgroup=None, bandwidth=None, box=None, customdata=None, customdatasrc=None, fillcolor=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hoveron=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, jitter=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, line=None, marker=None, meanline=None, meta=None, metasrc=None, name=None, offsetgroup=None, opacity=None, orientation=None, pointpos=None, points=None, quartilemethod=None, scalegroup=None, scalemode=None, selected=None, selectedpoints=None, showlegend=None, side=None, span=None, spanmode=None, stream=None, text=None, textsrc=None, uid=None, uirevision=None, unselected=None, visible=None, width=None, x=None, x0=None, xaxis=None, xhoverformat=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
bandwidth¶ Sets the bandwidth used to compute the kernel density estimate. By default, the bandwidth is determined by Silverman’s rule of thumb.
- The ‘bandwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
box¶ The ‘box’ property is an instance of Box that may be specified as:
An instance of
plotly.graph_objects.violin.BoxA dict of string/value properties that will be passed to the Box constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
fillcolor¶ Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
- The ‘fillcolor’ property is a color and may be specified as:
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
A named CSS color: see https://plotly.com/python/css-colors/ for a list
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.violin.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hoveron¶ Do the hover effects highlight individual violins or sample points or the kernel density estimate or any combination of them?
The ‘hoveron’ property is a flaglist and may be specified as a string containing:
Any combination of [‘violins’, ‘points’, ‘kde’] joined with ‘+’ characters (e.g. ‘violins+points’) OR exactly one of [‘all’] (e.g. ‘all’)
- Returns
- Return type
Any
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
jitter¶ Sets the amount of jitter in the sample points drawn. If 0, the sample points align along the distribution axis. If 1, the sample points are drawn in a random jitter of width equal to the width of the violins.
- The ‘jitter’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.violin.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
line¶ The ‘line’ property is an instance of Line that may be specified as:
An instance of
plotly.graph_objects.violin.LineA dict of string/value properties that will be passed to the Line constructor
- Returns
- Return type
-
property
marker¶ The ‘marker’ property is an instance of Marker that may be specified as:
An instance of
plotly.graph_objects.violin.MarkerA dict of string/value properties that will be passed to the Marker constructor
- Returns
- Return type
-
property
meanline¶ The ‘meanline’ property is an instance of Meanline that may be specified as:
An instance of
plotly.graph_objects.violin.MeanlineA dict of string/value properties that will be passed to the Meanline constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover. For violin traces, the name will also be used for the position coordinate, if
xandx0(yandy0if horizontal) are missing and the position axis is categorical. Note that the trace name is also used as a default value for attributescalegroup(please see its description for details).- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the violin(s). If “v” (“h”), the distribution is visualized along the vertical (horizontal).
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
pointpos¶ Sets the position of the sample points in relation to the violins. If 0, the sample points are places over the center of the violins. Positive (negative) values correspond to positions to the right (left) for vertical violins and above (below) for horizontal violins.
- The ‘pointpos’ property is a number and may be specified as:
An int or float in the interval [-2, 2]
- Returns
- Return type
int|float
-
property
points¶ If “outliers”, only the sample points lying outside the whiskers are shown If “suspectedoutliers”, the outlier points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (see
outliercolor) If “all”, all sample points are shown If False, only the violins are shown with no sample points. Defaults to “suspectedoutliers” whenmarker.outliercolorormarker.line.outliercoloris set, otherwise defaults to “outliers”.- The ‘points’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘all’, ‘outliers’, ‘suspectedoutliers’, False]
- Returns
- Return type
Any
-
property
quartilemethod¶ Sets the method used to compute the sample’s Q1 and Q3 quartiles. The “linear” method uses the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html). The “exclusive” method uses the median to divide the ordered dataset into two halves if the sample is odd, it does not include the median in either half - Q1 is then the median of the lower half and Q3 the median of the upper half. The “inclusive” method also uses the median to divide the ordered dataset into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median of the lower half and Q3 the median of the upper half.
- The ‘quartilemethod’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘linear’, ‘exclusive’, ‘inclusive’]
- Returns
- Return type
Any
-
property
scalegroup¶ If there are multiple violins that should be sized according to to some metric (see
scalemode), link them by providing a non- empty group id here shared by every trace in the same group. If a violin’swidthis undefined,scalegroupwill default to the trace’s name. In this case, violins with the same names will be linked together- The ‘scalegroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
scalemode¶ Sets the metric by which the width of each violin is determined. “width” means each violin has the same (max) width “count” means the violins are scaled by the number of sample points making up each violin.
- The ‘scalemode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘width’, ‘count’]
- Returns
- Return type
Any
-
property
selected¶ The ‘selected’ property is an instance of Selected that may be specified as:
An instance of
plotly.graph_objects.violin.SelectedA dict of string/value properties that will be passed to the Selected constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
side¶ Determines on which side of the position value the density function making up one half of a violin is plotted. Useful when comparing two violin traces under “overlay” mode, where one trace has
sideset to “positive” and the other to “negative”.- The ‘side’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘both’, ‘positive’, ‘negative’]
- Returns
- Return type
Any
-
property
span¶ - Sets the span in data space for which the density function will
be computed. Has an effect only when
spanmodeis set to “manual”.The ‘span’ property is an info array that may be specified as:
a list or tuple of 2 elements where:
The ‘span[0]’ property accepts values of any type
The ‘span[1]’ property accepts values of any type
list
-
property
spanmode¶ Sets the method by which the span in data space where the density function will be computed. “soft” means the span goes from the sample’s minimum value minus two bandwidths to the sample’s maximum value plus two bandwidths. “hard” means the span goes from the sample’s minimum to its maximum value. For custom span settings, use mode “manual” and fill in the
spanattribute.- The ‘spanmode’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘soft’, ‘hard’, ‘manual’]
- Returns
- Return type
Any
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.violin.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with each sample value. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
unselected¶ The ‘unselected’ property is an instance of Unselected that may be specified as:
An instance of
plotly.graph_objects.violin.UnselectedA dict of string/value properties that will be passed to the Unselected constructor
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
width¶ Sets the width of the violin in data coordinates. If 0 (default value) the width is automatically selected based on the positions of other violin traces in the same subplot.
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
x¶ Sets the x sample data or coordinates. See overview for more info.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Sets the x coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y sample data or coordinates. See overview for more info.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Sets the y coordinate for single-box traces or the starting coordinate for multi-box traces set using q1/median/q3. See overview for more info.
The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Volume(arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, opacityscale=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuehoverformat=None, valuesrc=None, visible=None, x=None, xhoverformat=None, xsrc=None, y=None, yhoverformat=None, ysrc=None, z=None, zhoverformat=None, zsrc=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
autocolorscale¶ Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale. In casecolorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.The ‘autocolorscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
caps¶ The ‘caps’ property is an instance of Caps that may be specified as:
An instance of
plotly.graph_objects.volume.CapsA dict of string/value properties that will be passed to the Caps constructor
- Returns
- Return type
-
property
cauto¶ Determines whether or not the color domain is computed with respect to the input data (here
value) or the bounds set incminandcmaxDefaults tofalsewhencminandcmaxare set by the user.The ‘cauto’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
cmax¶ Sets the upper bound of the color domain. Value should have the same units as
valueand if set,cminmust be set as well.- The ‘cmax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmid¶ Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point. Value should have the same units asvalue. Has no effect whencautoisfalse.- The ‘cmid’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cmin¶ Sets the lower bound of the color domain. Value should have the same units as
valueand if set,cmaxmust be set as well.- The ‘cmin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
coloraxis¶ Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2, etc. Note that multiple color scales can be linked to the same color axis.The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
- Returns
- Return type
-
property
colorbar¶ The ‘colorbar’ property is an instance of ColorBar that may be specified as:
An instance of
plotly.graph_objects.volume.ColorBarA dict of string/value properties that will be passed to the ColorBar constructor
- Returns
- Return type
-
property
colorscale¶ Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, YlGnBu,YlOrRd.The ‘colorscale’ property is a colorscale and may be specified as:
A list of colors that will be spaced evenly to create the colorscale. Many predefined colorscale lists are included in the sequential, diverging, and cyclical modules in the plotly.colors package.
A list of 2-element lists where the first element is the normalized color level value (starting at 0 and ending at 1), and the second item is a valid color string. (e.g. [[0, ‘green’], [0.5, ‘red’], [1.0, ‘rgb(0, 0, 255)’]])
- One of the following named colorscales:
- [‘aggrnyl’, ‘agsunset’, ‘algae’, ‘amp’, ‘armyrose’, ‘balance’,
‘blackbody’, ‘bluered’, ‘blues’, ‘blugrn’, ‘bluyl’, ‘brbg’, ‘brwnyl’, ‘bugn’, ‘bupu’, ‘burg’, ‘burgyl’, ‘cividis’, ‘curl’, ‘darkmint’, ‘deep’, ‘delta’, ‘dense’, ‘earth’, ‘edge’, ‘electric’, ‘emrld’, ‘fall’, ‘geyser’, ‘gnbu’, ‘gray’, ‘greens’, ‘greys’, ‘haline’, ‘hot’, ‘hsv’, ‘ice’, ‘icefire’, ‘inferno’, ‘jet’, ‘magenta’, ‘magma’, ‘matter’, ‘mint’, ‘mrybm’, ‘mygbm’, ‘oranges’, ‘orrd’, ‘oryel’, ‘oxy’, ‘peach’, ‘phase’, ‘picnic’, ‘pinkyl’, ‘piyg’, ‘plasma’, ‘plotly3’, ‘portland’, ‘prgn’, ‘pubu’, ‘pubugn’, ‘puor’, ‘purd’, ‘purp’, ‘purples’, ‘purpor’, ‘rainbow’, ‘rdbu’, ‘rdgy’, ‘rdpu’, ‘rdylbu’, ‘rdylgn’, ‘redor’, ‘reds’, ‘solar’, ‘spectral’, ‘speed’, ‘sunset’, ‘sunsetdark’, ‘teal’, ‘tealgrn’, ‘tealrose’, ‘tempo’, ‘temps’, ‘thermal’, ‘tropic’, ‘turbid’, ‘turbo’, ‘twilight’, ‘viridis’, ‘ylgn’, ‘ylgnbu’, ‘ylorbr’, ‘ylorrd’].
Appending ‘_r’ to a named colorscale reverses it.
- Returns
- Return type
-
property
contour¶ The ‘contour’ property is an instance of Contour that may be specified as:
An instance of
plotly.graph_objects.volume.ContourA dict of string/value properties that will be passed to the Contour constructor
- Returns
- Return type
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
flatshading¶ Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low-poly look via flat reflections.
The ‘flatshading’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘x’, ‘y’, ‘z’, ‘text’, ‘name’] joined with ‘+’ characters (e.g. ‘x+y’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.volume.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Same as
text.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
isomax¶ Sets the maximum boundary for iso-surface plot.
- The ‘isomax’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
isomin¶ Sets the minimum boundary for iso-surface plot.
- The ‘isomin’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.volume.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
lighting¶ The ‘lighting’ property is an instance of Lighting that may be specified as:
An instance of
plotly.graph_objects.volume.LightingA dict of string/value properties that will be passed to the Lighting constructor
- Returns
- Return type
-
property
lightposition¶ The ‘lightposition’ property is an instance of Lightposition that may be specified as:
An instance of
plotly.graph_objects.volume.LightpositionA dict of string/value properties that will be passed to the Lightposition constructor
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the surface. Please note that in the case of using high
opacityvalues for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change.- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
opacityscale¶ Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 1], [0.5, 0.2], [1, 1]]means that higher/lower values would have higher opacity values and those in the middle would be more transparent Alternatively,opacityscalemay be a palette name string of the following list: ‘min’, ‘max’, ‘extremes’ and ‘uniform’. The default is ‘uniform’.The ‘opacityscale’ property accepts values of any type
- Returns
- Return type
Any
-
property
reversescale¶ Reverses the color mapping if true. If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.The ‘reversescale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
scene¶ Sets a reference between this trace’s 3D coordinate system and a 3D scene. If “scene” (the default value), the (x,y,z) coordinates refer to
layout.scene. If “scene2”, the (x,y,z) coordinates refer tolayout.scene2, and so on.The ‘scene’ property is an identifier of a particular subplot, of type ‘scene’, that may be specified as the string ‘scene’ optionally followed by an integer >= 1 (e.g. ‘scene’, ‘scene1’, ‘scene2’, ‘scene3’, etc.)
- Returns
- Return type
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
showscale¶ Determines whether or not a colorbar is displayed for this trace.
The ‘showscale’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
slices¶ The ‘slices’ property is an instance of Slices that may be specified as:
An instance of
plotly.graph_objects.volume.SlicesA dict of string/value properties that will be passed to the Slices constructor
- Returns
- Return type
-
property
spaceframe¶ The ‘spaceframe’ property is an instance of Spaceframe that may be specified as:
An instance of
plotly.graph_objects.volume.SpaceframeA dict of string/value properties that will be passed to the Spaceframe constructor
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.volume.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
surface¶ The ‘surface’ property is an instance of Surface that may be specified as:
An instance of
plotly.graph_objects.volume.SurfaceA dict of string/value properties that will be passed to the Surface constructor
- Returns
- Return type
-
property
text¶ Sets the text elements associated with the vertices. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
value¶ Sets the 4th dimension (value) of the vertices.
The ‘value’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
valuehoverformat¶ Sets the hover text formatting rulefor
valueusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By default the values are formatted using generic number format.- The ‘valuehoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
valuesrc¶ Sets the source reference on Chart Studio Cloud for
value.The ‘valuesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
x¶ Sets the X coordinates of the vertices on X axis.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the Y coordinates of the vertices on Y axis.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
z¶ Sets the Z coordinates of the vertices on Z axis.
The ‘z’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
zhoverformat¶ Sets the hover text formatting rulefor
zusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingzaxis.hoverformat.- The ‘zhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
-
class
plotly.graph_objects.Waterfall(arg=None, alignmentgroup=None, base=None, cliponaxis=None, connector=None, constraintext=None, customdata=None, customdatasrc=None, decreasing=None, dx=None, dy=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatefallback=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, increasing=None, insidetextanchor=None, insidetextfont=None, legend=None, legendgroup=None, legendgrouptitle=None, legendrank=None, legendwidth=None, measure=None, measuresrc=None, meta=None, metasrc=None, name=None, offset=None, offsetgroup=None, offsetsrc=None, opacity=None, orientation=None, outsidetextfont=None, selectedpoints=None, showlegend=None, stream=None, text=None, textangle=None, textfont=None, textinfo=None, textposition=None, textpositionsrc=None, textsrc=None, texttemplate=None, texttemplatefallback=None, texttemplatesrc=None, totals=None, uid=None, uirevision=None, visible=None, width=None, widthsrc=None, x=None, x0=None, xaxis=None, xhoverformat=None, xperiod=None, xperiod0=None, xperiodalignment=None, xsrc=None, y=None, y0=None, yaxis=None, yhoverformat=None, yperiod=None, yperiod0=None, yperiodalignment=None, ysrc=None, zorder=None, **kwargs)¶ Bases:
plotly.basedatatypes.BaseTraceType-
property
alignmentgroup¶ Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
- The ‘alignmentgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
base¶ Sets where the bar base is drawn (in position axis units).
- The ‘base’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
cliponaxis¶ Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set
xaxis.layerandyaxis.layerto below traces.The ‘cliponaxis’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
connector¶ The ‘connector’ property is an instance of Connector that may be specified as:
An instance of
plotly.graph_objects.waterfall.ConnectorA dict of string/value properties that will be passed to the Connector constructor
- Returns
- Return type
-
property
constraintext¶ Constrain the size of text inside or outside a bar to be no larger than the bar itself.
- The ‘constraintext’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘both’, ‘none’]
- Returns
- Return type
Any
-
property
customdata¶ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
The ‘customdata’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
customdatasrc¶ Sets the source reference on Chart Studio Cloud for
customdata.The ‘customdatasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
decreasing¶ The ‘decreasing’ property is an instance of Decreasing that may be specified as:
An instance of
plotly.graph_objects.waterfall.DecreasingA dict of string/value properties that will be passed to the Decreasing constructor
- Returns
- Return type
-
property
dx¶ Sets the x coordinate step. See
x0for more info.- The ‘dx’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
dy¶ Sets the y coordinate step. See
y0for more info.- The ‘dy’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
hoverinfo¶ Determines which trace information appear on hover. If
noneorskipare set, no information is displayed upon hovering. But, ifnoneis set, click and hover events are still fired.The ‘hoverinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘name’, ‘x’, ‘y’, ‘text’, ‘initial’, ‘delta’, ‘final’] joined with ‘+’ characters (e.g. ‘name+x’) OR exactly one of [‘all’, ‘none’, ‘skip’] (e.g. ‘skip’)
A list or array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
hoverinfosrc¶ Sets the source reference on Chart Studio Cloud for
hoverinfo.The ‘hoverinfosrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hoverlabel¶ The ‘hoverlabel’ property is an instance of Hoverlabel that may be specified as:
An instance of
plotly.graph_objects.waterfall.HoverlabelA dict of string/value properties that will be passed to the Hoverlabel constructor
- Returns
- Return type
-
property
hovertemplate¶ Template string used for rendering the information that appear on hover box. Note that this will override
hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}” as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, “xother” will be added to those with different x positions from the first point. An underscore before or after “(x|y)other” will add a space on that side, only when this field is shown. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. The variables available inhovertemplateare the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, all attributes that can be specified per- point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,deltaandfinal. Anything contained in tag<extra>is displayed in the secondary box, for example<extra>%{fullData.name}</extra>. To hide the secondary box completely, use an empty tag<extra></extra>.- The ‘hovertemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘hovertemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
hovertemplatesrc¶ Sets the source reference on Chart Studio Cloud for
hovertemplate.The ‘hovertemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
hovertext¶ Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace
hoverinfomust contain a “text” flag.- The ‘hovertext’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
hovertextsrc¶ Sets the source reference on Chart Studio Cloud for
hovertext.The ‘hovertextsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
ids¶ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
The ‘ids’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
idssrc¶ Sets the source reference on Chart Studio Cloud for
ids.The ‘idssrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
increasing¶ The ‘increasing’ property is an instance of Increasing that may be specified as:
An instance of
plotly.graph_objects.waterfall.IncreasingA dict of string/value properties that will be passed to the Increasing constructor
- Returns
- Return type
-
property
insidetextanchor¶ Determines if texts are kept at center or start/end points in
textposition“inside” mode.- The ‘insidetextanchor’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘end’, ‘middle’, ‘start’]
- Returns
- Return type
Any
-
property
insidetextfont¶ Sets the font used for
textlying inside the bar.The ‘insidetextfont’ property is an instance of Insidetextfont that may be specified as:
An instance of
plotly.graph_objects.waterfall.InsidetextfontA dict of string/value properties that will be passed to the Insidetextfont constructor
- Returns
- Return type
-
property
legend¶ Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under
layout.legend,layout.legend2, etc.The ‘legend’ property is an identifier of a particular subplot, of type ‘legend’, that may be specified as the string ‘legend’ optionally followed by an integer >= 1 (e.g. ‘legend’, ‘legend1’, ‘legend2’, ‘legend3’, etc.)
- Returns
- Return type
-
property
legendgroup¶ Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.
- The ‘legendgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
legendgrouptitle¶ The ‘legendgrouptitle’ property is an instance of Legendgrouptitle that may be specified as:
An instance of
plotly.graph_objects.waterfall.LegendgrouptitleA dict of string/value properties that will be passed to the Legendgrouptitle constructor
- Returns
- Return type
-
property
legendrank¶ Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed”
legend.traceorderthey are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.- The ‘legendrank’ property is a number and may be specified as:
An int or float
- Returns
- Return type
int|float
-
property
legendwidth¶ Sets the width (in px or fraction) of the legend for this trace.
- The ‘legendwidth’ property is a number and may be specified as:
An int or float in the interval [0, inf]
- Returns
- Return type
int|float
-
property
measure¶ An array containing types of values. By default the values are considered as ‘relative’. However; it is possible to use ‘total’ to compute the sums. Also ‘absolute’ could be applied to reset the computed total or to declare an initial value where needed.
The ‘measure’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
measuresrc¶ Sets the source reference on Chart Studio Cloud for
measure.The ‘measuresrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
meta¶ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace
name, graph, axis and colorbartitle.text, annotationtextrangeselector,updatemenuesandsliderslabeltext all supportmeta. To access the tracemetavalues in an attribute in the same trace, simply use%{meta[i]}whereiis the index or key of themetaitem in question. To access tracemetain layout attributes, use%{data[n[.meta[i]}whereiis the index or key of themetaandnis the trace index.The ‘meta’ property accepts values of any type
- Returns
- Return type
Any|numpy.ndarray
-
property
metasrc¶ Sets the source reference on Chart Studio Cloud for
meta.The ‘metasrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
name¶ Sets the trace name. The trace name appears as the legend item and on hover.
- The ‘name’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offset¶ Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
- The ‘offset’ property is a number and may be specified as:
An int or float
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
offsetgroup¶ Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
- The ‘offsetgroup’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
offsetsrc¶ Sets the source reference on Chart Studio Cloud for
offset.The ‘offsetsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
opacity¶ Sets the opacity of the trace.
- The ‘opacity’ property is a number and may be specified as:
An int or float in the interval [0, 1]
- Returns
- Return type
int|float
-
property
orientation¶ Sets the orientation of the bars. With “v” (“h”), the value of the each bar spans along the vertical (horizontal).
- The ‘orientation’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘v’, ‘h’]
- Returns
- Return type
Any
-
property
outsidetextfont¶ Sets the font used for
textlying outside the bar.The ‘outsidetextfont’ property is an instance of Outsidetextfont that may be specified as:
An instance of
plotly.graph_objects.waterfall.OutsidetextfontA dict of string/value properties that will be passed to the Outsidetextfont constructor
- Returns
- Return type
-
property
selectedpoints¶ Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the
unselectedare turned on for all points, whereas, any other non-array values means no selection all where theselectedandunselectedstyles have no effect.The ‘selectedpoints’ property accepts values of any type
- Returns
- Return type
Any
-
property
showlegend¶ Determines whether or not an item corresponding to this trace is shown in the legend.
The ‘showlegend’ property must be specified as a bool (either True, or False)
- Returns
- Return type
-
property
stream¶ The ‘stream’ property is an instance of Stream that may be specified as:
An instance of
plotly.graph_objects.waterfall.StreamA dict of string/value properties that will be passed to the Stream constructor
- Returns
- Return type
-
property
text¶ Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace
hoverinfocontains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.- The ‘text’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
textangle¶ Sets the angle of the tick labels with respect to the bar. For example, a
tickangleof -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.The ‘textangle’ property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
- Returns
- Return type
int|float
-
property
textfont¶ Sets the font used for
text.The ‘textfont’ property is an instance of Textfont that may be specified as:
An instance of
plotly.graph_objects.waterfall.TextfontA dict of string/value properties that will be passed to the Textfont constructor
- Returns
- Return type
-
property
textinfo¶ Determines which trace information appear on the graph. In the case of having multiple waterfalls, totals are computed separately (per trace).
The ‘textinfo’ property is a flaglist and may be specified as a string containing:
Any combination of [‘label’, ‘text’, ‘initial’, ‘delta’, ‘final’] joined with ‘+’ characters (e.g. ‘label+text’) OR exactly one of [‘none’] (e.g. ‘none’)
- Returns
- Return type
Any
-
property
textposition¶ Specifies the location of the
text. “inside” positionstextinside, next to the bar end (rotated and scaled if needed). “outside” positionstextoutside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to positiontextinside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.- The ‘textposition’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘inside’, ‘outside’, ‘auto’, ‘none’]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
Any|numpy.ndarray
-
property
textpositionsrc¶ Sets the source reference on Chart Studio Cloud for
textposition.The ‘textpositionsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
textsrc¶ Sets the source reference on Chart Studio Cloud for
text.The ‘textsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
texttemplate¶ Template string used for rendering the information text that appears on points. Note that this will override
textinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format for details on the date formatting syntax. Variables that can’t be found will be replaced with the specifier. For example, a template of “data: %{x}, %{y}” will result in a value of “data: 1, %{y}” if x is 1 and y is missing. Variables with an undefined value will be replaced with the fallback value. All attributes that can be specified per-point (the ones that arearrayOk: true) are available. Finally, the template string has access to variablesinitial,delta,finalandlabel.- The ‘texttemplate’ property is a string and must be specified as:
A string
A number that will be converted to a string
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
str|numpy.ndarray
-
property
texttemplatefallback¶ Fallback string that’s displayed when a variable referenced in a template is missing. If the boolean value ‘false’ is passed in, the specifier with the missing variable will be displayed.
The ‘texttemplatefallback’ property accepts values of any type
- Returns
- Return type
Any
-
property
texttemplatesrc¶ Sets the source reference on Chart Studio Cloud for
texttemplate.The ‘texttemplatesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
totals¶ The ‘totals’ property is an instance of Totals that may be specified as:
An instance of
plotly.graph_objects.waterfall.TotalsA dict of string/value properties that will be passed to the Totals constructor
- Returns
- Return type
-
property
type¶
-
property
uid¶ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
- The ‘uid’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
uirevision¶ Controls persistence of some user-driven changes to the trace:
constraintrangeinparcoordstraces, as well as someeditable: truemodifications such asnameandcolorbar.title. Defaults tolayout.uirevision. Note that other user-driven trace attribute changes are controlled bylayoutattributes:trace.visibleis controlled bylayout.legend.uirevision,selectedpointsis controlled bylayout.selectionrevision, andcolorbar.(x|y)(accessible withconfig: {editable: true}) is controlled bylayout.editrevision. Trace changes are tracked byuid, which only falls back on trace index if nouidis provided. So if your app can add/remove traces before the end of thedataarray, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace auidthat stays with it as it moves.The ‘uirevision’ property accepts values of any type
- Returns
- Return type
Any
-
property
visible¶ Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
- The ‘visible’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, ‘legendonly’]
- Returns
- Return type
Any
-
property
width¶ Sets the bar width (in position axis units).
- The ‘width’ property is a number and may be specified as:
An int or float in the interval [0, inf]
A tuple, list, or one-dimensional numpy array of the above
- Returns
- Return type
int|float|numpy.ndarray
-
property
widthsrc¶ Sets the source reference on Chart Studio Cloud for
width.The ‘widthsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
x¶ Sets the x coordinates.
The ‘x’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
x0¶ Alternate to
x. Builds a linear space of x coordinates. Use withdxwherex0is the starting coordinate anddxthe step.The ‘x0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xaxis¶ Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to
layout.xaxis. If “x2”, the x coordinates refer tolayout.xaxis2, and so on.The ‘xaxis’ property is an identifier of a particular subplot, of type ‘x’, that may be specified as the string ‘x’ optionally followed by an integer >= 1 (e.g. ‘x’, ‘x1’, ‘x2’, ‘x3’, etc.)
- Returns
- Return type
-
property
xhoverformat¶ Sets the hover text formatting rulefor
xusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingxaxis.hoverformat.- The ‘xhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
xperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘xperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. Whenx0periodis round number of weeks, thex0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘xperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
xperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the x axis.- The ‘xperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
xsrc¶ Sets the source reference on Chart Studio Cloud for
x.The ‘xsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
y¶ Sets the y coordinates.
The ‘y’ property is an array that may be specified as a tuple, list, numpy array, or pandas Series
- Returns
- Return type
numpy.ndarray
-
property
y0¶ Alternate to
y. Builds a linear space of y coordinates. Use withdywherey0is the starting coordinate anddythe step.The ‘y0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yaxis¶ Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to
layout.yaxis. If “y2”, the y coordinates refer tolayout.yaxis2, and so on.The ‘yaxis’ property is an identifier of a particular subplot, of type ‘y’, that may be specified as the string ‘y’ optionally followed by an integer >= 1 (e.g. ‘y’, ‘y1’, ‘y2’, ‘y3’, etc.)
- Returns
- Return type
-
property
yhoverformat¶ Sets the hover text formatting rulefor
yusing d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%{n}f” for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat “%H~%M~%S.%2f” would display *09~15~23.46*By default the values are formatted usingyaxis.hoverformat.- The ‘yhoverformat’ property is a string and must be specified as:
A string
A number that will be converted to a string
- Returns
- Return type
-
property
yperiod¶ Only relevant when the axis
typeis “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this casenmust be a positive integer.The ‘yperiod’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiod0¶ Only relevant when the axis
typeis “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. Wheny0periodis round number of weeks, they0period0by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.The ‘yperiod0’ property accepts values of any type
- Returns
- Return type
Any
-
property
yperiodalignment¶ Only relevant when the axis
typeis “date”. Sets the alignment of data points on the y axis.- The ‘yperiodalignment’ property is an enumeration that may be specified as:
- One of the following enumeration values:
[‘start’, ‘middle’, ‘end’]
- Returns
- Return type
Any
-
property
ysrc¶ Sets the source reference on Chart Studio Cloud for
y.The ‘ysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
- Returns
- Return type
-
property
zorder¶ Sets the layer on which this trace is displayed, relative to other SVG traces on the same subplot. SVG traces with higher
zorderappear in front of those with lowerzorder.- The ‘zorder’ property is a integer and may be specified as:
An int (or float that will be cast to an int)
- Returns
- Return type
-
property
-
class
plotly.graph_objects.XAxis(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.XAxis is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.XAxis
plotly.graph_objects.layout.scene.XAxis
-
class
plotly.graph_objects.XBins(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.XBins is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.histogram.XBins
plotly.graph_objects.histogram2d.XBins
-
class
plotly.graph_objects.YAxis(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.YAxis is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.YAxis
plotly.graph_objects.layout.scene.YAxis
-
class
plotly.graph_objects.YBins(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.YBins is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.histogram.YBins
plotly.graph_objects.histogram2d.YBins
-
class
plotly.graph_objects.ZAxis(*args, **kwargs)¶ Bases:
dictplotly.graph_objects.ZAxis is deprecated.
- Please replace it with one of the following more specific types
plotly.graph_objects.layout.scene.ZAxis
Subpackages¶
- plotly.graph_objects.bar package
- plotly.graph_objects.barpolar package
- plotly.graph_objects.box package
- plotly.graph_objects.candlestick package
- plotly.graph_objects.carpet package
- plotly.graph_objects.choropleth package
- Subpackages
- plotly.graph_objects.choropleth.colorbar package
- plotly.graph_objects.choropleth.hoverlabel package
- plotly.graph_objects.choropleth.legendgrouptitle package
- plotly.graph_objects.choropleth.marker package
- plotly.graph_objects.choropleth.selected package
- plotly.graph_objects.choropleth.unselected package
- Subpackages
- plotly.graph_objects.choroplethmap package
- Subpackages
- plotly.graph_objects.choroplethmap.colorbar package
- plotly.graph_objects.choroplethmap.hoverlabel package
- plotly.graph_objects.choroplethmap.legendgrouptitle package
- plotly.graph_objects.choroplethmap.marker package
- plotly.graph_objects.choroplethmap.selected package
- plotly.graph_objects.choroplethmap.unselected package
- Subpackages
- plotly.graph_objects.choroplethmapbox package
- Subpackages
- plotly.graph_objects.choroplethmapbox.colorbar package
- plotly.graph_objects.choroplethmapbox.hoverlabel package
- plotly.graph_objects.choroplethmapbox.legendgrouptitle package
- plotly.graph_objects.choroplethmapbox.marker package
- plotly.graph_objects.choroplethmapbox.selected package
- plotly.graph_objects.choroplethmapbox.unselected package
- Subpackages
- plotly.graph_objects.cone package
- plotly.graph_objects.contour package
- plotly.graph_objects.contourcarpet package
- plotly.graph_objects.densitymap package
- plotly.graph_objects.densitymapbox package
- plotly.graph_objects.funnel package
- plotly.graph_objects.funnelarea package
- plotly.graph_objects.heatmap package
- plotly.graph_objects.histogram package
- plotly.graph_objects.histogram2d package
- plotly.graph_objects.histogram2dcontour package
- plotly.graph_objects.icicle package
- plotly.graph_objects.image package
- plotly.graph_objects.indicator package
- plotly.graph_objects.isosurface package
- plotly.graph_objects.layout package
- Subpackages
- plotly.graph_objects.layout.annotation package
- plotly.graph_objects.layout.coloraxis package
- plotly.graph_objects.layout.geo package
- plotly.graph_objects.layout.grid package
- plotly.graph_objects.layout.hoverlabel package
- plotly.graph_objects.layout.legend package
- plotly.graph_objects.layout.map package
- plotly.graph_objects.layout.mapbox package
- plotly.graph_objects.layout.newselection package
- plotly.graph_objects.layout.newshape package
- plotly.graph_objects.layout.polar package
- plotly.graph_objects.layout.scene package
- plotly.graph_objects.layout.selection package
- plotly.graph_objects.layout.shape package
- plotly.graph_objects.layout.slider package
- plotly.graph_objects.layout.smith package
- plotly.graph_objects.layout.template package
- plotly.graph_objects.layout.ternary package
- plotly.graph_objects.layout.title package
- plotly.graph_objects.layout.updatemenu package
- plotly.graph_objects.layout.xaxis package
- plotly.graph_objects.layout.yaxis package
- Subpackages
- plotly.graph_objects.mesh3d package
- plotly.graph_objects.ohlc package
- plotly.graph_objects.parcats package
- plotly.graph_objects.parcoords package
- plotly.graph_objects.pie package
- plotly.graph_objects.sankey package
- plotly.graph_objects.scatter package
- plotly.graph_objects.scatter3d package
- plotly.graph_objects.scattercarpet package
- plotly.graph_objects.scattergeo package
- plotly.graph_objects.scattergl package
- plotly.graph_objects.scattermap package
- plotly.graph_objects.scattermapbox package
- plotly.graph_objects.scatterpolar package
- plotly.graph_objects.scatterpolargl package
- plotly.graph_objects.scattersmith package
- plotly.graph_objects.scatterternary package
- plotly.graph_objects.splom package
- plotly.graph_objects.streamtube package
- plotly.graph_objects.sunburst package
- plotly.graph_objects.surface package
- plotly.graph_objects.table package
- plotly.graph_objects.treemap package
- plotly.graph_objects.violin package
- plotly.graph_objects.volume package
- plotly.graph_objects.waterfall package
- Subpackages
- plotly.graph_objects.waterfall.connector package
- plotly.graph_objects.waterfall.decreasing package
- plotly.graph_objects.waterfall.hoverlabel package
- plotly.graph_objects.waterfall.increasing package
- plotly.graph_objects.waterfall.legendgrouptitle package
- plotly.graph_objects.waterfall.totals package
- Subpackages
