plotly.graph_objects.FigureΒΆ
-
class
plotly.graph_objects.Figure(data=None, layout=None, frames=None, skip_invalid=False, **kwargs)ΒΆ -
__init__(data=None, layout=None, frames=None, skip_invalid=False, **kwargs)ΒΆ Create a new :class:Figure instance
- Parameters
data β
The βdataβ property is a tuple of trace instances that may be specified as:
A list or tuple of trace instances (e.g. [Scatter(β¦), Bar(β¦)])
A single trace instance (e.g. Scatter(β¦), Bar(β¦), etc.)
A list or tuple of dicts of string/value properties where: - The βtypeβ property specifies the trace type
- One of: [βbarβ, βbarpolarβ, βboxβ, βcandlestickβ,
βcarpetβ, βchoroplethβ, βchoroplethmapβ, βchoroplethmapboxβ, βconeβ, βcontourβ, βcontourcarpetβ, βdensitymapβ, βdensitymapboxβ, βfunnelβ, βfunnelareaβ, βheatmapβ, βheatmapglβ, βhistogramβ, βhistogram2dβ, βhistogram2dcontourβ, βicicleβ, βimageβ, βindicatorβ, βisosurfaceβ, βmesh3dβ, βohlcβ, βparcatsβ, βparcoordsβ, βpieβ, βpointcloudβ, βsankeyβ, βscatterβ, βscatter3dβ, βscattercarpetβ, βscattergeoβ, βscatterglβ, βscattermapβ, βscattermapboxβ, βscatterpolarβ, βscatterpolarglβ, βscattersmithβ, βscatterternaryβ, βsplomβ, βstreamtubeβ, βsunburstβ, βsurfaceβ, βtableβ, βtreemapβ, βviolinβ, βvolumeβ, βwaterfallβ]
All remaining properties are passed to the constructor of the specified trace type
(e.g. [{βtypeβ: βscatterβ, β¦}, {βtypeβ: βbar, β¦}])
layout β
The βlayoutβ property is an instance of Layout that may be specified as:
An instance of
plotly.graph_objects.LayoutA dict of string/value properties that will be passed to the Layout constructor
Supported dict properties:
- activeselection
plotly.graph_objects.layout.Activeselec tioninstance or dict with compatible properties- activeshape
:class:`plotly.graph_objects.layout.Activeshape ` instance or dict with compatible properties
- annotations
A tuple of
plotly.graph_objects.layout.Annotationinstances or dicts with compatible properties- annotationdefaults
When used in a template (as layout.template.layout.annotationdefaults), sets the default property values to use for elements of layout.annotations
- autosize
Determines whether or not a layout width or height that has been left undefined by the user is initialized on each relayout. Note that, regardless of this attribute, an undefined layout width or height is always initialized on the first call to plot.
- 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.- 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 %).
- bargap
Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- bargroupgap
Sets the gap (in plot fraction) between bars of the same location coordinate.
- barmode
Determines how bars at the same location coordinate are displayed on the graph. With βstackβ, the bars are stacked on top of one another With βrelativeβ, the bars are stacked on top of one another, with negative values below the axis, positive values above With βgroupβ, the bars are plotted next to one another centered around the shared location. With βoverlayβ, the bars are plotted over one another, you might need to reduce βopacityβ to see multiple bars.
- barnorm
Sets the normalization for bar traces on the graph. With βfractionβ, the value of each bar is divided by the sum of all values at that location coordinate. βpercentβ is the same but multiplied by 100 to show percentages.
- boxgap
Sets the gap (in plot fraction) between boxes of adjacent location coordinates. Has no effect on traces that have βwidthβ set.
- boxgroupgap
Sets the gap (in plot fraction) between boxes of the same location coordinate. Has no effect on traces that have βwidthβ set.
- boxmode
Determines how boxes at the same location coordinate are displayed on the graph. If βgroupβ, the boxes are plotted next to one another centered around the shared location. If βoverlayβ, the boxes are plotted over one another, you might need to set βopacityβ to see them multiple boxes. Has no effect on traces that have βwidthβ set.
- calendar
Sets the default calendar system to use for interpreting and displaying dates throughout the plot.
- clickmode
Determines the mode of single click interactions. βeventβ is the default value and emits the
plotly_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.- coloraxis
plotly.graph_objects.layout.Coloraxisinstance or dict with compatible properties- colorscale
plotly.graph_objects.layout.Colorscaleinstance or dict with compatible properties- colorway
Sets the default trace colors.
- computed
Placeholder for exporting automargin-impacting values namely
margin.t,margin.b,margin.landmargin.rin βfull-jsonβ mode.- 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.- dragmode
Determines the mode of drag interactions. βselectβ and βlassoβ apply only to scatter traces with markers or text. βorbitβ and βturntableβ apply only to 3D scenes.
- editrevision
Controls persistence of user-driven changes in
editable: trueconfiguration, other than trace names and axis titles. Defaults tolayout.uirevision.- 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.- 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.- 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.- 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.- 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.- font
Sets the global font. Note that fonts used in traces and other layout components inherit from the global font.
- 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.- funnelgap
Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- funnelgroupgap
Sets the gap (in plot fraction) between bars of the same location coordinate.
- 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.
- geo
plotly.graph_objects.layout.Geoinstance or dict with compatible properties- grid
plotly.graph_objects.layout.Gridinstance or dict with compatible properties- height
Sets the plotβs height (in px).
- hiddenlabels
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
- hiddenlabelssrc
Sets the source reference on Chart Studio Cloud for
hiddenlabels.- hidesources
Determines whether or not a text link citing the data source is placed at the bottom-right cored of the figure. Has only an effect only on graphs that have been generated via forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise).
- hoverdistance
Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no looking for data). This is only a real distance for hovering on point-like objects, like scatter points. For area-like objects (bars, scatter fills, etc) hovering is on inside the area and off outside, but these objects will not supersede hover on point-like objects in case of conflict.
- hoverlabel
plotly.graph_objects.layout.Hoverlabelinstance or dict with compatible properties- 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.- 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.- 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.- images
A tuple of
plotly.graph_objects.layout.Imageinstances or dicts with compatible properties- imagedefaults
When used in a template (as layout.template.layout.imagedefaults), sets the default property values to use for elements of layout.images
- legend
plotly.graph_objects.layout.Legendinstance or dict with compatible properties- map
plotly.graph_objects.layout.Mapinstance or dict with compatible properties- mapbox
plotly.graph_objects.layout.Mapboxinstance or dict with compatible properties- margin
plotly.graph_objects.layout.Margininstance or dict with compatible properties- 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]}.- metasrc
Sets the source reference on Chart Studio Cloud for
meta.- minreducedheight
Minimum height of the plot with margin.automargin applied (in px)
- minreducedwidth
Minimum width of the plot with margin.automargin applied (in px)
- modebar
plotly.graph_objects.layout.Modebarinstance or dict with compatible properties- newselection
plotly.graph_objects.layout.Newselectio ninstance or dict with compatible properties- newshape
plotly.graph_objects.layout.Newshapeinstance or dict with compatible properties- paper_bgcolor
Sets the background color of the paper where the graph is drawn.
- 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.- plot_bgcolor
Sets the background color of the plotting area in-between x and y axes.
- polar
plotly.graph_objects.layout.Polarinstance or dict with compatible properties- scattergap
Sets the gap (in plot fraction) between scatter points of adjacent location coordinates. Defaults to
bargap.- 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.
- scene
plotly.graph_objects.layout.Sceneinstance or dict with compatible properties- 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.- selectionrevision
Controls persistence of user-driven changes in selected points from all traces.
- selections
A tuple of
plotly.graph_objects.layout.Selectioninstances or dicts with compatible properties- selectiondefaults
When used in a template (as layout.template.layout.selectiondefaults), sets the default property values to use for elements of layout.selections
- separators
Sets the decimal and thousand separators. For example, *. * puts a β.β before decimals and a space between thousands. In English locales, dflt is β.,β but other locales may alter this default.
- shapes
A tuple of
plotly.graph_objects.layout.Shapeinstances or dicts with compatible properties- shapedefaults
When used in a template (as layout.template.layout.shapedefaults), sets the default property values to use for elements of layout.shapes
- showlegend
Determines whether or not a legend is drawn. Default is
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.- sliders
A tuple of
plotly.graph_objects.layout.Sliderinstances or dicts with compatible properties- sliderdefaults
When used in a template (as layout.template.layout.sliderdefaults), sets the default property values to use for elements of layout.sliders
- smith
plotly.graph_objects.layout.Smithinstance or dict with compatible properties- spikedistance
Sets the default distance (in pixels) to look for data to draw spikelines to (-1 means no cutoff, 0 means no looking for data). As with hoverdistance, distance does not apply to area- like objects. In addition, some objects can be hovered on but will not generate spikelines, such as scatter fills.
- sunburstcolorway
Sets the default sunburst slice colors. Defaults to the main
colorwayused for trace colors. If you specify a new list here it can still be extended with lighter and darker colors, seeextendsunburstcolors.- 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.- ternary
plotly.graph_objects.layout.Ternaryinstance or dict with compatible properties- title
plotly.graph_objects.layout.Titleinstance or dict with compatible properties- titlefont
Deprecated: Please use layout.title.font instead. Sets the title font. Note that the titleβs font used to be customized by the now deprecated
titlefontattribute.- transition
Sets transition options used during Plotly.react updates.
- 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.- 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.- uniformtext
:class:`plotly.graph_objects.layout.Uniformtext ` instance or dict with compatible properties
- updatemenus
A tuple of
plotly.graph_objects.layout.Updatemenuinstances or dicts with compatible properties- updatemenudefaults
When used in a template (as layout.template.layout.updatemenudefaults), sets the default property values to use for elements of layout.updatemenus
- violingap
Sets the gap (in plot fraction) between violins of adjacent location coordinates. Has no effect on traces that have βwidthβ set.
- violingroupgap
Sets the gap (in plot fraction) between violins of the same location coordinate. Has no effect on traces that have βwidthβ set.
- violinmode
Determines how violins at the same location coordinate are displayed on the graph. If βgroupβ, the violins are plotted next to one another centered around the shared location. If βoverlayβ, the violins are plotted over one another, you might need to set βopacityβ to see them multiple violins. Has no effect on traces that have βwidthβ set.
- waterfallgap
Sets the gap (in plot fraction) between bars of adjacent location coordinates.
- waterfallgroupgap
Sets the gap (in plot fraction) between bars of the same location coordinate.
- waterfallmode
Determines how bars at the same location coordinate are displayed on the graph. With βgroupβ, the bars are plotted next to one another centered around the shared location. With βoverlayβ, the bars are plotted over one another, you might need to reduce βopacityβ to see multiple bars.
- width
Sets the plotβs width (in px).
- xaxis
plotly.graph_objects.layout.XAxisinstance or dict with compatible properties- yaxis
plotly.graph_objects.layout.YAxisinstance or dict with compatible properties
frames β
The βframesβ property is a tuple of instances of Frame that may be specified as:
A list or tuple of instances of plotly.graph_objects.Frame
A list or tuple of dicts of string/value properties that will be passed to the Frame constructor
Supported dict properties:
- baseframe
The name of the frame into which this frameβs properties are merged before applying. This is used to unify properties and avoid needing to specify the same values for the same properties in multiple frames.
- data
A list of traces this frame modifies. The format is identical to the normal trace definition.
- group
An identifier that specifies the group to which the frame belongs, used by animate to select a subset of frames.
- layout
Layout properties which this frame modifies. The format is identical to the normal layout definition.
- name
A label by which to identify the frame
- traces
A list of trace indices that identify the respective traces in the data attribute
skip_invalid (bool) β If True, invalid properties in the figure specification will be skipped silently. If False (default) invalid properties in the figure specification will result in a ValueError
- Raises
ValueError β if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False
Methods
__init__([data, layout, frames, skip_invalid])Create a new :class:Figure instance
add_annotation([arg, align, arrowcolor, β¦])Create and add a new annotation to the figureβs layout
add_bar([alignmentgroup, base, basesrc, β¦])Add a new Bar trace
add_barpolar([base, basesrc, customdata, β¦])Add a new Barpolar trace
add_box([alignmentgroup, boxmean, β¦])Add a new Box trace
add_candlestick([close, closesrc, β¦])Add a new Candlestick trace
add_carpet([a, a0, aaxis, asrc, b, b0, β¦])Add a new Carpet trace
add_choropleth([autocolorscale, coloraxis, β¦])Add a new Choropleth trace
add_choroplethmap([autocolorscale, below, β¦])Add a new Choroplethmap trace
add_choroplethmapbox([autocolorscale, β¦])Add a new Choroplethmapbox trace
add_cone([anchor, autocolorscale, cauto, β¦])Add a new Cone trace
add_contour([autocolorscale, autocontour, β¦])Add a new Contour trace
add_contourcarpet([a, a0, asrc, atype, β¦])Add a new Contourcarpet trace
add_densitymap([autocolorscale, below, β¦])Add a new Densitymap trace
add_densitymapbox([autocolorscale, below, β¦])Add a new Densitymapbox trace
add_funnel([alignmentgroup, cliponaxis, β¦])Add a new Funnel trace
add_funnelarea([aspectratio, baseratio, β¦])Add a new Funnelarea trace
add_heatmap([autocolorscale, coloraxis, β¦])Add a new Heatmap trace
add_heatmapgl([autocolorscale, coloraxis, β¦])Add a new Heatmapgl trace
add_histogram([alignmentgroup, autobinx, β¦])Add a new Histogram trace
add_histogram2d([autobinx, autobiny, β¦])Add a new Histogram2d trace
add_histogram2dcontour([autobinx, autobiny, β¦])Add a new Histogram2dContour trace
add_hline(y[, row, col, β¦])Add a horizontal line to a plot or subplot that extends infinitely in the x-dimension.
add_hrect(y0, y1[, row, col, β¦])Add a rectangle to a plot or subplot that extends infinitely in the x-dimension.
add_icicle([branchvalues, count, β¦])Add a new Icicle trace
add_image([colormodel, customdata, β¦])Add a new Image trace
add_indicator([align, customdata, β¦])Add a new Indicator trace
add_isosurface([autocolorscale, caps, β¦])Add a new Isosurface trace
add_layout_image([arg, layer, name, β¦])Create and add a new image to the figureβs layout
add_mesh3d([alphahull, autocolorscale, β¦])Add a new Mesh3d trace
add_ohlc([close, closesrc, customdata, β¦])Add a new Ohlc trace
add_parcats([arrangement, bundlecolors, β¦])Add a new Parcats trace
add_parcoords([customdata, customdatasrc, β¦])Add a new Parcoords trace
add_pie([automargin, customdata, β¦])Add a new Pie trace
add_pointcloud([customdata, customdatasrc, β¦])Add a new Pointcloud trace
add_sankey([arrangement, customdata, β¦])Add a new Sankey trace
add_scatter([alignmentgroup, cliponaxis, β¦])Add a new Scatter trace
add_scatter3d([connectgaps, customdata, β¦])Add a new Scatter3d trace
add_scattercarpet([a, asrc, b, bsrc, β¦])Add a new Scattercarpet trace
add_scattergeo([connectgaps, customdata, β¦])Add a new Scattergeo trace
add_scattergl([connectgaps, customdata, β¦])Add a new Scattergl trace
add_scattermap([below, cluster, β¦])Add a new Scattermap trace
add_scattermapbox([below, cluster, β¦])Add a new Scattermapbox trace
add_scatterpolar([cliponaxis, connectgaps, β¦])Add a new Scatterpolar trace
add_scatterpolargl([connectgaps, β¦])Add a new Scatterpolargl trace
add_scattersmith([cliponaxis, connectgaps, β¦])Add a new Scattersmith trace
add_scatterternary([a, asrc, b, bsrc, c, β¦])Add a new Scatterternary trace
add_selection([arg, line, name, opacity, β¦])Create and add a new selection to the figureβs layout
add_shape([arg, editable, fillcolor, β¦])Create and add a new shape to the figureβs layout
add_splom([customdata, customdatasrc, β¦])Add a new Splom trace
add_streamtube([autocolorscale, cauto, β¦])Add a new Streamtube trace
add_sunburst([branchvalues, count, β¦])Add a new Sunburst trace
add_surface([autocolorscale, cauto, cmax, β¦])Add a new Surface trace
add_table([cells, columnorder, β¦])Add a new Table trace
add_trace(trace[, row, col, secondary_y, β¦])Add a trace to the figure
add_traces(data[, rows, cols, secondary_ys, β¦])Add traces to the figure
add_treemap([branchvalues, count, β¦])Add a new Treemap trace
add_violin([alignmentgroup, bandwidth, box, β¦])Add a new Violin trace
add_vline(x[, row, col, β¦])Add a vertical line to a plot or subplot that extends infinitely in the y-dimension.
add_volume([autocolorscale, caps, cauto, β¦])Add a new Volume trace
add_vrect(x0, x1[, row, col, β¦])Add a rectangle to a plot or subplot that extends infinitely in the y-dimension.
add_waterfall([alignmentgroup, base, β¦])Add a new Waterfall trace
append_trace(trace, row, col)Add a trace to the figure bound to axes at the specified row, col index.
batch_animate([duration, easing])Context manager to animate trace / layout updates
A context manager that batches up trace and layout assignment operations into a singe plotly_update message that is executed when the context exits.
for_each_annotation(fn[, selector, row, β¦])Apply a function to all annotations that satisfy the specified selection criteria
for_each_coloraxis(fn[, selector, row, col])Apply a function to all coloraxis objects that satisfy the specified selection criteria
for_each_geo(fn[, selector, row, col])Apply a function to all geo objects that satisfy the specified selection criteria
for_each_layout_image(fn[, selector, row, β¦])Apply a function to all images that satisfy the specified selection criteria
for_each_legend(fn[, selector, row, col])Apply a function to all legend objects that satisfy the specified selection criteria
for_each_map(fn[, selector, row, col])Apply a function to all map objects that satisfy the specified selection criteria
for_each_mapbox(fn[, selector, row, col])Apply a function to all mapbox objects that satisfy the specified selection criteria
for_each_polar(fn[, selector, row, col])Apply a function to all polar objects that satisfy the specified selection criteria
for_each_scene(fn[, selector, row, col])Apply a function to all scene objects that satisfy the specified selection criteria
for_each_selection(fn[, selector, row, col, β¦])Apply a function to all selections that satisfy the specified selection criteria
for_each_shape(fn[, selector, row, col, β¦])Apply a function to all shapes that satisfy the specified selection criteria
for_each_smith(fn[, selector, row, col])Apply a function to all smith objects that satisfy the specified selection criteria
for_each_ternary(fn[, selector, row, col])Apply a function to all ternary objects that satisfy the specified selection criteria
for_each_trace(fn[, selector, row, col, β¦])Apply a function to all traces that satisfy the specified selection criteria
for_each_xaxis(fn[, selector, row, col])Apply a function to all xaxis objects that satisfy the specified selection criteria
for_each_yaxis(fn[, selector, row, col, β¦])Apply a function to all yaxis objects that satisfy the specified selection criteria
full_figure_for_development([warn, as_dict])Compute default values for all attributes not specified in the input figure and returns the output as a βfullβ figure.
get_subplot(row, col[, secondary_y])Return an object representing the subplot at the specified row and column.
plotly_relayout(relayout_data, **kwargs)Perform a Plotly relayout operation on the figureβs layout
plotly_restyle(restyle_data[, trace_indexes])Perform a Plotly restyle operation on the figureβs traces
plotly_update([restyle_data, relayout_data, β¦])Perform a Plotly update operation on the figure.
pop(key, *args)Remove the value associated with the specified key and return it
Print a visual layout of the figureβs axes arrangement.
select_annotations([selector, row, col, β¦])Select annotations from a particular subplot cell and/or annotations that satisfy custom selection criteria.
select_coloraxes([selector, row, col])Select coloraxis subplot objects from a particular subplot cell and/or coloraxis subplot objects that satisfy custom selection criteria.
select_geos([selector, row, col])Select geo subplot objects from a particular subplot cell and/or geo subplot objects that satisfy custom selection criteria.
select_layout_images([selector, row, col, β¦])Select images from a particular subplot cell and/or images that satisfy custom selection criteria.
select_legends([selector, row, col])Select legend subplot objects from a particular subplot cell and/or legend subplot objects that satisfy custom selection criteria.
select_mapboxes([selector, row, col])Select mapbox subplot objects from a particular subplot cell and/or mapbox subplot objects that satisfy custom selection criteria.
select_maps([selector, row, col])Select map subplot objects from a particular subplot cell and/or map subplot objects that satisfy custom selection criteria.
select_polars([selector, row, col])Select polar subplot objects from a particular subplot cell and/or polar subplot objects that satisfy custom selection criteria.
select_scenes([selector, row, col])Select scene subplot objects from a particular subplot cell and/or scene subplot objects that satisfy custom selection criteria.
select_selections([selector, row, col, β¦])Select selections from a particular subplot cell and/or selections that satisfy custom selection criteria.
select_shapes([selector, row, col, secondary_y])Select shapes from a particular subplot cell and/or shapes that satisfy custom selection criteria.
select_smiths([selector, row, col])Select smith subplot objects from a particular subplot cell and/or smith subplot objects that satisfy custom selection criteria.
select_ternaries([selector, row, col])Select ternary subplot objects from a particular subplot cell and/or ternary subplot objects that satisfy custom selection criteria.
select_traces([selector, row, col, secondary_y])Select traces from a particular subplot cell and/or traces that satisfy custom selection criteria.
select_xaxes([selector, row, col])Select xaxis subplot objects from a particular subplot cell and/or xaxis subplot objects that satisfy custom selection criteria.
select_yaxes([selector, row, col, secondary_y])Select yaxis subplot objects from a particular subplot cell and/or yaxis subplot objects that satisfy custom selection criteria.
set_subplots([rows, cols])Add subplots to this figure.
show(*args, **kwargs)Show a figure using either the default renderer(s) or the renderer(s) specified by the renderer argument
to_dict()Convert figure to a dictionary
to_html(*args, **kwargs)Convert a figure to an HTML string representation.
to_image(*args, **kwargs)Convert a figure to a static image bytes string
to_json(*args, **kwargs)Convert a figure to a JSON string representation
to_ordered_dict([skip_uid])Convert figure to a JSON representation as a Python dict
update([dict1, overwrite])Update the properties of the figure with a dict and/or with keyword arguments.
update_annotations([patch, selector, row, β¦])Perform a property update operation on all annotations that satisfy the specified selection criteria
update_coloraxes([patch, selector, β¦])Perform a property update operation on all coloraxis objects that satisfy the specified selection criteria
update_geos([patch, selector, overwrite, β¦])Perform a property update operation on all geo objects that satisfy the specified selection criteria
update_layout([dict1, overwrite])Update the properties of the figureβs layout with a dict and/or with keyword arguments.
update_layout_images([patch, selector, row, β¦])Perform a property update operation on all images that satisfy the specified selection criteria
update_legends([patch, selector, overwrite, β¦])Perform a property update operation on all legend objects that satisfy the specified selection criteria
update_mapboxes([patch, selector, β¦])Perform a property update operation on all mapbox objects that satisfy the specified selection criteria
update_maps([patch, selector, overwrite, β¦])Perform a property update operation on all map objects that satisfy the specified selection criteria
update_polars([patch, selector, overwrite, β¦])Perform a property update operation on all polar objects that satisfy the specified selection criteria
update_scenes([patch, selector, overwrite, β¦])Perform a property update operation on all scene objects that satisfy the specified selection criteria
update_selections([patch, selector, row, β¦])Perform a property update operation on all selections that satisfy the specified selection criteria
update_shapes([patch, selector, row, col, β¦])Perform a property update operation on all shapes that satisfy the specified selection criteria
update_smiths([patch, selector, overwrite, β¦])Perform a property update operation on all smith objects that satisfy the specified selection criteria
update_ternaries([patch, selector, β¦])Perform a property update operation on all ternary objects that satisfy the specified selection criteria
update_traces([patch, selector, row, col, β¦])Perform a property update operation on all traces that satisfy the specified selection criteria
update_xaxes([patch, selector, overwrite, β¦])Perform a property update operation on all xaxis objects that satisfy the specified selection criteria
update_yaxes([patch, selector, overwrite, β¦])Perform a property update operation on all yaxis objects that satisfy the specified selection criteria
write_html(*args, **kwargs)Write a figure to an HTML file representation
write_image(*args, **kwargs)Convert a figure to a static image and write it to a file or writeable object
write_json(*args, **kwargs)Convert a figure to JSON and write it to a file or writeable object
Attributes
The
dataproperty is a tuple of the figureβs trace objectsThe
framesproperty is a tuple of the figureβs frame objectsThe
layoutproperty of the figure-
