A dict of string/value properties that will be passedto the Layout constructor
Supported dict properties:
- activeselection
plotly.graph_objects.layout.Activeselection
instance or dict with compatibleproperties- activeshape
:class:`plotly.graph_objects.layout.Activeshape` instance or dict with compatible properties
- annotations
A tuple ofplotly.graph_objects.layout.Annotationinstances or dicts with compatible properties
- annotationdefaults
When used in a template (aslayout.template.layout.annotationdefaults),sets the default property values to use forelements of layout.annotations
- autosize
Determines whether or not a layout width orheight that has been left undefined by the useris initialized on each relayout. Note that,regardless of this attribute, an undefinedlayout width or height is always initialized onthe first call to plot.
- autotypenumbers
Using “strict” a numeric string in trace datais not converted to a number. Using converttypes a numeric string in trace data may betreated as a number during automatic axis
type
detection. This is the default value;however it could be overridden for individualaxes.- barcornerradius
Sets the rounding of bar corners. May be aninteger number of pixels, or a percentage ofbar width (as a string ending in %).
- bargap
Sets the gap (in plot fraction) between bars ofadjacent location coordinates.
- bargroupgap
Sets the gap (in plot fraction) between bars ofthe same location coordinate.
- barmode
Determines how bars at the same locationcoordinate are displayed on the graph. With“stack”, the bars are stacked on top of oneanother With “relative”, the bars are stackedon top of one another, with negative valuesbelow the axis, positive values above With“group”, the bars are plotted next to oneanother centered around the shared location.With “overlay”, the bars are plotted over oneanother, you might need to reduce “opacity” tosee multiple bars.
- barnorm
Sets the normalization for bar traces on thegraph. With “fraction”, the value of each baris divided by the sum of all values at thatlocation coordinate. “percent” is the same butmultiplied by 100 to show percentages.
- boxgap
Sets the gap (in plot fraction) between boxesof adjacent location coordinates. Has no effecton traces that have “width” set.
- boxgroupgap
Sets the gap (in plot fraction) between boxesof the same location coordinate. Has no effecton traces that have “width” set.
- boxmode
Determines how boxes at the same locationcoordinate are displayed on the graph. If“group”, the boxes are plotted next to oneanother centered around the shared location. If“overlay”, the boxes are plotted over oneanother, you might need to set “opacity” to seethem multiple boxes. Has no effect on tracesthat have “width” set.
- calendar
Sets the default calendar system to use forinterpreting and displaying dates throughoutthe plot.
- clickmode
Determines the mode of single clickinteractions. “event” is the default value andemits the
plotly_click
event. In additionthis mode emits theplotly_selected
event indrag modes “lasso” and “select”, but with noevent data attached (kept for compatibilityreasons). The “select” flag enables selectingsingle data points via click. This mode alsosupports persistent selections, meaning thatpressing Shift while clicking, adds to /subtracts from an existing selection. “select”withhovermode
: “x” can be confusing,consider explicitly settinghovermode
:“closest” when using this feature. Selectionevents are sent accordingly as long as “event”flag is set as well. When the “event” flag ismissing,plotly_click
andplotly_selected
events 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-impactingvalues namely
margin.t
,margin.b
,margin.l
andmargin.r
in “full-json” mode.- datarevision
If provided, a changed value tells
Plotly.react
that one or more data arrays haschanged. This way you can modify arrays in-place rather than making a complete new copyfor an incremental change. If NOT provided,Plotly.react
assumes that data arrays arebeing treated as immutable, thus any data arraywith a different identity from its predecessorcontains new data.- dragmode
Determines the mode of drag interactions.“select” and “lasso” apply only to scattertraces with markers or text. “orbit” and“turntable” apply only to 3D scenes.
- editrevision
Controls persistence of user-driven changes in
editable: true
configuration, other thantrace names and axis titles. Defaults tolayout.uirevision
.- extendfunnelareacolors
If
true
, the funnelarea slice colors (whethergiven byfunnelareacolorway
or inherited fromcolorway
) will be extended to three times itsoriginal length by first repeating every color20% lighter then each color 20% darker. This isintended to reduce the likelihood of reusingthe same color when you have many slices, butyou can setfalse
to disable. Colors providedin the trace, usingmarker.colors
, are neverextended.- extendiciclecolors
If
true
, the icicle slice colors (whethergiven byiciclecolorway
or inherited fromcolorway
) will be extended to three times itsoriginal length by first repeating every color20% lighter then each color 20% darker. This isintended to reduce the likelihood of reusingthe same color when you have many slices, butyou can setfalse
to disable. Colors providedin the trace, usingmarker.colors
, are neverextended.- extendpiecolors
If
true
, the pie slice colors (whether givenbypiecolorway
or inherited fromcolorway
)will be extended to three times its originallength by first repeating every color 20%lighter then each color 20% darker. This isintended to reduce the likelihood of reusingthe same color when you have many slices, butyou can setfalse
to disable. Colors providedin the trace, usingmarker.colors
, are neverextended.- extendsunburstcolors
If
true
, the sunburst slice colors (whethergiven bysunburstcolorway
or inherited fromcolorway
) will be extended to three times itsoriginal length by first repeating every color20% lighter then each color 20% darker. This isintended to reduce the likelihood of reusingthe same color when you have many slices, butyou can setfalse
to disable. Colors providedin the trace, usingmarker.colors
, are neverextended.- extendtreemapcolors
If
true
, the treemap slice colors (whethergiven bytreemapcolorway
or inherited fromcolorway
) will be extended to three times itsoriginal length by first repeating every color20% lighter then each color 20% darker. This isintended to reduce the likelihood of reusingthe same color when you have many slices, butyou can setfalse
to disable. Colors providedin the trace, usingmarker.colors
, are neverextended.- font
Sets the global font. Note that fonts used intraces and other layout components inherit fromthe global font.
- funnelareacolorway
Sets the default funnelarea slice colors.Defaults to the main
colorway
used for tracecolors. If you specify a new list here it canstill be extended with lighter and darkercolors, seeextendfunnelareacolors
.- funnelgap
Sets the gap (in plot fraction) between bars ofadjacent location coordinates.
- funnelgroupgap
Sets the gap (in plot fraction) between bars ofthe same location coordinate.
- funnelmode
Determines how bars at the same locationcoordinate are displayed on the graph. With“stack”, the bars are stacked on top of oneanother With “group”, the bars are plotted nextto one another centered around the sharedlocation. With “overlay”, the bars are plottedover 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 chartanalog of visible:’legendonly’ but it cancontain many labels, and can simultaneouslyhide slices from several pies/funnelarea charts
- hiddenlabelssrc
Sets the source reference on Chart Studio Cloudfor
hiddenlabels
.- hidesources
Determines whether or not a text link citingthe data source is placed at the bottom-rightcored of the figure. Has only an effect only ongraphs that have been generated via forkedgraphs from the Chart Studio Cloud (athttps://chart-studio.plotly.com or on-premise).
- hoverdistance
Sets the default distance (in pixels) to lookfor data to add hover labels (-1 means nocutoff, 0 means no looking for data). This isonly a real distance for hovering on point-likeobjects, like scatter points. For area-likeobjects (bars, scatter fills, etc) hovering ison inside the area and off outside, but theseobjects will not supersede hover on point-likeobjects 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 forthe “closest” point within the
hoverdistance
.If “x” (or “y”), multiple hoverlabels willappear for multiple points at the “closest” x-(or y-) coordinate within thehoverdistance
,with the caveat that no more than onehoverlabel will appear per trace. If xunified (or y unified), a single hoverlabelwill appear multiple points at the closest x-(or y-) coordinate within thehoverdistance
with the caveat that no more than onehoverlabel will appear per trace. In this mode,spikelines are enabled by default perpendicularto the specified axis. If false, hoverinteractions are disabled.- hoversubplots
Determines expansion of hover effects to othersubplots If “single” just the axis pair of theprimary point is included without overlayingsubplots. If “overlaying” all subplots usingthe main axis and occupying the same space areincluded. If “axis”, also include stackedsubplots using the same axis when
hovermode
is set to “x”, x unified, “y” or y unified.- iciclecolorway
Sets the default icicle slice colors. Defaultsto the main
colorway
used for trace colors.If you specify a new list here it can still beextended with lighter and darker colors, seeextendiciclecolors
.- images
A tuple ofplotly.graph_objects.layout.Imageinstances or dicts with compatible properties
- imagedefaults
When used in a template (aslayout.template.layout.imagedefaults), sets thedefault property values to use for elements oflayout.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 usedin various
text
attributes. Attributes suchas the graph, axis and colorbartitle.text
,annotationtext
trace.name
in legend items,rangeselector
,updatemenus
andsliders
label
text all supportmeta
. One can accessmeta
fields using template strings:%{meta[i]}
wherei
is the index of themeta
item in question.meta
can also be anobject for example{key: value}
which can beaccessed %{meta[key]}.- metasrc
Sets the source reference on Chart Studio Cloudfor
meta
.- minreducedheight
Minimum height of the plot withmargin.automargin applied (in px)
- minreducedwidth
Minimum width of the plot withmargin.automargin applied (in px)
- modebar
plotly.graph_objects.layout.Modebarinstance or dict with compatible properties
- newselection
plotly.graph_objects.layout.Newselection
instance 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 wherethe graph is drawn.
- piecolorway
Sets the default pie slice colors. Defaults tothe main
colorway
used for trace colors. Ifyou specify a new list here it can still beextended with lighter and darker colors, seeextendpiecolors
.- plot_bgcolor
Sets the background color of the plotting areain-between x and y axes.
- polar
plotly.graph_objects.layout.Polarinstance or dict with compatible properties
- scattergap
Sets the gap (in plot fraction) between scatterpoints of adjacent location coordinates.Defaults to
bargap
.- scattermode
Determines how scatter points at the samelocation coordinate are displayed on the graph.With “group”, the scatter points are plottednext to one another centered around the sharedlocation. With “overlay”, the scatter pointsare plotted over one another, you might need toreduce “opacity” to see multiple scatterpoints.
- scene
plotly.graph_objects.layout.Sceneinstance or dict with compatible properties
- selectdirection
When
dragmode
is set to “select”, this limitsthe selection of the drag to horizontal,vertical or diagonal. “h” only allowshorizontal selection, “v” only vertical, “d”only diagonal and “any” sets no limit.- selectionrevision
Controls persistence of user-driven changes inselected points from all traces.
- selections
A tuple ofplotly.graph_objects.layout.Selectioninstances or dicts with compatible properties
- selectiondefaults
When used in a template (aslayout.template.layout.selectiondefaults), setsthe default property values to use for elementsof layout.selections
- separators
Sets the decimal and thousand separators. Forexample, *. * puts a ‘.’ before decimals and aspace between thousands. In English locales,dflt is “.,” but other locales may alter thisdefault.
- shapes
A tuple ofplotly.graph_objects.layout.Shapeinstances or dicts with compatible properties
- shapedefaults
When used in a template (aslayout.template.layout.shapedefaults), sets thedefault property values to use for elements oflayout.shapes
- showlegend
Determines whether or not a legend is drawn.Default is
true
if there is a trace to showand any of these: a) Two or more traces wouldby default be shown in the legend. b) One pietrace is shown in the legend. c) One trace isexplicitly given withshowlegend: true
.- sliders
A tuple ofplotly.graph_objects.layout.Sliderinstances or dicts with compatible properties
- sliderdefaults
When used in a template (aslayout.template.layout.sliderdefaults), setsthe default property values to use for elementsof layout.sliders
- smith
plotly.graph_objects.layout.Smithinstance or dict with compatible properties
- spikedistance
Sets the default distance (in pixels) to lookfor data to draw spikelines to (-1 means nocutoff, 0 means no looking for data). As withhoverdistance, distance does not apply to area-like objects. In addition, some objects can behovered on but will not generate spikelines,such as scatter fills.
- sunburstcolorway
Sets the default sunburst slice colors.Defaults to the main
colorway
used for tracecolors. If you specify a new list here it canstill be extended with lighter and darkercolors, seeextendsunburstcolors
.- template
Default attributes to be applied to the plot.This should be a dict with format:
{'layout':layoutTemplate, 'data': {trace_type:[traceTemplate, ...], ...}}
wherelayoutTemplate
is a dict matching thestructure offigure.layout
andtraceTemplate
is a dict matching thestructure of the trace with typetrace_type
(e.g. ‘scatter’). Alternatively, this may bespecified as an instance ofplotly.graph_objects.layout.Template. Tracetemplates are applied cyclically to traces ofeach type. Container arrays (egannotations
)have special handling: An object ending indefaults
(egannotationdefaults
) is appliedto each array item. But if an item has atemplateitemname
key we look in the templatearray for an item with matchingname
andapply that instead. If no matchingname
isfound we mark the item invisible. Any namedtemplate item not referenced is appended to theend of the array, so this can be used to add awatermark annotation or a logo image, forexample. To omit one of these items on theplot, make an item with matchingtemplateitemname
andvisible: 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.fontinstead. Sets the title font. Note that thetitle’s font used to be customized by the nowdeprecated
titlefont
attribute.- transition
Sets transition options used duringPlotly.react updates.
- treemapcolorway
Sets the default treemap slice colors. Defaultsto the main
colorway
used for trace colors.If you specify a new list here it can still beextended with lighter and darker colors, seeextendtreemapcolors
.- uirevision
Used to allow user interactions with the plotto persist after
Plotly.react
calls that areunaware of these interactions. Ifuirevision
is omitted, or if it is given and it changedfrom the previousPlotly.react
call, theexact new figure is used. Ifuirevision
istruthy and did NOT change, any attribute thathas been affected by user interactions and didnot receive a different value in the new figurewill keep the interaction value.layout.uirevision
attribute serves as thedefault foruirevision
attributes in varioussub-containers. For finer control you can setthese sub-attributes directly. For example, ifyour app separately controls the data on the xand y axes you might setxaxis.uirevision=*time*
andyaxis.uirevision=*cost*
. Then if only the ydata is changed, you can updateyaxis.uirevision=*quantity*
and the y axisrange will reset but the x axis range willretain any user-driven zoom.- uniformtext
:class:`plotly.graph_objects.layout.Uniformtext` instance or dict with compatible properties
- updatemenus
A tuple ofplotly.graph_objects.layout.Updatemenuinstances or dicts with compatible properties
- updatemenudefaults
When used in a template (aslayout.template.layout.updatemenudefaults),sets the default property values to use forelements of layout.updatemenus
- violingap
Sets the gap (in plot fraction) between violinsof adjacent location coordinates. Has no effecton traces that have “width” set.
- violingroupgap
Sets the gap (in plot fraction) between violinsof the same location coordinate. Has no effecton traces that have “width” set.
- violinmode
Determines how violins at the same locationcoordinate are displayed on the graph. If“group”, the violins are plotted next to oneanother centered around the shared location. If“overlay”, the violins are plotted over oneanother, you might need to set “opacity” to seethem multiple violins. Has no effect on tracesthat have “width” set.
- waterfallgap
Sets the gap (in plot fraction) between bars ofadjacent location coordinates.
- waterfallgroupgap
Sets the gap (in plot fraction) between bars ofthe same location coordinate.
- waterfallmode
Determines how bars at the same locationcoordinate are displayed on the graph. With“group”, the bars are plotted next to oneanother centered around the shared location.With “overlay”, the bars are plotted over oneanother, you might need to reduce “opacity” tosee 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