code
stringlengths
26
870k
docstring
stringlengths
1
65.6k
func_name
stringlengths
1
194
language
stringclasses
1 value
repo
stringlengths
8
68
path
stringlengths
5
194
url
stringlengths
46
254
license
stringclasses
4 values
def widthsrc(self): """ 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 ------- str """ return self["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 ------- str
widthsrc
python
plotly/plotly.py
plotly/graph_objs/_barpolar.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/_barpolar.py
MIT
def __init__( self, arg=None, base=None, basesrc=None, customdata=None, customdatasrc=None, dr=None, dtheta=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=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, ): """ Construct a new Barpolar object The data visualized by the radial span of the bars is set in `r` Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.Barpolar` 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 `dtheta` step equals the subplot's period divided by the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. hoverinfosrc Sets the source reference on Chart Studio Cloud for `hoverinfo`. hoverlabel :class:`plotly.graph_objects.barpolar.Hoverlabel` instance or dict with compatible properties 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. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: 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>`. 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 :class:`plotly.graph_objects.barpolar.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.traceorder` they 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 :class:`plotly.graph_objects.barpolar.Marker` instance or dict with compatible properties 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 colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is 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 with `dr` where `r0` is the starting coordinate and `dr` the step. rsrc Sets the source reference on Chart Studio Cloud for `r`. selected :class:`plotly.graph_objects.barpolar.Selected` instance or dict with compatible properties 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 `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream :class:`plotly.graph_objects.barpolar.Stream` instance or dict with compatible properties 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 to `layout.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 with `dtheta` where `theta0` is the starting coordinate and `dtheta` the 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: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected :class:`plotly.graph_objects.barpolar.Unselected` instance or dict with compatible properties 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 angular width (in "thetaunit" units). widthsrc Sets the source reference on Chart Studio Cloud for `width`. Returns ------- Barpolar """ super(Barpolar, self).__init__("barpolar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.Barpolar constructor must be a dict or an instance of :class:`plotly.graph_objs.Barpolar`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("base", None) _v = base if base is not None else _v if _v is not None: self["base"] = _v _v = arg.pop("basesrc", None) _v = basesrc if basesrc is not None else _v if _v is not None: self["basesrc"] = _v _v = arg.pop("customdata", None) _v = customdata if customdata is not None else _v if _v is not None: self["customdata"] = _v _v = arg.pop("customdatasrc", None) _v = customdatasrc if customdatasrc is not None else _v if _v is not None: self["customdatasrc"] = _v _v = arg.pop("dr", None) _v = dr if dr is not None else _v if _v is not None: self["dr"] = _v _v = arg.pop("dtheta", None) _v = dtheta if dtheta is not None else _v if _v is not None: self["dtheta"] = _v _v = arg.pop("hoverinfo", None) _v = hoverinfo if hoverinfo is not None else _v if _v is not None: self["hoverinfo"] = _v _v = arg.pop("hoverinfosrc", None) _v = hoverinfosrc if hoverinfosrc is not None else _v if _v is not None: self["hoverinfosrc"] = _v _v = arg.pop("hoverlabel", None) _v = hoverlabel if hoverlabel is not None else _v if _v is not None: self["hoverlabel"] = _v _v = arg.pop("hovertemplate", None) _v = hovertemplate if hovertemplate is not None else _v if _v is not None: self["hovertemplate"] = _v _v = arg.pop("hovertemplatesrc", None) _v = hovertemplatesrc if hovertemplatesrc is not None else _v if _v is not None: self["hovertemplatesrc"] = _v _v = arg.pop("hovertext", None) _v = hovertext if hovertext is not None else _v if _v is not None: self["hovertext"] = _v _v = arg.pop("hovertextsrc", None) _v = hovertextsrc if hovertextsrc is not None else _v if _v is not None: self["hovertextsrc"] = _v _v = arg.pop("ids", None) _v = ids if ids is not None else _v if _v is not None: self["ids"] = _v _v = arg.pop("idssrc", None) _v = idssrc if idssrc is not None else _v if _v is not None: self["idssrc"] = _v _v = arg.pop("legend", None) _v = legend if legend is not None else _v if _v is not None: self["legend"] = _v _v = arg.pop("legendgroup", None) _v = legendgroup if legendgroup is not None else _v if _v is not None: self["legendgroup"] = _v _v = arg.pop("legendgrouptitle", None) _v = legendgrouptitle if legendgrouptitle is not None else _v if _v is not None: self["legendgrouptitle"] = _v _v = arg.pop("legendrank", None) _v = legendrank if legendrank is not None else _v if _v is not None: self["legendrank"] = _v _v = arg.pop("legendwidth", None) _v = legendwidth if legendwidth is not None else _v if _v is not None: self["legendwidth"] = _v _v = arg.pop("marker", None) _v = marker if marker is not None else _v if _v is not None: self["marker"] = _v _v = arg.pop("meta", None) _v = meta if meta is not None else _v if _v is not None: self["meta"] = _v _v = arg.pop("metasrc", None) _v = metasrc if metasrc is not None else _v if _v is not None: self["metasrc"] = _v _v = arg.pop("name", None) _v = name if name is not None else _v if _v is not None: self["name"] = _v _v = arg.pop("offset", None) _v = offset if offset is not None else _v if _v is not None: self["offset"] = _v _v = arg.pop("offsetsrc", None) _v = offsetsrc if offsetsrc is not None else _v if _v is not None: self["offsetsrc"] = _v _v = arg.pop("opacity", None) _v = opacity if opacity is not None else _v if _v is not None: self["opacity"] = _v _v = arg.pop("r", None) _v = r if r is not None else _v if _v is not None: self["r"] = _v _v = arg.pop("r0", None) _v = r0 if r0 is not None else _v if _v is not None: self["r0"] = _v _v = arg.pop("rsrc", None) _v = rsrc if rsrc is not None else _v if _v is not None: self["rsrc"] = _v _v = arg.pop("selected", None) _v = selected if selected is not None else _v if _v is not None: self["selected"] = _v _v = arg.pop("selectedpoints", None) _v = selectedpoints if selectedpoints is not None else _v if _v is not None: self["selectedpoints"] = _v _v = arg.pop("showlegend", None) _v = showlegend if showlegend is not None else _v if _v is not None: self["showlegend"] = _v _v = arg.pop("stream", None) _v = stream if stream is not None else _v if _v is not None: self["stream"] = _v _v = arg.pop("subplot", None) _v = subplot if subplot is not None else _v if _v is not None: self["subplot"] = _v _v = arg.pop("text", None) _v = text if text is not None else _v if _v is not None: self["text"] = _v _v = arg.pop("textsrc", None) _v = textsrc if textsrc is not None else _v if _v is not None: self["textsrc"] = _v _v = arg.pop("theta", None) _v = theta if theta is not None else _v if _v is not None: self["theta"] = _v _v = arg.pop("theta0", None) _v = theta0 if theta0 is not None else _v if _v is not None: self["theta0"] = _v _v = arg.pop("thetasrc", None) _v = thetasrc if thetasrc is not None else _v if _v is not None: self["thetasrc"] = _v _v = arg.pop("thetaunit", None) _v = thetaunit if thetaunit is not None else _v if _v is not None: self["thetaunit"] = _v _v = arg.pop("uid", None) _v = uid if uid is not None else _v if _v is not None: self["uid"] = _v _v = arg.pop("uirevision", None) _v = uirevision if uirevision is not None else _v if _v is not None: self["uirevision"] = _v _v = arg.pop("unselected", None) _v = unselected if unselected is not None else _v if _v is not None: self["unselected"] = _v _v = arg.pop("visible", None) _v = visible if visible is not None else _v if _v is not None: self["visible"] = _v _v = arg.pop("width", None) _v = width if width is not None else _v if _v is not None: self["width"] = _v _v = arg.pop("widthsrc", None) _v = widthsrc if widthsrc is not None else _v if _v is not None: self["widthsrc"] = _v # Read-only literals # ------------------ self._props["type"] = "barpolar" arg.pop("type", None) # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Barpolar object The data visualized by the radial span of the bars is set in `r` Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.Barpolar` 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 `dtheta` step equals the subplot's period divided by the length of the `r` coordinates. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. hoverinfosrc Sets the source reference on Chart Studio Cloud for `hoverinfo`. hoverlabel :class:`plotly.graph_objects.barpolar.Hoverlabel` instance or dict with compatible properties 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. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: 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>`. 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 :class:`plotly.graph_objects.barpolar.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.traceorder` they 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 :class:`plotly.graph_objects.barpolar.Marker` instance or dict with compatible properties 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 colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is 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 with `dr` where `r0` is the starting coordinate and `dr` the step. rsrc Sets the source reference on Chart Studio Cloud for `r`. selected :class:`plotly.graph_objects.barpolar.Selected` instance or dict with compatible properties 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 `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. stream :class:`plotly.graph_objects.barpolar.Stream` instance or dict with compatible properties 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 to `layout.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 with `dtheta` where `theta0` is the starting coordinate and `dtheta` the 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: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. unselected :class:`plotly.graph_objects.barpolar.Unselected` instance or dict with compatible properties 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 angular width (in "thetaunit" units). widthsrc Sets the source reference on Chart Studio Cloud for `width`. Returns ------- Barpolar
__init__
python
plotly/plotly.py
plotly/graph_objs/_barpolar.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/_barpolar.py
MIT
def color(self): """ 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray """ return self["color"]
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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray
color
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def colorsrc(self): """ Sets the source reference on Chart Studio Cloud for `color`. The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["colorsrc"]
Sets the source reference on Chart Studio Cloud for `color`. The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
colorsrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray """ return self["family"]
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray
family
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def familysrc(self): """ Sets the source reference on Chart Studio Cloud for `family`. The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["familysrc"]
Sets the source reference on Chart Studio Cloud for `family`. The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
familysrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def lineposition(self): """ Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. The 'lineposition' property is a flaglist and may be specified as a string containing: - Any combination of ['under', 'over', 'through'] joined with '+' characters (e.g. 'under+over') OR exactly one of ['none'] (e.g. 'none') - A list or array of the above Returns ------- Any|numpy.ndarray """ return self["lineposition"]
Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. The 'lineposition' property is a flaglist and may be specified as a string containing: - Any combination of ['under', 'over', 'through'] joined with '+' characters (e.g. 'under+over') OR exactly one of ['none'] (e.g. 'none') - A list or array of the above Returns ------- Any|numpy.ndarray
lineposition
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def linepositionsrc(self): """ Sets the source reference on Chart Studio Cloud for `lineposition`. The 'linepositionsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["linepositionsrc"]
Sets the source reference on Chart Studio Cloud for `lineposition`. The 'linepositionsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
linepositionsrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def shadow(self): """ Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options. The 'shadow' 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 ------- str|numpy.ndarray """ return self["shadow"]
Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options. The 'shadow' 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 ------- str|numpy.ndarray
shadow
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def shadowsrc(self): """ Sets the source reference on Chart Studio Cloud for `shadow`. The 'shadowsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["shadowsrc"]
Sets the source reference on Chart Studio Cloud for `shadow`. The 'shadowsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
shadowsrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def size(self): """ The 'size' 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 ------- int|float|numpy.ndarray """ return self["size"]
The 'size' 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 ------- int|float|numpy.ndarray
size
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def sizesrc(self): """ Sets the source reference on Chart Studio Cloud for `size`. The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["sizesrc"]
Sets the source reference on Chart Studio Cloud for `size`. The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
sizesrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def style(self): """ Sets whether a font should be styled with a normal or italic face from its family. The 'style' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'italic'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ return self["style"]
Sets whether a font should be styled with a normal or italic face from its family. The 'style' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'italic'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray
style
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def stylesrc(self): """ Sets the source reference on Chart Studio Cloud for `style`. The 'stylesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["stylesrc"]
Sets the source reference on Chart Studio Cloud for `style`. The 'stylesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
stylesrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def textcase(self): """ Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. The 'textcase' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'word caps', 'upper', 'lower'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ return self["textcase"]
Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. The 'textcase' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'word caps', 'upper', 'lower'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray
textcase
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def textcasesrc(self): """ Sets the source reference on Chart Studio Cloud for `textcase`. The 'textcasesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["textcasesrc"]
Sets the source reference on Chart Studio Cloud for `textcase`. The 'textcasesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
textcasesrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def variant(self): """ Sets the variant of the font. The 'variant' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'small-caps', 'all-small-caps', 'all-petite-caps', 'petite-caps', 'unicase'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ return self["variant"]
Sets the variant of the font. The 'variant' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'small-caps', 'all-small-caps', 'all-petite-caps', 'petite-caps', 'unicase'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray
variant
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def variantsrc(self): """ Sets the source reference on Chart Studio Cloud for `variant`. The 'variantsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["variantsrc"]
Sets the source reference on Chart Studio Cloud for `variant`. The 'variantsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
variantsrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def weight(self): """ Sets the weight (or boldness) of the font. The 'weight' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|numpy.ndarray """ return self["weight"]
Sets the weight (or boldness) of the font. The 'weight' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|numpy.ndarray
weight
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def weightsrc(self): """ Sets the source reference on Chart Studio Cloud for `weight`. The 'weightsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["weightsrc"]
Sets the source reference on Chart Studio Cloud for `weight`. The 'weightsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
weightsrc
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def __init__( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, lineposition=None, linepositionsrc=None, shadow=None, shadowsrc=None, size=None, sizesrc=None, style=None, stylesrc=None, textcase=None, textcasesrc=None, variant=None, variantsrc=None, weight=None, weightsrc=None, **kwargs, ): """ Construct a new Font object Sets the font used in hover labels. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font` color colorsrc Sets the source reference on Chart Studio Cloud for `color`. family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". familysrc Sets the source reference on Chart Studio Cloud for `family`. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. linepositionsrc Sets the source reference on Chart Studio Cloud for `lineposition`. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. shadowsrc Sets the source reference on Chart Studio Cloud for `shadow`. size sizesrc Sets the source reference on Chart Studio Cloud for `size`. style Sets whether a font should be styled with a normal or italic face from its family. stylesrc Sets the source reference on Chart Studio Cloud for `style`. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. textcasesrc Sets the source reference on Chart Studio Cloud for `textcase`. variant Sets the variant of the font. variantsrc Sets the source reference on Chart Studio Cloud for `variant`. weight Sets the weight (or boldness) of the font. weightsrc Sets the source reference on Chart Studio Cloud for `weight`. Returns ------- Font """ super(Font, self).__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.isosurface.hoverlabel.Font constructor must be a dict or an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("color", None) _v = color if color is not None else _v if _v is not None: self["color"] = _v _v = arg.pop("colorsrc", None) _v = colorsrc if colorsrc is not None else _v if _v is not None: self["colorsrc"] = _v _v = arg.pop("family", None) _v = family if family is not None else _v if _v is not None: self["family"] = _v _v = arg.pop("familysrc", None) _v = familysrc if familysrc is not None else _v if _v is not None: self["familysrc"] = _v _v = arg.pop("lineposition", None) _v = lineposition if lineposition is not None else _v if _v is not None: self["lineposition"] = _v _v = arg.pop("linepositionsrc", None) _v = linepositionsrc if linepositionsrc is not None else _v if _v is not None: self["linepositionsrc"] = _v _v = arg.pop("shadow", None) _v = shadow if shadow is not None else _v if _v is not None: self["shadow"] = _v _v = arg.pop("shadowsrc", None) _v = shadowsrc if shadowsrc is not None else _v if _v is not None: self["shadowsrc"] = _v _v = arg.pop("size", None) _v = size if size is not None else _v if _v is not None: self["size"] = _v _v = arg.pop("sizesrc", None) _v = sizesrc if sizesrc is not None else _v if _v is not None: self["sizesrc"] = _v _v = arg.pop("style", None) _v = style if style is not None else _v if _v is not None: self["style"] = _v _v = arg.pop("stylesrc", None) _v = stylesrc if stylesrc is not None else _v if _v is not None: self["stylesrc"] = _v _v = arg.pop("textcase", None) _v = textcase if textcase is not None else _v if _v is not None: self["textcase"] = _v _v = arg.pop("textcasesrc", None) _v = textcasesrc if textcasesrc is not None else _v if _v is not None: self["textcasesrc"] = _v _v = arg.pop("variant", None) _v = variant if variant is not None else _v if _v is not None: self["variant"] = _v _v = arg.pop("variantsrc", None) _v = variantsrc if variantsrc is not None else _v if _v is not None: self["variantsrc"] = _v _v = arg.pop("weight", None) _v = weight if weight is not None else _v if _v is not None: self["weight"] = _v _v = arg.pop("weightsrc", None) _v = weightsrc if weightsrc is not None else _v if _v is not None: self["weightsrc"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Font object Sets the font used in hover labels. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font` color colorsrc Sets the source reference on Chart Studio Cloud for `color`. family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". familysrc Sets the source reference on Chart Studio Cloud for `family`. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. linepositionsrc Sets the source reference on Chart Studio Cloud for `lineposition`. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. shadowsrc Sets the source reference on Chart Studio Cloud for `shadow`. size sizesrc Sets the source reference on Chart Studio Cloud for `size`. style Sets whether a font should be styled with a normal or italic face from its family. stylesrc Sets the source reference on Chart Studio Cloud for `style`. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. textcasesrc Sets the source reference on Chart Studio Cloud for `textcase`. variant Sets the variant of the font. variantsrc Sets the source reference on Chart Studio Cloud for `variant`. weight Sets the weight (or boldness) of the font. weightsrc Sets the source reference on Chart Studio Cloud for `weight`. Returns ------- Font
__init__
python
plotly/plotly.py
plotly/graph_objs/isosurface/hoverlabel/_font.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/isosurface/hoverlabel/_font.py
MIT
def add_wrapper(wrapped_name, full_params, param_list): buffer.write( f""" def {wrapped_name}(self, {full_params}) -> "{fig_classname}": ''' {getattr(BaseFigure, wrapped_name).__doc__} ''' return super({fig_classname}, self).{wrapped_name}({param_list}) """ )
{getattr(BaseFigure, wrapped_name).__doc__}
build_figure_py.add_wrapper
python
plotly/plotly.py
codegen/figure.py
https://github.com/plotly/plotly.py/blob/master/codegen/figure.py
MIT
def build_figure_py( trace_node, base_package, base_classname, fig_classname, data_validator, layout_validator, frame_validator, subplot_nodes, layout_array_nodes, ): """ Parameters ---------- trace_node : PlotlyNode Root trace node (the node that is the parent of all of the individual trace nodes like bar, scatter, etc.) base_package : str Package that the figure's superclass resides in base_classname : str Name of the figure's superclass fig_classname : str Name of the Figure class to be generated data_validator : BaseDataValidator DataValidator instance layout_validator : CompoundValidator LayoutValidator instance frame_validator : CompoundArrayValidator FrameValidator instance subplot_nodes: list of str List of names of all of the layout subplot properties layout_array_nodes: list of PlotlyNode List of array nodes under layout that can be positioned using xref/yref Returns ------- str Source code for figure class definition """ # Initialize source code buffer # ----------------------------- buffer = StringIO() # Get list of trace type nodes # ---------------------------- trace_nodes = trace_node.child_compound_datatypes # Write imports # ------------- # ### Import base class ### buffer.write(f"from plotly.{base_package} import {base_classname}\n") # Write class definition # ---------------------- buffer.write( f""" class {fig_classname}({base_classname}):\n""" ) # ### Constructor ### # Build constructor description strings data_description = reindent_validator_description(data_validator, 8) layout_description = reindent_validator_description(layout_validator, 8) frames_description = reindent_validator_description(frame_validator, 8) buffer.write( f""" def __init__(self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs): \"\"\" Create a new :class:{fig_classname} instance Parameters ---------- data {data_description} layout {layout_description} frames {frames_description} 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 \"\"\" super({fig_classname} ,self).__init__(data, layout, frames, skip_invalid, **kwargs) """ ) def add_wrapper(wrapped_name, full_params, param_list): buffer.write( f""" def {wrapped_name}(self, {full_params}) -> "{fig_classname}": ''' {getattr(BaseFigure, wrapped_name).__doc__} ''' return super({fig_classname}, self).{wrapped_name}({param_list}) """ ) add_wrapper( "update", "dict1=None, overwrite=False, **kwargs", "dict1, overwrite, **kwargs", ) add_wrapper( "update_traces", "patch=None, selector=None, row=None, col=None, secondary_y=None, overwrite=False, **kwargs", "patch, selector, row, col, secondary_y, overwrite, **kwargs", ) add_wrapper( "update_layout", "dict1=None, overwrite=False, **kwargs", "dict1, overwrite, **kwargs", ) add_wrapper( "for_each_trace", "fn, selector=None, row=None, col=None, secondary_y=None", "fn, selector, row, col, secondary_y", ) add_wrapper( "add_trace", "trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False", "trace, row, col, secondary_y, exclude_empty_subplots", ) add_wrapper( "add_traces", "data,rows=None,cols=None,secondary_ys=None,exclude_empty_subplots=False", "data,rows,cols,secondary_ys,exclude_empty_subplots", ) add_wrapper( "add_vline", 'x,row="all",col="all",exclude_empty_subplots=True,annotation=None,**kwargs', "x,row,col,exclude_empty_subplots,annotation,**kwargs", ) add_wrapper( "add_hline", 'y,row="all",col="all",exclude_empty_subplots=True,annotation=None,**kwargs', "y,row,col,exclude_empty_subplots,annotation,**kwargs", ) add_wrapper( "add_vrect", 'x0,x1,row="all",col="all",exclude_empty_subplots=True,annotation=None,**kwargs', "x0,x1,row,col,exclude_empty_subplots,annotation,**kwargs", ) add_wrapper( "add_hrect", 'y0,y1,row="all",col="all",exclude_empty_subplots=True,annotation=None,**kwargs', "y0,y1,row,col,exclude_empty_subplots,annotation,**kwargs", ) add_wrapper( "set_subplots", "rows=None, cols=None, **make_subplots_args", "rows, cols, **make_subplots_args", ) # ### add_trace methods for each trace type ### for trace_node in trace_nodes: include_secondary_y = bool( [d for d in trace_node.child_datatypes if d.name_property == "yaxis"] ) # #### Function signature #### buffer.write( f""" def add_{trace_node.plotly_name}(self""" ) # #### Function params#### param_extras = ["row", "col"] if include_secondary_y: param_extras.append("secondary_y") add_constructor_params( buffer, trace_node.child_datatypes, append_extras=param_extras, output_type=fig_classname, ) # #### Docstring #### header = f"Add a new {trace_node.name_datatype_class} trace" doc_extras = [ ( "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).", ), ] if include_secondary_y: doc_extras.append( ( "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.\ """, ) ) add_docstring( buffer, trace_node, header, append_extras=doc_extras, return_type=fig_classname, ) # #### Function body #### buffer.write( f""" from plotly.graph_objs import {trace_node.name_datatype_class} new_trace = {trace_node.name_datatype_class}( """ ) for _, subtype_node in enumerate(trace_node.child_datatypes): subtype_prop_name = subtype_node.name_property buffer.write( f""" {subtype_prop_name}={subtype_prop_name},""" ) buffer.write( """ **kwargs)""" ) if include_secondary_y: secondary_y_kwarg = ", secondary_y=secondary_y" else: secondary_y_kwarg = "" buffer.write( f""" return self.add_trace( new_trace, row=row, col=col{secondary_y_kwarg})""" ) # update layout subplots # ---------------------- inflect_eng = inflect.engine() for subplot_node in subplot_nodes: singular_name = subplot_node.name_property plural_name = inflect_eng.plural_noun(singular_name) if singular_name == "yaxis": secondary_y_1 = ", secondary_y=None" secondary_y_2 = ", secondary_y=secondary_y" secondary_y_docstring = """ 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.""" else: secondary_y_1 = "" secondary_y_2 = "" secondary_y_docstring = "" buffer.write( f""" def select_{plural_name}( self, selector=None, row=None, col=None{secondary_y_1}): \"\"\" Select {singular_name} subplot objects from a particular subplot cell and/or {singular_name} subplot objects that satisfy custom selection criteria. Parameters ---------- selector: dict, function, or None (default None) Dict to use as selection criteria. {singular_name} 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 {singular_name} 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 {singular_name} and those for which the function returned True will be in the selection. row, col: int or None (default None) Subplot row and column index of {singular_name} objects to select. To select {singular_name} objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all {singular_name} objects are selected.\ {secondary_y_docstring} Returns ------- generator Generator that iterates through all of the {singular_name} objects that satisfy all of the specified selection criteria \"\"\" return self._select_layout_subplots_by_prefix( '{singular_name}', selector, row, col{secondary_y_2}) def for_each_{singular_name}( self, fn, selector=None, row=None, col=None{secondary_y_1}) -> '{fig_classname}': \"\"\" Apply a function to all {singular_name} objects that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single {singular_name} object. selector: dict, function, or None (default None) Dict to use as selection criteria. {singular_name} 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 {singular_name} 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 {singular_name} and those for which the function returned True will be in the selection. row, col: int or None (default None) Subplot row and column index of {singular_name} objects to select. To select {singular_name} objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all {singular_name} objects are selected.\ {secondary_y_docstring} Returns ------- self Returns the {fig_classname} object that the method was called on \"\"\" for obj in self.select_{plural_name}( selector=selector, row=row, col=col{secondary_y_2}): fn(obj) return self def update_{plural_name}( self, patch=None, selector=None, overwrite=False, row=None, col=None{secondary_y_1}, **kwargs) -> '{fig_classname}': \"\"\" Perform a property update operation on all {singular_name} objects that satisfy the specified selection criteria Parameters ---------- patch: dict Dictionary of property updates to be applied to all {singular_name} objects that satisfy the selection criteria. selector: dict, function, or None (default None) Dict to use as selection criteria. {singular_name} 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 {singular_name} 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 {singular_name} 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, col: int or None (default None) Subplot row and column index of {singular_name} objects to select. To select {singular_name} objects by row and column, the Figure must have been created using plotly.subplots.make_subplots. If None (the default), all {singular_name} objects are selected.\ {secondary_y_docstring} **kwargs Additional property updates to apply to each selected {singular_name} object. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns ------- self Returns the {fig_classname} object that the method was called on \"\"\" for obj in self.select_{plural_name}( selector=selector, row=row, col=col{secondary_y_2}): obj.update(patch, overwrite=overwrite, **kwargs) return self""" ) # update annotations/shapes/images # -------------------------------- for node in layout_array_nodes: singular_name = node.plotly_name plural_name = node.name_property if singular_name == "image": # Rename image to layout_image to avoid conflict with an image trace method_prefix = "layout_" else: method_prefix = "" buffer.write( f""" def select_{method_prefix}{plural_name}( self, selector=None, row=None, col=None, secondary_y=None ): \"\"\" Select {plural_name} from a particular subplot cell and/or {plural_name} 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 {plural_name} 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 {singular_name} and those for which the function returned True will be in the selection. If an int N, the Nth {singular_name} matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S). row, col: int or None (default None) Subplot row and column index of {plural_name} to select. To select {plural_name} by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those {singular_name} that are in paper coordinates, set row and col to the string 'paper'. If None (the default), all {plural_name} are selected. secondary_y: boolean or None (default None) * If True, only select {plural_name} associated with the secondary y-axis of the subplot. * If False, only select {plural_name} associated with the primary y-axis of the subplot. * If None (the default), do not filter {plural_name} based on secondary y-axis. To select {plural_name} 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 Generator that iterates through all of the {plural_name} that satisfy all of the specified selection criteria \"\"\" return self._select_annotations_like( "{plural_name}", selector=selector, row=row, col=col, secondary_y=secondary_y ) def for_each_{method_prefix}{singular_name}( self, fn, selector=None, row=None, col=None, secondary_y=None ): \"\"\" Apply a function to all {plural_name} that satisfy the specified selection criteria Parameters ---------- fn: Function that inputs a single {singular_name} 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 {plural_name} 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 {singular_name} and those for which the function returned True will be in the selection. If an int N, the Nth {singular_name} matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S). row, col: int or None (default None) Subplot row and column index of {plural_name} to select. To select {plural_name} by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those {plural_name} that are in paper coordinates, set row and col to the string 'paper'. If None (the default), all {plural_name} are selected. secondary_y: boolean or None (default None) * If True, only select {plural_name} associated with the secondary y-axis of the subplot. * If False, only select {plural_name} associated with the primary y-axis of the subplot. * If None (the default), do not filter {plural_name} based on secondary y-axis. To select {plural_name} 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 ------- self Returns the {fig_classname} object that the method was called on \"\"\" for obj in self._select_annotations_like( prop='{plural_name}', selector=selector, row=row, col=col, secondary_y=secondary_y, ): fn(obj) return self def update_{method_prefix}{plural_name}( self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs ) -> '{fig_classname}': \"\"\" Perform a property update operation on all {plural_name} that satisfy the specified selection criteria Parameters ---------- patch: dict or None (default None) Dictionary of property updates to be applied to all {plural_name} 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 {plural_name} 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 {singular_name} and those for which the function returned True will be in the selection. If an int N, the Nth {singular_name} matching row and col will be selected (N can be negative). If a string S, the selector is equivalent to dict(type=S). row, col: int or None (default None) Subplot row and column index of {plural_name} to select. To select {plural_name} by row and column, the Figure must have been created using plotly.subplots.make_subplots. To select only those {singular_name} that are in paper coordinates, set row and col to the string 'paper'. If None (the default), all {plural_name} are selected. secondary_y: boolean or None (default None) * If True, only select {plural_name} associated with the secondary y-axis of the subplot. * If False, only select {plural_name} associated with the primary y-axis of the subplot. * If None (the default), do not filter {plural_name} based on secondary y-axis. To select {plural_name} 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 {singular_name}. If a property is specified in both patch and in **kwargs then the one in **kwargs takes precedence. Returns ------- self Returns the {fig_classname} object that the method was called on \"\"\" for obj in self._select_annotations_like( prop='{plural_name}', selector=selector, row=row, col=col, secondary_y=secondary_y, ): obj.update(patch, **kwargs) return self """ ) # Add layout array items buffer.write( f""" def add_{method_prefix}{singular_name}(self""" ) add_constructor_params( buffer, node.child_datatypes, prepend_extras=["arg"], append_extras=["row", "col", "secondary_y", "exclude_empty_subplots"], output_type=fig_classname, ) prepend_extras = [ ( "arg", f"instance of {node.name_datatype_class} or dict with " "compatible properties", ) ] append_extras = [ ( "row", f"Subplot row for {singular_name}. If 'all', addresses all rows in the specified column(s).", ), ( "col", f"Subplot column for {singular_name}. If 'all', addresses all columns in the specified row(s).", ), ("secondary_y", f"Whether to add {singular_name} to secondary y-axis"), ( "exclude_empty_subplots", f"If True, {singular_name} will not be added to subplots without traces.", ), ] add_docstring( buffer, node, header=f"Create and add a new {singular_name} to the figure's layout", prepend_extras=prepend_extras, append_extras=append_extras, return_type=fig_classname, ) # #### Function body #### buffer.write( f""" from plotly.graph_objs import layout as _layout new_obj = _layout.{node.name_datatype_class}(arg, """ ) for _, subtype_node in enumerate(node.child_datatypes): subtype_prop_name = subtype_node.name_property buffer.write( f""" {subtype_prop_name}={subtype_prop_name},""" ) buffer.write("""**kwargs)""") buffer.write( f""" return self._add_annotation_like( '{singular_name}', '{plural_name}', new_obj, row=row, col=col, secondary_y=secondary_y, exclude_empty_subplots=exclude_empty_subplots, )""" ) # Return source string # -------------------- buffer.write("\n") return buffer.getvalue()
Parameters ---------- trace_node : PlotlyNode Root trace node (the node that is the parent of all of the individual trace nodes like bar, scatter, etc.) base_package : str Package that the figure's superclass resides in base_classname : str Name of the figure's superclass fig_classname : str Name of the Figure class to be generated data_validator : BaseDataValidator DataValidator instance layout_validator : CompoundValidator LayoutValidator instance frame_validator : CompoundArrayValidator FrameValidator instance subplot_nodes: list of str List of names of all of the layout subplot properties layout_array_nodes: list of PlotlyNode List of array nodes under layout that can be positioned using xref/yref Returns ------- str Source code for figure class definition
build_figure_py
python
plotly/plotly.py
codegen/figure.py
https://github.com/plotly/plotly.py/blob/master/codegen/figure.py
MIT
def write_figure_classes( outdir, trace_node, data_validator, layout_validator, frame_validator, subplot_nodes, layout_array_nodes, ): """ Construct source code for the Figure and FigureWidget classes and write to graph_objs/_figure.py and graph_objs/_figurewidget.py respectively Parameters ---------- outdir : str Root outdir in which the graph_objs package should reside trace_node : PlotlyNode Root trace node (the node that is the parent of all of the individual trace nodes like bar, scatter, etc.) data_validator : BaseDataValidator DataValidator instance layout_validator : CompoundValidator LayoutValidator instance frame_validator : CompoundArrayValidator FrameValidator instance subplot_nodes: list of PlotlyNode List of names of all of the layout subplot properties layout_array_nodes: list of PlotlyNode List of array nodes under layout that can be positioned using xref/yref Returns ------- None """ # Validate inputs # --------------- if trace_node.node_path: raise ValueError( f"Expected root trace node.\n" f'Received node with path "{trace_node.path_str}"' ) # Loop over figure types # ---------------------- base_figures = [ ("basewidget", "BaseFigureWidget", "FigureWidget"), ("basedatatypes", "BaseFigure", "Figure"), ] for base_package, base_classname, fig_classname in base_figures: # ### Build figure source code string ### figure_source = build_figure_py( trace_node, base_package, base_classname, fig_classname, data_validator, layout_validator, frame_validator, subplot_nodes, layout_array_nodes, ) # ### Format and write to file### filepath = opath.join(outdir, "graph_objs", f"_{fig_classname.lower()}.py") write_source_py(figure_source, filepath)
Construct source code for the Figure and FigureWidget classes and write to graph_objs/_figure.py and graph_objs/_figurewidget.py respectively Parameters ---------- outdir : str Root outdir in which the graph_objs package should reside trace_node : PlotlyNode Root trace node (the node that is the parent of all of the individual trace nodes like bar, scatter, etc.) data_validator : BaseDataValidator DataValidator instance layout_validator : CompoundValidator LayoutValidator instance frame_validator : CompoundArrayValidator FrameValidator instance subplot_nodes: list of PlotlyNode List of names of all of the layout subplot properties layout_array_nodes: list of PlotlyNode List of array nodes under layout that can be positioned using xref/yref Returns ------- None
write_figure_classes
python
plotly/plotly.py
codegen/figure.py
https://github.com/plotly/plotly.py/blob/master/codegen/figure.py
MIT
def annotations(self): """ The 'annotations' property is a tuple of instances of Annotation that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.scene.Annotation - A list or tuple of dicts of string/value properties that will be passed to the Annotation constructor Supported dict properties: align Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains 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 (in pixels). ay Sets the y component of the arrow tail about the arrow head (in pixels). 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 `text` and 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 `captureevents` is False unless `hovertext` is provided. If you use the event `plotly_clickannotation` without `hovertext` you must explicitly enable `captureevents`. 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 :class:`plotly.graph_objects.layout.scene.annot ation.Hoverlabel` instance or dict with compatible properties hovertext 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to 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, `text` is placed near the arrow's tail. If False, `text` lines up with the `x` and `y` provided. 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` / `ay` vector, in contrast to `xshift` / `yshift` which 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` / `ay` vector, in contrast to `xshift` / `yshift` which 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: 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> <span> are also supported. textangle Sets the angle at which the `text` is drawn with respect to the horizontal. valign Sets the vertical alignment of the `text` within 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. xanchor Sets the text box's horizontal position anchor This anchor binds the `x` position to the "left", "center" or "right" of the annotation. For example, if `x` is set to 1, `xref` to "paper" and `xanchor` to "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. 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. yanchor Sets the text box's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the annotation. For example, if `y` is set to 1, `yref` to "paper" and `yanchor` to "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. yshift Shifts the position of the whole annotation and arrow up (positive) or down (negative) by this many pixels. z Sets the annotation's z position. Returns ------- tuple[plotly.graph_objs.layout.scene.Annotation] """ return self["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_objs.layout.scene.Annotation - A list or tuple of dicts of string/value properties that will be passed to the Annotation constructor Supported dict properties: align Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains 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 (in pixels). ay Sets the y component of the arrow tail about the arrow head (in pixels). 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 `text` and 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 `captureevents` is False unless `hovertext` is provided. If you use the event `plotly_clickannotation` without `hovertext` you must explicitly enable `captureevents`. 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 :class:`plotly.graph_objects.layout.scene.annot ation.Hoverlabel` instance or dict with compatible properties hovertext 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to 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, `text` is placed near the arrow's tail. If False, `text` lines up with the `x` and `y` provided. 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` / `ay` vector, in contrast to `xshift` / `yshift` which 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` / `ay` vector, in contrast to `xshift` / `yshift` which 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: 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> <span> are also supported. textangle Sets the angle at which the `text` is drawn with respect to the horizontal. valign Sets the vertical alignment of the `text` within 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. xanchor Sets the text box's horizontal position anchor This anchor binds the `x` position to the "left", "center" or "right" of the annotation. For example, if `x` is set to 1, `xref` to "paper" and `xanchor` to "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. 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. yanchor Sets the text box's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the annotation. For example, if `y` is set to 1, `yref` to "paper" and `yanchor` to "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. yshift Shifts the position of the whole annotation and arrow up (positive) or down (negative) by this many pixels. z Sets the annotation's z position. Returns ------- tuple[plotly.graph_objs.layout.scene.Annotation]
annotations
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def annotationdefaults(self): """ When used in a template (as layout.template.layout.scene.annotationdefaults), sets the default property values to use for elements of layout.scene.annotations The 'annotationdefaults' property is an instance of Annotation that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Annotation` - A dict of string/value properties that will be passed to the Annotation constructor Supported dict properties: Returns ------- plotly.graph_objs.layout.scene.Annotation """ return self["annotationdefaults"]
When used in a template (as layout.template.layout.scene.annotationdefaults), sets the default property values to use for elements of layout.scene.annotations The 'annotationdefaults' property is an instance of Annotation that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Annotation` - A dict of string/value properties that will be passed to the Annotation constructor Supported dict properties: Returns ------- plotly.graph_objs.layout.scene.Annotation
annotationdefaults
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def aspectmode(self): """ If "cube", this scene's axes are drawn as a cube, regardless of the axes' ranges. If "data", this scene's axes are drawn in proportion with the axes' ranges. If "manual", this scene's axes are drawn in proportion with the input of "aspectratio" (the default behavior if "aspectratio" is provided). If "auto", this scene's axes are drawn using the results of "data" except when one axis is more than four times the size of the two others, where in that case the results of "cube" are used. The 'aspectmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'cube', 'data', 'manual'] Returns ------- Any """ return self["aspectmode"]
If "cube", this scene's axes are drawn as a cube, regardless of the axes' ranges. If "data", this scene's axes are drawn in proportion with the axes' ranges. If "manual", this scene's axes are drawn in proportion with the input of "aspectratio" (the default behavior if "aspectratio" is provided). If "auto", this scene's axes are drawn using the results of "data" except when one axis is more than four times the size of the two others, where in that case the results of "cube" are used. The 'aspectmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'cube', 'data', 'manual'] Returns ------- Any
aspectmode
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def aspectratio(self): """ Sets this scene's axis aspectratio. The 'aspectratio' property is an instance of Aspectratio that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Aspectratio` - A dict of string/value properties that will be passed to the Aspectratio constructor Supported dict properties: x y z Returns ------- plotly.graph_objs.layout.scene.Aspectratio """ return self["aspectratio"]
Sets this scene's axis aspectratio. The 'aspectratio' property is an instance of Aspectratio that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Aspectratio` - A dict of string/value properties that will be passed to the Aspectratio constructor Supported dict properties: x y z Returns ------- plotly.graph_objs.layout.scene.Aspectratio
aspectratio
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def bgcolor(self): """ The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["bgcolor"]
The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
bgcolor
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def camera(self): """ The 'camera' property is an instance of Camera that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Camera` - A dict of string/value properties that will be passed to the Camera constructor Supported dict properties: center Sets the (x,y,z) components of the 'center' camera vector This vector determines the translation (x,y,z) space about the center of this scene. By default, there is no such translation. eye Sets the (x,y,z) components of the 'eye' camera vector. This vector determines the view point about the origin of this scene. projection :class:`plotly.graph_objects.layout.scene.camer a.Projection` instance or dict with compatible properties up Sets the (x,y,z) components of the 'up' camera vector. This vector determines the up direction of this scene with respect to the page. The default is *{x: 0, y: 0, z: 1}* which means that the z axis points up. Returns ------- plotly.graph_objs.layout.scene.Camera """ return self["camera"]
The 'camera' property is an instance of Camera that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Camera` - A dict of string/value properties that will be passed to the Camera constructor Supported dict properties: center Sets the (x,y,z) components of the 'center' camera vector This vector determines the translation (x,y,z) space about the center of this scene. By default, there is no such translation. eye Sets the (x,y,z) components of the 'eye' camera vector. This vector determines the view point about the origin of this scene. projection :class:`plotly.graph_objects.layout.scene.camer a.Projection` instance or dict with compatible properties up Sets the (x,y,z) components of the 'up' camera vector. This vector determines the up direction of this scene with respect to the page. The default is *{x: 0, y: 0, z: 1}* which means that the z axis points up. Returns ------- plotly.graph_objs.layout.scene.Camera
camera
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def domain(self): """ The 'domain' property is an instance of Domain that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Domain` - A dict of string/value properties that will be passed to the Domain constructor Supported dict properties: column If there is a layout grid, use the domain for this column in the grid for this scene subplot . row If there is a layout grid, use the domain for this row in the grid for this scene subplot . x Sets the horizontal domain of this scene subplot (in plot fraction). y Sets the vertical domain of this scene subplot (in plot fraction). Returns ------- plotly.graph_objs.layout.scene.Domain """ return self["domain"]
The 'domain' property is an instance of Domain that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.Domain` - A dict of string/value properties that will be passed to the Domain constructor Supported dict properties: column If there is a layout grid, use the domain for this column in the grid for this scene subplot . row If there is a layout grid, use the domain for this row in the grid for this scene subplot . x Sets the horizontal domain of this scene subplot (in plot fraction). y Sets the vertical domain of this scene subplot (in plot fraction). Returns ------- plotly.graph_objs.layout.scene.Domain
domain
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def dragmode(self): """ Determines the mode of drag interactions for this scene. The 'dragmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['orbit', 'turntable', 'zoom', 'pan', False] Returns ------- Any """ return self["dragmode"]
Determines the mode of drag interactions for this scene. The 'dragmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['orbit', 'turntable', 'zoom', 'pan', False] Returns ------- Any
dragmode
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def hovermode(self): """ Determines the mode of hover interactions for this scene. The 'hovermode' property is an enumeration that may be specified as: - One of the following enumeration values: ['closest', False] Returns ------- Any """ return self["hovermode"]
Determines the mode of hover interactions for this scene. The 'hovermode' property is an enumeration that may be specified as: - One of the following enumeration values: ['closest', False] Returns ------- Any
hovermode
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def uirevision(self): """ Controls persistence of user-driven changes in camera attributes. Defaults to `layout.uirevision`. The 'uirevision' property accepts values of any type Returns ------- Any """ return self["uirevision"]
Controls persistence of user-driven changes in camera attributes. Defaults to `layout.uirevision`. The 'uirevision' property accepts values of any type Returns ------- Any
uirevision
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def xaxis(self): """ The 'xaxis' property is an instance of XAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.XAxis` - A dict of string/value properties that will be passed to the XAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.xaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.xaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.xaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.xaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.xaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.XAxis """ return self["xaxis"]
The 'xaxis' property is an instance of XAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.XAxis` - A dict of string/value properties that will be passed to the XAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.xaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.xaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.xaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.xaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.xaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.XAxis
xaxis
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def yaxis(self): """ The 'yaxis' property is an instance of YAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.YAxis` - A dict of string/value properties that will be passed to the YAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.yaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.yaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.yaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.yaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.yaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.YAxis """ return self["yaxis"]
The 'yaxis' property is an instance of YAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.YAxis` - A dict of string/value properties that will be passed to the YAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.yaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.yaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.yaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.yaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.yaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.YAxis
yaxis
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def zaxis(self): """ The 'zaxis' property is an instance of ZAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.ZAxis` - A dict of string/value properties that will be passed to the ZAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.zaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.zaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.zaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.zaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.zaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.ZAxis """ return self["zaxis"]
The 'zaxis' property is an instance of ZAxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.scene.ZAxis` - A dict of string/value properties that will be passed to the ZAxis constructor Supported dict properties: autorange Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided and it has a value for both the lower and upper bound, `autorange` is set to False. Using "min" applies autorange only to set the minimum. Using "max" applies autorange only to set the maximum. Using *min reversed* applies autorange only to set the minimum on a reversed axis. Using *max reversed* applies autorange only to set the maximum on a reversed axis. Using "reversed" applies autorange on both ends and reverses the axis direction. autorangeoptions :class:`plotly.graph_objects.layout.scene.zaxis .Autorangeoptions` instance or dict with compatible properties 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 `type` detection. Defaults to layout.autotypenumbers. backgroundcolor Sets the background color of this axis' wall. calendar Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar` categoryarray Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to "array". Used with `categoryorder`. categoryarraysrc Sets the source reference on Chart Studio Cloud for `categoryarray`. categoryorder Specifies the ordering logic for the case of categorical variables. By default, plotly uses "trace", which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to "array" to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the "trace" mode. The unspecified categories will follow the categories in `categoryarray`. Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values. 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. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" labelalias Replacement text for specific tick or hover labels. For example using {US: 'USA', CA: 'Canada'} changes US to USA and CA to Canada. The labels we would have shown must match the keys exactly, after adding any tickprefix or ticksuffix. For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash. That means you need to use −1 instead of -1. labelalias can be used with any axis type, and both keys (if needed) and values (if desired) can include html-like tags or MathJax. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. maxallowed Determines the maximum range of this axis. minallowed Determines the minimum range of this axis. minexponent Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is "SI" or "B". mirror Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If True, the axis lines are mirrored. If "ticks", the axis lines and ticks are mirrored. If False, mirroring is disable. If "all", axis lines are mirrored on all shared-axes subplots. If "allticks", axis lines and ticks are mirrored on all shared-axes subplots. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". range Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode If "normal", the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If "nonnegative", the range is non- negative, regardless of the input data. Applies only to linear axes. separatethousands If "true", even 4-digit integers are separated showaxeslabels Sets whether or not this axis is labeled showbackground Sets whether or not this axis' wall has a background color. showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showspikes Sets whether or not spikes starting from data points to this axis' wall are shown on hover. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. spikecolor Sets the color of the spikes. spikesides Sets whether or not spikes extending from the projection data points to this axis' wall boundaries are shown on hover. spikethickness Sets the thickness (in px) of the spikes. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://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" tickformatstops A tuple of :class:`plotly.graph_objects.layout. scene.zaxis.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.lay out.scene.zaxis.tickformatstopdefaults), sets the default property values to use for elements of layout.scene.zaxis.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for `ticktext`. tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.layout.scene.zaxis .Title` instance or dict with compatible properties type Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question. visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false zeroline Determines whether or not a line is drawn at along the 0 value of this axis. If True, the zero line is drawn on top of the grid lines. zerolinecolor Sets the line color of the zero line. zerolinewidth Sets the width (in px) of the zero line. Returns ------- plotly.graph_objs.layout.scene.ZAxis
zaxis
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def __init__( self, arg=None, annotations=None, annotationdefaults=None, aspectmode=None, aspectratio=None, bgcolor=None, camera=None, domain=None, dragmode=None, hovermode=None, uirevision=None, xaxis=None, yaxis=None, zaxis=None, **kwargs, ): """ Construct a new Scene object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Scene` annotations A tuple of :class:`plotly.graph_objects.layout.scene.Annotation` instances or dicts with compatible properties annotationdefaults When used in a template (as layout.template.layout.scene.annotationdefaults), sets the default property values to use for elements of layout.scene.annotations aspectmode If "cube", this scene's axes are drawn as a cube, regardless of the axes' ranges. If "data", this scene's axes are drawn in proportion with the axes' ranges. If "manual", this scene's axes are drawn in proportion with the input of "aspectratio" (the default behavior if "aspectratio" is provided). If "auto", this scene's axes are drawn using the results of "data" except when one axis is more than four times the size of the two others, where in that case the results of "cube" are used. aspectratio Sets this scene's axis aspectratio. bgcolor camera :class:`plotly.graph_objects.layout.scene.Camera` instance or dict with compatible properties domain :class:`plotly.graph_objects.layout.scene.Domain` instance or dict with compatible properties dragmode Determines the mode of drag interactions for this scene. hovermode Determines the mode of hover interactions for this scene. uirevision Controls persistence of user-driven changes in camera attributes. Defaults to `layout.uirevision`. xaxis :class:`plotly.graph_objects.layout.scene.XAxis` instance or dict with compatible properties yaxis :class:`plotly.graph_objects.layout.scene.YAxis` instance or dict with compatible properties zaxis :class:`plotly.graph_objects.layout.scene.ZAxis` instance or dict with compatible properties Returns ------- Scene """ super(Scene, self).__init__("scene") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.layout.Scene constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.Scene`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("annotations", None) _v = annotations if annotations is not None else _v if _v is not None: self["annotations"] = _v _v = arg.pop("annotationdefaults", None) _v = annotationdefaults if annotationdefaults is not None else _v if _v is not None: self["annotationdefaults"] = _v _v = arg.pop("aspectmode", None) _v = aspectmode if aspectmode is not None else _v if _v is not None: self["aspectmode"] = _v _v = arg.pop("aspectratio", None) _v = aspectratio if aspectratio is not None else _v if _v is not None: self["aspectratio"] = _v _v = arg.pop("bgcolor", None) _v = bgcolor if bgcolor is not None else _v if _v is not None: self["bgcolor"] = _v _v = arg.pop("camera", None) _v = camera if camera is not None else _v if _v is not None: self["camera"] = _v _v = arg.pop("domain", None) _v = domain if domain is not None else _v if _v is not None: self["domain"] = _v _v = arg.pop("dragmode", None) _v = dragmode if dragmode is not None else _v if _v is not None: self["dragmode"] = _v _v = arg.pop("hovermode", None) _v = hovermode if hovermode is not None else _v if _v is not None: self["hovermode"] = _v _v = arg.pop("uirevision", None) _v = uirevision if uirevision is not None else _v if _v is not None: self["uirevision"] = _v _v = arg.pop("xaxis", None) _v = xaxis if xaxis is not None else _v if _v is not None: self["xaxis"] = _v _v = arg.pop("yaxis", None) _v = yaxis if yaxis is not None else _v if _v is not None: self["yaxis"] = _v _v = arg.pop("zaxis", None) _v = zaxis if zaxis is not None else _v if _v is not None: self["zaxis"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Scene object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Scene` annotations A tuple of :class:`plotly.graph_objects.layout.scene.Annotation` instances or dicts with compatible properties annotationdefaults When used in a template (as layout.template.layout.scene.annotationdefaults), sets the default property values to use for elements of layout.scene.annotations aspectmode If "cube", this scene's axes are drawn as a cube, regardless of the axes' ranges. If "data", this scene's axes are drawn in proportion with the axes' ranges. If "manual", this scene's axes are drawn in proportion with the input of "aspectratio" (the default behavior if "aspectratio" is provided). If "auto", this scene's axes are drawn using the results of "data" except when one axis is more than four times the size of the two others, where in that case the results of "cube" are used. aspectratio Sets this scene's axis aspectratio. bgcolor camera :class:`plotly.graph_objects.layout.scene.Camera` instance or dict with compatible properties domain :class:`plotly.graph_objects.layout.scene.Domain` instance or dict with compatible properties dragmode Determines the mode of drag interactions for this scene. hovermode Determines the mode of hover interactions for this scene. uirevision Controls persistence of user-driven changes in camera attributes. Defaults to `layout.uirevision`. xaxis :class:`plotly.graph_objects.layout.scene.XAxis` instance or dict with compatible properties yaxis :class:`plotly.graph_objects.layout.scene.YAxis` instance or dict with compatible properties zaxis :class:`plotly.graph_objects.layout.scene.ZAxis` instance or dict with compatible properties Returns ------- Scene
__init__
python
plotly/plotly.py
plotly/graph_objs/layout/_scene.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_scene.py
MIT
def imshow( img, zmin=None, zmax=None, origin=None, labels={}, x=None, y=None, animation_frame=None, facet_col=None, facet_col_wrap=None, facet_col_spacing=None, facet_row_spacing=None, color_continuous_scale=None, color_continuous_midpoint=None, range_color=None, title=None, template=None, width=None, height=None, aspect=None, contrast_rescaling=None, binary_string=None, binary_backend="auto", binary_compression_level=4, binary_format="png", text_auto=False, ) -> go.Figure: """ Display an image, i.e. data on a 2D regular raster. Parameters ---------- img: array-like image, or xarray The image data. Supported array shapes are - (M, N): an image with scalar data. The data is visualized using a colormap. - (M, N, 3): an image with RGB values. - (M, N, 4): an image with RGBA values, i.e. including transparency. zmin, zmax : scalar or iterable, optional zmin and zmax define the scalar range that the colormap covers. By default, zmin and zmax correspond to the min and max values of the datatype for integer datatypes (ie [0-255] for uint8 images, [0, 65535] for uint16 images, etc.). For a multichannel image of floats, the max of the image is computed and zmax is the smallest power of 256 (1, 255, 65535) greater than this max value, with a 5% tolerance. For a single-channel image, the max of the image is used. Overridden by range_color. origin : str, 'upper' or 'lower' (default 'upper') position of the [0, 0] pixel of the image array, in the upper left or lower left corner. The convention 'upper' is typically used for matrices and images. labels : dict with str keys and str values (default `{}`) Sets names used in the figure for axis titles (keys ``x`` and ``y``), colorbar title and hoverlabel (key ``color``). The values should correspond to the desired label to be displayed. If ``img`` is an xarray, dimension names are used for axis titles, and long name for the colorbar title (unless overridden in ``labels``). Possible keys are: x, y, and color. x, y: list-like, optional x and y are used to label the axes of single-channel heatmap visualizations and their lengths must match the lengths of the second and first dimensions of the img argument. They are auto-populated if the input is an xarray. animation_frame: int or str, optional (default None) axis number along which the image array is sliced to create an animation plot. If `img` is an xarray, `animation_frame` can be the name of one the dimensions. facet_col: int or str, optional (default None) axis number along which the image array is sliced to create a facetted plot. If `img` is an xarray, `facet_col` can be the name of one the dimensions. facet_col_wrap: int Maximum number of facet columns. Wraps the column variable at this width, so that the column facets span multiple rows. Ignored if `facet_col` is None. facet_col_spacing: float between 0 and 1 Spacing between facet columns, in paper units. Default is 0.02. facet_row_spacing: float between 0 and 1 Spacing between facet rows created when ``facet_col_wrap`` is used, in paper units. Default is 0.0.7. color_continuous_scale : str or list of str colormap used to map scalar data to colors (for a 2D image). This parameter is not used for RGB or RGBA images. If a string is provided, it should be the name of a known color scale, and if a list is provided, it should be a list of CSS- compatible colors. color_continuous_midpoint : number If set, computes the bounds of the continuous color scale to have the desired midpoint. Overridden by range_color or zmin and zmax. range_color : list of two numbers If provided, overrides auto-scaling on the continuous color scale, including overriding `color_continuous_midpoint`. Also overrides zmin and zmax. Used only for single-channel images. title : str The figure title. template : str or dict or plotly.graph_objects.layout.Template instance The figure template name or definition. width : number The figure width in pixels. height: number The figure height in pixels. aspect: 'equal', 'auto', or None - 'equal': Ensures an aspect ratio of 1 or pixels (square pixels) - 'auto': The axes is kept fixed and the aspect ratio of pixels is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. - if None, 'equal' is used for numpy arrays and 'auto' for xarrays (which have typically heterogeneous coordinates) contrast_rescaling: 'minmax', 'infer', or None how to determine data values corresponding to the bounds of the color range, when zmin or zmax are not passed. If `minmax`, the min and max values of the image are used. If `infer`, a heuristic based on the image data type is used. binary_string: bool, default None if True, the image data are first rescaled and encoded as uint8 and then passed to plotly.js as a b64 PNG string. If False, data are passed unchanged as a numerical array. Setting to True may lead to performance gains, at the cost of a loss of precision depending on the original data type. If None, use_binary_string is set to True for multichannel (eg) RGB arrays, and to False for single-channel (2D) arrays. 2D arrays are represented as grayscale and with no colorbar if use_binary_string is True. binary_backend: str, 'auto' (default), 'pil' or 'pypng' Third-party package for the transformation of numpy arrays to png b64 strings. If 'auto', Pillow is used if installed, otherwise pypng. binary_compression_level: int, between 0 and 9 (default 4) png compression level to be passed to the backend when transforming an array to a png b64 string. Increasing `binary_compression` decreases the size of the png string, but the compression step takes more time. For most images it is not worth using levels greater than 5, but it's possible to test `len(fig.data[0].source)` and to time the execution of `imshow` to tune the level of compression. 0 means no compression (not recommended). binary_format: str, 'png' (default) or 'jpg' compression format used to generate b64 string. 'png' is recommended since it uses lossless compression, but 'jpg' (lossy) compression can result if smaller binary strings for natural images. text_auto: bool or str (default `False`) If `True` or a string, single-channel `img` values will be displayed as text. A string like `'.2f'` will be interpreted as a `texttemplate` numeric formatting directive. Returns ------- fig : graph_objects.Figure containing the displayed image See also -------- plotly.graph_objects.Image : image trace plotly.graph_objects.Heatmap : heatmap trace Notes ----- In order to update and customize the returned figure, use `go.Figure.update_traces` or `go.Figure.update_layout`. If an xarray is passed, dimensions names and coordinates are used for axes labels and ticks. """ args = locals() apply_default_cascade(args) labels = labels.copy() nslices_facet = 1 if facet_col is not None: if isinstance(facet_col, str): facet_col = img.dims.index(facet_col) nslices_facet = img.shape[facet_col] facet_slices = range(nslices_facet) ncols = int(facet_col_wrap) if facet_col_wrap is not None else nslices_facet nrows = ( nslices_facet // ncols + 1 if nslices_facet % ncols else nslices_facet // ncols ) else: nrows = 1 ncols = 1 if animation_frame is not None: if isinstance(animation_frame, str): animation_frame = img.dims.index(animation_frame) nslices_animation = img.shape[animation_frame] animation_slices = range(nslices_animation) slice_dimensions = (facet_col is not None) + ( animation_frame is not None ) # 0, 1, or 2 facet_label = None animation_label = None img_is_xarray = False # ----- Define x and y, set labels if img is an xarray ------------------- if xarray_imported and isinstance(img, xarray.DataArray): dims = list(img.dims) img_is_xarray = True pop_indexes = [] if facet_col is not None: facet_slices = img.coords[img.dims[facet_col]].values pop_indexes.append(facet_col) facet_label = img.dims[facet_col] if animation_frame is not None: animation_slices = img.coords[img.dims[animation_frame]].values pop_indexes.append(animation_frame) animation_label = img.dims[animation_frame] # Remove indices in sorted order. for index in sorted(pop_indexes, reverse=True): _ = dims.pop(index) y_label, x_label = dims[0], dims[1] # np.datetime64 is not handled correctly by go.Heatmap for ax in [x_label, y_label]: if np.issubdtype(img.coords[ax].dtype, np.datetime64): img.coords[ax] = img.coords[ax].astype(str) if x is None: x = img.coords[x_label].values if y is None: y = img.coords[y_label].values if aspect is None: aspect = "auto" if labels.get("x", None) is None: labels["x"] = x_label if labels.get("y", None) is None: labels["y"] = y_label if labels.get("animation_frame", None) is None: labels["animation_frame"] = animation_label if labels.get("facet_col", None) is None: labels["facet_col"] = facet_label if labels.get("color", None) is None: labels["color"] = xarray.plot.utils.label_from_attrs(img) labels["color"] = labels["color"].replace("\n", "<br>") else: if hasattr(img, "columns") and hasattr(img.columns, "__len__"): if x is None: x = img.columns if labels.get("x", None) is None and hasattr(img.columns, "name"): labels["x"] = img.columns.name or "" if hasattr(img, "index") and hasattr(img.index, "__len__"): if y is None: y = img.index if labels.get("y", None) is None and hasattr(img.index, "name"): labels["y"] = img.index.name or "" if labels.get("x", None) is None: labels["x"] = "" if labels.get("y", None) is None: labels["y"] = "" if labels.get("color", None) is None: labels["color"] = "" if aspect is None: aspect = "equal" # --- Set the value of binary_string (forbidden for pandas) img = nw.from_native(img, pass_through=True) if isinstance(img, nw.DataFrame): if binary_string: raise ValueError("Binary strings cannot be used with pandas arrays") is_dataframe = True else: is_dataframe = False # --------------- Starting from here img is always a numpy array -------- img = np.asanyarray(img) # Reshape array so that animation dimension comes first, then facets, then images if facet_col is not None: img = np.moveaxis(img, facet_col, 0) if animation_frame is not None and animation_frame < facet_col: animation_frame += 1 facet_col = True if animation_frame is not None: img = np.moveaxis(img, animation_frame, 0) animation_frame = True args["animation_frame"] = ( "animation_frame" if labels.get("animation_frame") is None else labels["animation_frame"] ) iterables = () if animation_frame is not None: iterables += (range(nslices_animation),) if facet_col is not None: iterables += (range(nslices_facet),) # Default behaviour of binary_string: True for RGB images, False for 2D if binary_string is None: binary_string = img.ndim >= (3 + slice_dimensions) and not is_dataframe # Cast bools to uint8 (also one byte) if img.dtype == bool: img = 255 * img.astype(np.uint8) if range_color is not None: zmin = range_color[0] zmax = range_color[1] # -------- Contrast rescaling: either minmax or infer ------------------ if contrast_rescaling is None: contrast_rescaling = "minmax" if img.ndim == (2 + slice_dimensions) else "infer" # We try to set zmin and zmax only if necessary, because traces have good defaults if contrast_rescaling == "minmax": # When using binary_string and minmax we need to set zmin and zmax to rescale the image if (zmin is not None or binary_string) and zmax is None: zmax = img.max() if (zmax is not None or binary_string) and zmin is None: zmin = img.min() else: # For uint8 data and infer we let zmin and zmax to be None if passed as None if zmax is None and img.dtype != np.uint8: zmax = _infer_zmax_from_type(img) if zmin is None and zmax is not None: zmin = 0 # For 2d data, use Heatmap trace, unless binary_string is True if img.ndim == 2 + slice_dimensions and not binary_string: y_index = slice_dimensions if y is not None and img.shape[y_index] != len(y): raise ValueError( "The length of the y vector must match the length of the first " + "dimension of the img matrix." ) x_index = slice_dimensions + 1 if x is not None and img.shape[x_index] != len(x): raise ValueError( "The length of the x vector must match the length of the second " + "dimension of the img matrix." ) texttemplate = None if text_auto is True: texttemplate = "%{z}" elif text_auto is not False: texttemplate = "%{z:" + text_auto + "}" traces = [ go.Heatmap( x=x, y=y, z=img[index_tup], coloraxis="coloraxis1", name=str(i), texttemplate=texttemplate, ) for i, index_tup in enumerate(itertools.product(*iterables)) ] autorange = True if origin == "lower" else "reversed" layout = dict(yaxis=dict(autorange=autorange)) if aspect == "equal": layout["xaxis"] = dict(scaleanchor="y", constrain="domain") layout["yaxis"]["constrain"] = "domain" colorscale_validator = ColorscaleValidator("colorscale", "imshow") layout["coloraxis1"] = dict( colorscale=colorscale_validator.validate_coerce( args["color_continuous_scale"] ), cmid=color_continuous_midpoint, cmin=zmin, cmax=zmax, ) if labels["color"]: layout["coloraxis1"]["colorbar"] = dict(title_text=labels["color"]) # For 2D+RGB data, use Image trace elif ( img.ndim >= 3 and (img.shape[-1] in [3, 4] or slice_dimensions and binary_string) ) or (img.ndim == 2 and binary_string): rescale_image = True # to check whether image has been modified if zmin is not None and zmax is not None: zmin, zmax = ( _vectorize_zvalue(zmin, mode="min"), _vectorize_zvalue(zmax, mode="max"), ) x0, y0, dx, dy = (None,) * 4 error_msg_xarray = ( "Non-numerical coordinates were passed with xarray `img`, but " "the Image trace cannot handle it. Please use `binary_string=False` " "for 2D data or pass instead the numpy array `img.values` to `px.imshow`." ) if x is not None: x = np.asanyarray(x) if np.issubdtype(x.dtype, np.number): x0 = x[0] dx = x[1] - x[0] else: error_msg = ( error_msg_xarray if img_is_xarray else ( "Only numerical values are accepted for the `x` parameter " "when an Image trace is used." ) ) raise ValueError(error_msg) if y is not None: y = np.asanyarray(y) if np.issubdtype(y.dtype, np.number): y0 = y[0] dy = y[1] - y[0] else: error_msg = ( error_msg_xarray if img_is_xarray else ( "Only numerical values are accepted for the `y` parameter " "when an Image trace is used." ) ) raise ValueError(error_msg) if binary_string: if zmin is None and zmax is None: # no rescaling, faster img_rescaled = img rescale_image = False elif img.ndim == 2 + slice_dimensions: # single-channel image img_rescaled = rescale_intensity( img, in_range=(zmin[0], zmax[0]), out_range=np.uint8 ) else: img_rescaled = np.stack( [ rescale_intensity( img[..., ch], in_range=(zmin[ch], zmax[ch]), out_range=np.uint8, ) for ch in range(img.shape[-1]) ], axis=-1, ) img_str = [ image_array_to_data_uri( img_rescaled[index_tup], backend=binary_backend, compression=binary_compression_level, ext=binary_format, ) for index_tup in itertools.product(*iterables) ] traces = [ go.Image(source=img_str_slice, name=str(i), x0=x0, y0=y0, dx=dx, dy=dy) for i, img_str_slice in enumerate(img_str) ] else: colormodel = "rgb" if img.shape[-1] == 3 else "rgba256" traces = [ go.Image( z=img[index_tup], zmin=zmin, zmax=zmax, colormodel=colormodel, x0=x0, y0=y0, dx=dx, dy=dy, ) for index_tup in itertools.product(*iterables) ] layout = {} if origin == "lower" or (dy is not None and dy < 0): layout["yaxis"] = dict(autorange=True) if dx is not None and dx < 0: layout["xaxis"] = dict(autorange="reversed") else: raise ValueError( "px.imshow only accepts 2D single-channel, RGB or RGBA images. " "An image of shape %s was provided. " "Alternatively, 3- or 4-D single or multichannel datasets can be " "visualized using the `facet_col` or/and `animation_frame` arguments." % str(img.shape) ) # Now build figure col_labels = [] if facet_col is not None: slice_label = ( "facet_col" if labels.get("facet_col") is None else labels["facet_col"] ) col_labels = [f"{slice_label}={i}" for i in facet_slices] fig = init_figure(args, "xy", [], nrows, ncols, col_labels, []) for attr_name in ["height", "width"]: if args[attr_name]: layout[attr_name] = args[attr_name] if args["title"]: layout["title_text"] = args["title"] elif args["template"].layout.margin.t is None: layout["margin"] = {"t": 60} frame_list = [] for index, trace in enumerate(traces): if (facet_col and index < nrows * ncols) or index == 0: fig.add_trace(trace, row=nrows - index // ncols, col=index % ncols + 1) if animation_frame is not None: for i, index in zip(range(nslices_animation), animation_slices): frame_list.append( dict( data=traces[nslices_facet * i : nslices_facet * (i + 1)], layout=layout, name=str(index), ) ) if animation_frame: fig.frames = frame_list fig.update_layout(layout) # Hover name, z or color if binary_string and rescale_image and not np.all(img == img_rescaled): # we rescaled the image, hence z is not displayed in hover since it does # not correspond to img values hovertemplate = "%s: %%{x}<br>%s: %%{y}<extra></extra>" % ( labels["x"] or "x", labels["y"] or "y", ) else: if trace["type"] == "heatmap": hover_name = "%{z}" elif img.ndim == 2: hover_name = "%{z[0]}" elif img.ndim == 3 and img.shape[-1] == 3: hover_name = "[%{z[0]}, %{z[1]}, %{z[2]}]" else: hover_name = "%{z}" hovertemplate = "%s: %%{x}<br>%s: %%{y}<br>%s: %s<extra></extra>" % ( labels["x"] or "x", labels["y"] or "y", labels["color"] or "color", hover_name, ) fig.update_traces(hovertemplate=hovertemplate) if labels["x"]: fig.update_xaxes(title_text=labels["x"], row=1) if labels["y"]: fig.update_yaxes(title_text=labels["y"], col=1) configure_animation_controls(args, go.Image, fig) fig.update_layout(template=args["template"], overwrite=True) return fig
Display an image, i.e. data on a 2D regular raster. Parameters ---------- img: array-like image, or xarray The image data. Supported array shapes are - (M, N): an image with scalar data. The data is visualized using a colormap. - (M, N, 3): an image with RGB values. - (M, N, 4): an image with RGBA values, i.e. including transparency. zmin, zmax : scalar or iterable, optional zmin and zmax define the scalar range that the colormap covers. By default, zmin and zmax correspond to the min and max values of the datatype for integer datatypes (ie [0-255] for uint8 images, [0, 65535] for uint16 images, etc.). For a multichannel image of floats, the max of the image is computed and zmax is the smallest power of 256 (1, 255, 65535) greater than this max value, with a 5% tolerance. For a single-channel image, the max of the image is used. Overridden by range_color. origin : str, 'upper' or 'lower' (default 'upper') position of the [0, 0] pixel of the image array, in the upper left or lower left corner. The convention 'upper' is typically used for matrices and images. labels : dict with str keys and str values (default `{}`) Sets names used in the figure for axis titles (keys ``x`` and ``y``), colorbar title and hoverlabel (key ``color``). The values should correspond to the desired label to be displayed. If ``img`` is an xarray, dimension names are used for axis titles, and long name for the colorbar title (unless overridden in ``labels``). Possible keys are: x, y, and color. x, y: list-like, optional x and y are used to label the axes of single-channel heatmap visualizations and their lengths must match the lengths of the second and first dimensions of the img argument. They are auto-populated if the input is an xarray. animation_frame: int or str, optional (default None) axis number along which the image array is sliced to create an animation plot. If `img` is an xarray, `animation_frame` can be the name of one the dimensions. facet_col: int or str, optional (default None) axis number along which the image array is sliced to create a facetted plot. If `img` is an xarray, `facet_col` can be the name of one the dimensions. facet_col_wrap: int Maximum number of facet columns. Wraps the column variable at this width, so that the column facets span multiple rows. Ignored if `facet_col` is None. facet_col_spacing: float between 0 and 1 Spacing between facet columns, in paper units. Default is 0.02. facet_row_spacing: float between 0 and 1 Spacing between facet rows created when ``facet_col_wrap`` is used, in paper units. Default is 0.0.7. color_continuous_scale : str or list of str colormap used to map scalar data to colors (for a 2D image). This parameter is not used for RGB or RGBA images. If a string is provided, it should be the name of a known color scale, and if a list is provided, it should be a list of CSS- compatible colors. color_continuous_midpoint : number If set, computes the bounds of the continuous color scale to have the desired midpoint. Overridden by range_color or zmin and zmax. range_color : list of two numbers If provided, overrides auto-scaling on the continuous color scale, including overriding `color_continuous_midpoint`. Also overrides zmin and zmax. Used only for single-channel images. title : str The figure title. template : str or dict or plotly.graph_objects.layout.Template instance The figure template name or definition. width : number The figure width in pixels. height: number The figure height in pixels. aspect: 'equal', 'auto', or None - 'equal': Ensures an aspect ratio of 1 or pixels (square pixels) - 'auto': The axes is kept fixed and the aspect ratio of pixels is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. - if None, 'equal' is used for numpy arrays and 'auto' for xarrays (which have typically heterogeneous coordinates) contrast_rescaling: 'minmax', 'infer', or None how to determine data values corresponding to the bounds of the color range, when zmin or zmax are not passed. If `minmax`, the min and max values of the image are used. If `infer`, a heuristic based on the image data type is used. binary_string: bool, default None if True, the image data are first rescaled and encoded as uint8 and then passed to plotly.js as a b64 PNG string. If False, data are passed unchanged as a numerical array. Setting to True may lead to performance gains, at the cost of a loss of precision depending on the original data type. If None, use_binary_string is set to True for multichannel (eg) RGB arrays, and to False for single-channel (2D) arrays. 2D arrays are represented as grayscale and with no colorbar if use_binary_string is True. binary_backend: str, 'auto' (default), 'pil' or 'pypng' Third-party package for the transformation of numpy arrays to png b64 strings. If 'auto', Pillow is used if installed, otherwise pypng. binary_compression_level: int, between 0 and 9 (default 4) png compression level to be passed to the backend when transforming an array to a png b64 string. Increasing `binary_compression` decreases the size of the png string, but the compression step takes more time. For most images it is not worth using levels greater than 5, but it's possible to test `len(fig.data[0].source)` and to time the execution of `imshow` to tune the level of compression. 0 means no compression (not recommended). binary_format: str, 'png' (default) or 'jpg' compression format used to generate b64 string. 'png' is recommended since it uses lossless compression, but 'jpg' (lossy) compression can result if smaller binary strings for natural images. text_auto: bool or str (default `False`) If `True` or a string, single-channel `img` values will be displayed as text. A string like `'.2f'` will be interpreted as a `texttemplate` numeric formatting directive. Returns ------- fig : graph_objects.Figure containing the displayed image See also -------- plotly.graph_objects.Image : image trace plotly.graph_objects.Heatmap : heatmap trace Notes ----- In order to update and customize the returned figure, use `go.Figure.update_traces` or `go.Figure.update_layout`. If an xarray is passed, dimensions names and coordinates are used for axes labels and ticks.
imshow
python
plotly/plotly.py
plotly/express/_imshow.py
https://github.com/plotly/plotly.py/blob/master/plotly/express/_imshow.py
MIT
def font(self): """ Sets this legend group's title font. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.splom.legendgrouptitle.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- plotly.graph_objs.splom.legendgrouptitle.Font """ return self["font"]
Sets this legend group's title font. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.splom.legendgrouptitle.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- plotly.graph_objs.splom.legendgrouptitle.Font
font
python
plotly/plotly.py
plotly/graph_objs/splom/_legendgrouptitle.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/splom/_legendgrouptitle.py
MIT
def text(self): """ Sets the title of the legend group. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["text"]
Sets the title of the legend group. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
text
python
plotly/plotly.py
plotly/graph_objs/splom/_legendgrouptitle.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/splom/_legendgrouptitle.py
MIT
def __init__(self, arg=None, font=None, text=None, **kwargs): """ Construct a new Legendgrouptitle object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.splom.Legendgrouptitle` font Sets this legend group's title font. text Sets the title of the legend group. Returns ------- Legendgrouptitle """ super(Legendgrouptitle, self).__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.splom.Legendgrouptitle constructor must be a dict or an instance of :class:`plotly.graph_objs.splom.Legendgrouptitle`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("font", None) _v = font if font is not None else _v if _v is not None: self["font"] = _v _v = arg.pop("text", None) _v = text if text is not None else _v if _v is not None: self["text"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Legendgrouptitle object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.splom.Legendgrouptitle` font Sets this legend group's title font. text Sets the title of the legend group. Returns ------- Legendgrouptitle
__init__
python
plotly/plotly.py
plotly/graph_objs/splom/_legendgrouptitle.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/splom/_legendgrouptitle.py
MIT
def bounds(self): """ Sets the lower and upper bounds of this axis rangebreak. Can be used with `pattern`. The 'bounds' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'bounds[0]' property accepts values of any type (1) The 'bounds[1]' property accepts values of any type Returns ------- list """ return self["bounds"]
Sets the lower and upper bounds of this axis rangebreak. Can be used with `pattern`. The 'bounds' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'bounds[0]' property accepts values of any type (1) The 'bounds[1]' property accepts values of any type Returns ------- list
bounds
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def dvalue(self): """ Sets the size of each `values` item. The default is one day in milliseconds. The 'dvalue' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["dvalue"]
Sets the size of each `values` item. The default is one day in milliseconds. The 'dvalue' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
dvalue
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def enabled(self): """ Determines whether this axis rangebreak is enabled or disabled. Please note that `rangebreaks` only work for "date" axis type. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["enabled"]
Determines whether this axis rangebreak is enabled or disabled. Please note that `rangebreaks` only work for "date" axis type. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool
enabled
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def name(self): """ 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
name
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def pattern(self): """ Determines a pattern on the time line that generates breaks. If *day of week* - days of the week in English e.g. 'Sunday' or `sun` (matching is case-insensitive and considers only the first three characters), as well as Sunday-based integers between 0 and 6. If "hour" - hour (24-hour clock) as decimal numbers between 0 and 24. for more info. Examples: - { pattern: 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', 'mon'] } breaks from Saturday to Monday (i.e. skips the weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from 5pm to 8am (i.e. skips non-work hours). The 'pattern' property is an enumeration that may be specified as: - One of the following enumeration values: ['day of week', 'hour', ''] Returns ------- Any """ return self["pattern"]
Determines a pattern on the time line that generates breaks. If *day of week* - days of the week in English e.g. 'Sunday' or `sun` (matching is case-insensitive and considers only the first three characters), as well as Sunday-based integers between 0 and 6. If "hour" - hour (24-hour clock) as decimal numbers between 0 and 24. for more info. Examples: - { pattern: 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', 'mon'] } breaks from Saturday to Monday (i.e. skips the weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from 5pm to 8am (i.e. skips non-work hours). The 'pattern' property is an enumeration that may be specified as: - One of the following enumeration values: ['day of week', 'hour', ''] Returns ------- Any
pattern
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def templateitemname(self): """ 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
templateitemname
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def values(self): """ Sets the coordinate values corresponding to the rangebreaks. An alternative to `bounds`. Use `dvalue` to set the size of the values along the axis. The 'values' property is an info array that may be specified as: * a list of elements where: The 'values[i]' property accepts values of any type Returns ------- list """ return self["values"]
Sets the coordinate values corresponding to the rangebreaks. An alternative to `bounds`. Use `dvalue` to set the size of the values along the axis. The 'values' property is an info array that may be specified as: * a list of elements where: The 'values[i]' property accepts values of any type Returns ------- list
values
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def __init__( self, arg=None, bounds=None, dvalue=None, enabled=None, name=None, pattern=None, templateitemname=None, values=None, **kwargs, ): """ Construct a new Rangebreak object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak` bounds Sets the lower and upper bounds of this axis rangebreak. Can be used with `pattern`. dvalue Sets the size of each `values` item. The default is one day in milliseconds. enabled Determines whether this axis rangebreak is enabled or disabled. Please note that `rangebreaks` only work for "date" axis type. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. pattern Determines a pattern on the time line that generates breaks. If *day of week* - days of the week in English e.g. 'Sunday' or `sun` (matching is case-insensitive and considers only the first three characters), as well as Sunday-based integers between 0 and 6. If "hour" - hour (24-hour clock) as decimal numbers between 0 and 24. for more info. Examples: - { pattern: 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', 'mon'] } breaks from Saturday to Monday (i.e. skips the weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from 5pm to 8am (i.e. skips non-work hours). 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. values Sets the coordinate values corresponding to the rangebreaks. An alternative to `bounds`. Use `dvalue` to set the size of the values along the axis. Returns ------- Rangebreak """ super(Rangebreak, self).__init__("rangebreaks") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.layout.xaxis.Rangebreak constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("bounds", None) _v = bounds if bounds is not None else _v if _v is not None: self["bounds"] = _v _v = arg.pop("dvalue", None) _v = dvalue if dvalue is not None else _v if _v is not None: self["dvalue"] = _v _v = arg.pop("enabled", None) _v = enabled if enabled is not None else _v if _v is not None: self["enabled"] = _v _v = arg.pop("name", None) _v = name if name is not None else _v if _v is not None: self["name"] = _v _v = arg.pop("pattern", None) _v = pattern if pattern is not None else _v if _v is not None: self["pattern"] = _v _v = arg.pop("templateitemname", None) _v = templateitemname if templateitemname is not None else _v if _v is not None: self["templateitemname"] = _v _v = arg.pop("values", None) _v = values if values is not None else _v if _v is not None: self["values"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Rangebreak object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak` bounds Sets the lower and upper bounds of this axis rangebreak. Can be used with `pattern`. dvalue Sets the size of each `values` item. The default is one day in milliseconds. enabled Determines whether this axis rangebreak is enabled or disabled. Please note that `rangebreaks` only work for "date" axis type. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. pattern Determines a pattern on the time line that generates breaks. If *day of week* - days of the week in English e.g. 'Sunday' or `sun` (matching is case-insensitive and considers only the first three characters), as well as Sunday-based integers between 0 and 6. If "hour" - hour (24-hour clock) as decimal numbers between 0 and 24. for more info. Examples: - { pattern: 'day of week', bounds: [6, 1] } or simply { bounds: ['sat', 'mon'] } breaks from Saturday to Monday (i.e. skips the weekends). - { pattern: 'hour', bounds: [17, 8] } breaks from 5pm to 8am (i.e. skips non-work hours). 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. values Sets the coordinate values corresponding to the rangebreaks. An alternative to `bounds`. Use `dvalue` to set the size of the values along the axis. Returns ------- Rangebreak
__init__
python
plotly/plotly.py
plotly/graph_objs/layout/xaxis/_rangebreak.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/xaxis/_rangebreak.py
MIT
def active(self): """ Determines which button (by index starting from 0) is considered active. The 'active' 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 ------- int """ return self["active"]
Determines which button (by index starting from 0) is considered active. The 'active' 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 ------- int
active
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def bgcolor(self): """ Sets the background color of the update menu buttons. The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["bgcolor"]
Sets the background color of the update menu buttons. The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
bgcolor
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def bordercolor(self): """ Sets the color of the border enclosing the update menu. The 'bordercolor' 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["bordercolor"]
Sets the color of the border enclosing the update menu. The 'bordercolor' 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
bordercolor
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def borderwidth(self): """ Sets the width (in px) of the border enclosing the update menu. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["borderwidth"]
Sets the width (in px) of the border enclosing the update menu. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
borderwidth
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def buttons(self): """ The 'buttons' property is a tuple of instances of Button that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.updatemenu.Button - A list or tuple of dicts of string/value properties that will be passed to the Button constructor Supported dict properties: args Sets the arguments values to be passed to the Plotly method set in `method` on click. args2 Sets a 2nd set of `args`, these arguments values are passed to the Plotly method set in `method` when clicking this button while in the active state. Use this to create toggle buttons. execute When true, the API method is executed. When false, all other behaviors are the same and command execution is skipped. This may be useful when hooking into, for example, the `plotly_buttonclicked` method and executing the API command manually without losing the benefit of the updatemenu automatically binding to the state of the plot through the specification of `method` and `args`. label Sets the text label to appear on the button. method Sets the Plotly method to be called on click. If the `skip` method is used, the API updatemenu will function as normal but will perform no API calls and will not bind automatically to state updates. This may be used to create a component interface and attach to updatemenu events manually via JavaScript. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. visible Determines whether or not this button is visible. Returns ------- tuple[plotly.graph_objs.layout.updatemenu.Button] """ return self["buttons"]
The 'buttons' property is a tuple of instances of Button that may be specified as: - A list or tuple of instances of plotly.graph_objs.layout.updatemenu.Button - A list or tuple of dicts of string/value properties that will be passed to the Button constructor Supported dict properties: args Sets the arguments values to be passed to the Plotly method set in `method` on click. args2 Sets a 2nd set of `args`, these arguments values are passed to the Plotly method set in `method` when clicking this button while in the active state. Use this to create toggle buttons. execute When true, the API method is executed. When false, all other behaviors are the same and command execution is skipped. This may be useful when hooking into, for example, the `plotly_buttonclicked` method and executing the API command manually without losing the benefit of the updatemenu automatically binding to the state of the plot through the specification of `method` and `args`. label Sets the text label to appear on the button. method Sets the Plotly method to be called on click. If the `skip` method is used, the API updatemenu will function as normal but will perform no API calls and will not bind automatically to state updates. This may be used to create a component interface and attach to updatemenu events manually via JavaScript. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. visible Determines whether or not this button is visible. Returns ------- tuple[plotly.graph_objs.layout.updatemenu.Button]
buttons
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def buttondefaults(self): """ When used in a template (as layout.template.layout.updatemenu.buttondefaults), sets the default property values to use for elements of layout.updatemenu.buttons The 'buttondefaults' property is an instance of Button that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Button` - A dict of string/value properties that will be passed to the Button constructor Supported dict properties: Returns ------- plotly.graph_objs.layout.updatemenu.Button """ return self["buttondefaults"]
When used in a template (as layout.template.layout.updatemenu.buttondefaults), sets the default property values to use for elements of layout.updatemenu.buttons The 'buttondefaults' property is an instance of Button that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Button` - A dict of string/value properties that will be passed to the Button constructor Supported dict properties: Returns ------- plotly.graph_objs.layout.updatemenu.Button
buttondefaults
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def direction(self): """ Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons. For `left` and `up`, the buttons will still appear in left-to-right or top-to-bottom order respectively. The 'direction' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'right', 'up', 'down'] Returns ------- Any """ return self["direction"]
Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons. For `left` and `up`, the buttons will still appear in left-to-right or top-to-bottom order respectively. The 'direction' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'right', 'up', 'down'] Returns ------- Any
direction
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def font(self): """ Sets the font of the update menu button text. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- plotly.graph_objs.layout.updatemenu.Font """ return self["font"]
Sets the font of the update menu button text. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all- lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- plotly.graph_objs.layout.updatemenu.Font
font
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def name(self): """ 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
name
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def pad(self): """ Sets the padding around the buttons or dropdown menu. The 'pad' property is an instance of Pad that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Pad` - A dict of string/value properties that will be passed to the Pad constructor Supported dict properties: b The amount of padding (in px) along the bottom of the component. l The amount of padding (in px) on the left side of the component. r The amount of padding (in px) on the right side of the component. t The amount of padding (in px) along the top of the component. Returns ------- plotly.graph_objs.layout.updatemenu.Pad """ return self["pad"]
Sets the padding around the buttons or dropdown menu. The 'pad' property is an instance of Pad that may be specified as: - An instance of :class:`plotly.graph_objs.layout.updatemenu.Pad` - A dict of string/value properties that will be passed to the Pad constructor Supported dict properties: b The amount of padding (in px) along the bottom of the component. l The amount of padding (in px) on the left side of the component. r The amount of padding (in px) on the right side of the component. t The amount of padding (in px) along the top of the component. Returns ------- plotly.graph_objs.layout.updatemenu.Pad
pad
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def showactive(self): """ Highlights active dropdown item or active button if true. The 'showactive' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["showactive"]
Highlights active dropdown item or active button if true. The 'showactive' property must be specified as a bool (either True, or False) Returns ------- bool
showactive
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def templateitemname(self): """ 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
templateitemname
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def type(self): """ Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically The 'type' property is an enumeration that may be specified as: - One of the following enumeration values: ['dropdown', 'buttons'] Returns ------- Any """ return self["type"]
Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically The 'type' property is an enumeration that may be specified as: - One of the following enumeration values: ['dropdown', 'buttons'] Returns ------- Any
type
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def visible(self): """ Determines whether or not the update menu is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
Determines whether or not the update menu is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
visible
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def x(self): """ Sets the x position (in normalized coordinates) of the update menu. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["x"]
Sets the x position (in normalized coordinates) of the update menu. The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
x
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def xanchor(self): """ Sets the update menu's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'left', 'center', 'right'] Returns ------- Any """ return self["xanchor"]
Sets the update menu's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'left', 'center', 'right'] Returns ------- Any
xanchor
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def y(self): """ Sets the y position (in normalized coordinates) of the update menu. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["y"]
Sets the y position (in normalized coordinates) of the update menu. The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
y
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def yanchor(self): """ Sets the update menu's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'top', 'middle', 'bottom'] Returns ------- Any """ return self["yanchor"]
Sets the update menu's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'top', 'middle', 'bottom'] Returns ------- Any
yanchor
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def __init__( self, arg=None, active=None, bgcolor=None, bordercolor=None, borderwidth=None, buttons=None, buttondefaults=None, direction=None, font=None, name=None, pad=None, showactive=None, templateitemname=None, type=None, visible=None, x=None, xanchor=None, y=None, yanchor=None, **kwargs, ): """ Construct a new Updatemenu object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Updatemenu` active Determines which button (by index starting from 0) is considered active. bgcolor Sets the background color of the update menu buttons. bordercolor Sets the color of the border enclosing the update menu. borderwidth Sets the width (in px) of the border enclosing the update menu. buttons A tuple of :class:`plotly.graph_objects.layout.updatemenu.Button` instances or dicts with compatible properties buttondefaults When used in a template (as layout.template.layout.updatemenu.buttondefaults), sets the default property values to use for elements of layout.updatemenu.buttons direction Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons. For `left` and `up`, the buttons will still appear in left-to-right or top-to-bottom order respectively. font Sets the font of the update menu button text. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. pad Sets the padding around the buttons or dropdown menu. showactive Highlights active dropdown item or active button if true. 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. type Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically visible Determines whether or not the update menu is visible. x Sets the x position (in normalized coordinates) of the update menu. xanchor Sets the update menu's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. y Sets the y position (in normalized coordinates) of the update menu. yanchor Sets the update menu's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. Returns ------- Updatemenu """ super(Updatemenu, self).__init__("updatemenus") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.layout.Updatemenu constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.Updatemenu`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("active", None) _v = active if active is not None else _v if _v is not None: self["active"] = _v _v = arg.pop("bgcolor", None) _v = bgcolor if bgcolor is not None else _v if _v is not None: self["bgcolor"] = _v _v = arg.pop("bordercolor", None) _v = bordercolor if bordercolor is not None else _v if _v is not None: self["bordercolor"] = _v _v = arg.pop("borderwidth", None) _v = borderwidth if borderwidth is not None else _v if _v is not None: self["borderwidth"] = _v _v = arg.pop("buttons", None) _v = buttons if buttons is not None else _v if _v is not None: self["buttons"] = _v _v = arg.pop("buttondefaults", None) _v = buttondefaults if buttondefaults is not None else _v if _v is not None: self["buttondefaults"] = _v _v = arg.pop("direction", None) _v = direction if direction is not None else _v if _v is not None: self["direction"] = _v _v = arg.pop("font", None) _v = font if font is not None else _v if _v is not None: self["font"] = _v _v = arg.pop("name", None) _v = name if name is not None else _v if _v is not None: self["name"] = _v _v = arg.pop("pad", None) _v = pad if pad is not None else _v if _v is not None: self["pad"] = _v _v = arg.pop("showactive", None) _v = showactive if showactive is not None else _v if _v is not None: self["showactive"] = _v _v = arg.pop("templateitemname", None) _v = templateitemname if templateitemname is not None else _v if _v is not None: self["templateitemname"] = _v _v = arg.pop("type", None) _v = type if type is not None else _v if _v is not None: self["type"] = _v _v = arg.pop("visible", None) _v = visible if visible is not None else _v if _v is not None: self["visible"] = _v _v = arg.pop("x", None) _v = x if x is not None else _v if _v is not None: self["x"] = _v _v = arg.pop("xanchor", None) _v = xanchor if xanchor is not None else _v if _v is not None: self["xanchor"] = _v _v = arg.pop("y", None) _v = y if y is not None else _v if _v is not None: self["y"] = _v _v = arg.pop("yanchor", None) _v = yanchor if yanchor is not None else _v if _v is not None: self["yanchor"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Updatemenu object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Updatemenu` active Determines which button (by index starting from 0) is considered active. bgcolor Sets the background color of the update menu buttons. bordercolor Sets the color of the border enclosing the update menu. borderwidth Sets the width (in px) of the border enclosing the update menu. buttons A tuple of :class:`plotly.graph_objects.layout.updatemenu.Button` instances or dicts with compatible properties buttondefaults When used in a template (as layout.template.layout.updatemenu.buttondefaults), sets the default property values to use for elements of layout.updatemenu.buttons direction Determines the direction in which the buttons are laid out, whether in a dropdown menu or a row/column of buttons. For `left` and `up`, the buttons will still appear in left-to-right or top-to-bottom order respectively. font Sets the font of the update menu button text. 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. pad Sets the padding around the buttons or dropdown menu. showactive Highlights active dropdown item or active button if true. 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. type Determines whether the buttons are accessible via a dropdown menu or whether the buttons are stacked horizontally or vertically visible Determines whether or not the update menu is visible. x Sets the x position (in normalized coordinates) of the update menu. xanchor Sets the update menu's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the range selector. y Sets the y position (in normalized coordinates) of the update menu. yanchor Sets the update menu's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the range selector. Returns ------- Updatemenu
__init__
python
plotly/plotly.py
plotly/graph_objs/layout/_updatemenu.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/layout/_updatemenu.py
MIT
def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.histogram.selected.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: color Sets the marker color of selected points. opacity Sets the marker opacity of selected points. Returns ------- plotly.graph_objs.histogram.selected.Marker """ return self["marker"]
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.histogram.selected.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties: color Sets the marker color of selected points. opacity Sets the marker opacity of selected points. Returns ------- plotly.graph_objs.histogram.selected.Marker
marker
python
plotly/plotly.py
plotly/graph_objs/histogram/_selected.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/histogram/_selected.py
MIT
def textfont(self): """ The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.histogram.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict properties: color Sets the text font color of selected points. Returns ------- plotly.graph_objs.histogram.selected.Textfont """ return self["textfont"]
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.histogram.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict properties: color Sets the text font color of selected points. Returns ------- plotly.graph_objs.histogram.selected.Textfont
textfont
python
plotly/plotly.py
plotly/graph_objs/histogram/_selected.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/histogram/_selected.py
MIT
def __init__(self, arg=None, marker=None, textfont=None, **kwargs): """ Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.histogram.Selected` marker :class:`plotly.graph_objects.histogram.selected.Marker` instance or dict with compatible properties textfont :class:`plotly.graph_objects.histogram.selected.Textfon t` instance or dict with compatible properties Returns ------- Selected """ super(Selected, self).__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.histogram.Selected constructor must be a dict or an instance of :class:`plotly.graph_objs.histogram.Selected`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("marker", None) _v = marker if marker is not None else _v if _v is not None: self["marker"] = _v _v = arg.pop("textfont", None) _v = textfont if textfont is not None else _v if _v is not None: self["textfont"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.histogram.Selected` marker :class:`plotly.graph_objects.histogram.selected.Marker` instance or dict with compatible properties textfont :class:`plotly.graph_objects.histogram.selected.Textfon t` instance or dict with compatible properties Returns ------- Selected
__init__
python
plotly/plotly.py
plotly/graph_objs/histogram/_selected.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/histogram/_selected.py
MIT
def color(self): """ 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["color"]
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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
color
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string Returns ------- str """ return self["family"]
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string Returns ------- str
family
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def lineposition(self): """ Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. The 'lineposition' property is a flaglist and may be specified as a string containing: - Any combination of ['under', 'over', 'through'] joined with '+' characters (e.g. 'under+over') OR exactly one of ['none'] (e.g. 'none') Returns ------- Any """ return self["lineposition"]
Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. The 'lineposition' property is a flaglist and may be specified as a string containing: - Any combination of ['under', 'over', 'through'] joined with '+' characters (e.g. 'under+over') OR exactly one of ['none'] (e.g. 'none') Returns ------- Any
lineposition
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def shadow(self): """ Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options. The 'shadow' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["shadow"]
Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options. The 'shadow' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
shadow
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
size
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def style(self): """ Sets whether a font should be styled with a normal or italic face from its family. The 'style' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'italic'] Returns ------- Any """ return self["style"]
Sets whether a font should be styled with a normal or italic face from its family. The 'style' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'italic'] Returns ------- Any
style
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def textcase(self): """ Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. The 'textcase' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'word caps', 'upper', 'lower'] Returns ------- Any """ return self["textcase"]
Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. The 'textcase' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'word caps', 'upper', 'lower'] Returns ------- Any
textcase
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def variant(self): """ Sets the variant of the font. The 'variant' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'small-caps', 'all-small-caps', 'all-petite-caps', 'petite-caps', 'unicase'] Returns ------- Any """ return self["variant"]
Sets the variant of the font. The 'variant' property is an enumeration that may be specified as: - One of the following enumeration values: ['normal', 'small-caps', 'all-small-caps', 'all-petite-caps', 'petite-caps', 'unicase'] Returns ------- Any
variant
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def weight(self): """ Sets the weight (or boldness) of the font. The 'weight' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') Returns ------- int """ return self["weight"]
Sets the weight (or boldness) of the font. The 'weight' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') Returns ------- int
weight
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def __init__( self, arg=None, color=None, family=None, lineposition=None, shadow=None, size=None, style=None, textcase=None, variant=None, weight=None, **kwargs, ): """ Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont` color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- Tickfont """ super(Tickfont, self).__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.surface.colorbar.Tickfont constructor must be a dict or an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("color", None) _v = color if color is not None else _v if _v is not None: self["color"] = _v _v = arg.pop("family", None) _v = family if family is not None else _v if _v is not None: self["family"] = _v _v = arg.pop("lineposition", None) _v = lineposition if lineposition is not None else _v if _v is not None: self["lineposition"] = _v _v = arg.pop("shadow", None) _v = shadow if shadow is not None else _v if _v is not None: self["shadow"] = _v _v = arg.pop("size", None) _v = size if size is not None else _v if _v is not None: self["size"] = _v _v = arg.pop("style", None) _v = style if style is not None else _v if _v is not None: self["style"] = _v _v = arg.pop("textcase", None) _v = textcase if textcase is not None else _v if _v is not None: self["textcase"] = _v _v = arg.pop("variant", None) _v = variant if variant is not None else _v if _v is not None: self["variant"] = _v _v = arg.pop("weight", None) _v = weight if weight is not None else _v if _v is not None: self["weight"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont` color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations e.g. "under+over", etc. shadow Sets the shape and color of the shadow behind text. "auto" places minimal shadow and applies contrast text font color. See https://developer.mozilla.org/en- US/docs/Web/CSS/text-shadow for additional options. size style Sets whether a font should be styled with a normal or italic face from its family. textcase Sets capitalization of text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. variant Sets the variant of the font. weight Sets the weight (or boldness) of the font. Returns ------- Tickfont
__init__
python
plotly/plotly.py
plotly/graph_objs/surface/colorbar/_tickfont.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/surface/colorbar/_tickfont.py
MIT
def bgcolor(self): """ When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is "overlay". Otherwise, defaults to a transparent background. The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray """ return self["bgcolor"]
When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is "overlay". Otherwise, defaults to a transparent background. The '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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray
bgcolor
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def bgcolorsrc(self): """ Sets the source reference on Chart Studio Cloud for `bgcolor`. The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bgcolorsrc"]
Sets the source reference on Chart Studio Cloud for `bgcolor`. The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
bgcolorsrc
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def fgcolor(self): """ When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is "replace". Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`. The 'fgcolor' 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray """ return self["fgcolor"]
When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is "replace". Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`. The 'fgcolor' 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: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray
fgcolor
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def fgcolorsrc(self): """ Sets the source reference on Chart Studio Cloud for `fgcolor`. The 'fgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["fgcolorsrc"]
Sets the source reference on Chart Studio Cloud for `fgcolor`. The 'fgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
fgcolorsrc
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def fgopacity(self): """ Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. The 'fgopacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ return self["fgopacity"]
Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. The 'fgopacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float
fgopacity
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def fillmode(self): """ Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`. The 'fillmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['replace', 'overlay'] Returns ------- Any """ return self["fillmode"]
Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`. The 'fillmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['replace', 'overlay'] Returns ------- Any
fillmode
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def shape(self): """ Sets the shape of the pattern fill. By default, no pattern is used for filling the area. The 'shape' property is an enumeration that may be specified as: - One of the following enumeration values: ['', '/', '\\', 'x', '-', '|', '+', '.'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ return self["shape"]
Sets the shape of the pattern fill. By default, no pattern is used for filling the area. The 'shape' property is an enumeration that may be specified as: - One of the following enumeration values: ['', '/', '\\', 'x', '-', '|', '+', '.'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray
shape
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def shapesrc(self): """ Sets the source reference on Chart Studio Cloud for `shape`. The 'shapesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["shapesrc"]
Sets the source reference on Chart Studio Cloud for `shape`. The 'shapesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
shapesrc
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def size(self): """ Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern. The 'size' 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 ------- int|float|numpy.ndarray """ return self["size"]
Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern. The 'size' 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 ------- int|float|numpy.ndarray
size
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def sizesrc(self): """ Sets the source reference on Chart Studio Cloud for `size`. The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["sizesrc"]
Sets the source reference on Chart Studio Cloud for `size`. The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
sizesrc
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def solidity(self): """ Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern. The 'solidity' 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 ------- int|float|numpy.ndarray """ return self["solidity"]
Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern. The 'solidity' 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 ------- int|float|numpy.ndarray
solidity
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def soliditysrc(self): """ Sets the source reference on Chart Studio Cloud for `solidity`. The 'soliditysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["soliditysrc"]
Sets the source reference on Chart Studio Cloud for `solidity`. The 'soliditysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
soliditysrc
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def __init__( self, arg=None, bgcolor=None, bgcolorsrc=None, fgcolor=None, fgcolorsrc=None, fgopacity=None, fillmode=None, shape=None, shapesrc=None, size=None, sizesrc=None, solidity=None, soliditysrc=None, **kwargs, ): """ Construct a new Pattern object Sets the pattern within the marker. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.funnelarea.marker.Pattern` bgcolor When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is "overlay". Otherwise, defaults to a transparent background. bgcolorsrc Sets the source reference on Chart Studio Cloud for `bgcolor`. fgcolor When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is "replace". Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`. fgcolorsrc Sets the source reference on Chart Studio Cloud for `fgcolor`. fgopacity Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. fillmode Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`. shape Sets the shape of the pattern fill. By default, no pattern is used for filling the area. shapesrc Sets the source reference on Chart Studio Cloud for `shape`. size Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern. sizesrc Sets the source reference on Chart Studio Cloud for `size`. solidity Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern. soliditysrc Sets the source reference on Chart Studio Cloud for `solidity`. Returns ------- Pattern """ super(Pattern, self).__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.funnelarea.marker.Pattern constructor must be a dict or an instance of :class:`plotly.graph_objs.funnelarea.marker.Pattern`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("bgcolor", None) _v = bgcolor if bgcolor is not None else _v if _v is not None: self["bgcolor"] = _v _v = arg.pop("bgcolorsrc", None) _v = bgcolorsrc if bgcolorsrc is not None else _v if _v is not None: self["bgcolorsrc"] = _v _v = arg.pop("fgcolor", None) _v = fgcolor if fgcolor is not None else _v if _v is not None: self["fgcolor"] = _v _v = arg.pop("fgcolorsrc", None) _v = fgcolorsrc if fgcolorsrc is not None else _v if _v is not None: self["fgcolorsrc"] = _v _v = arg.pop("fgopacity", None) _v = fgopacity if fgopacity is not None else _v if _v is not None: self["fgopacity"] = _v _v = arg.pop("fillmode", None) _v = fillmode if fillmode is not None else _v if _v is not None: self["fillmode"] = _v _v = arg.pop("shape", None) _v = shape if shape is not None else _v if _v is not None: self["shape"] = _v _v = arg.pop("shapesrc", None) _v = shapesrc if shapesrc is not None else _v if _v is not None: self["shapesrc"] = _v _v = arg.pop("size", None) _v = size if size is not None else _v if _v is not None: self["size"] = _v _v = arg.pop("sizesrc", None) _v = sizesrc if sizesrc is not None else _v if _v is not None: self["sizesrc"] = _v _v = arg.pop("solidity", None) _v = solidity if solidity is not None else _v if _v is not None: self["solidity"] = _v _v = arg.pop("soliditysrc", None) _v = soliditysrc if soliditysrc is not None else _v if _v is not None: self["soliditysrc"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
Construct a new Pattern object Sets the pattern within the marker. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.funnelarea.marker.Pattern` bgcolor When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is "overlay". Otherwise, defaults to a transparent background. bgcolorsrc Sets the source reference on Chart Studio Cloud for `bgcolor`. fgcolor When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is "replace". Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`. fgcolorsrc Sets the source reference on Chart Studio Cloud for `fgcolor`. fgopacity Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. fillmode Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`. shape Sets the shape of the pattern fill. By default, no pattern is used for filling the area. shapesrc Sets the source reference on Chart Studio Cloud for `shape`. size Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern. sizesrc Sets the source reference on Chart Studio Cloud for `size`. solidity Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern. soliditysrc Sets the source reference on Chart Studio Cloud for `solidity`. Returns ------- Pattern
__init__
python
plotly/plotly.py
plotly/graph_objs/funnelarea/marker/_pattern.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnelarea/marker/_pattern.py
MIT
def dtickrange(self): """ range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'dtickrange[0]' property accepts values of any type (1) The 'dtickrange[1]' property accepts values of any type Returns ------- list """ return self["dtickrange"]
range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'dtickrange[0]' property accepts values of any type (1) The 'dtickrange[1]' property accepts values of any type Returns ------- list
dtickrange
python
plotly/plotly.py
plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
MIT
def enabled(self): """ Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["enabled"]
Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool
enabled
python
plotly/plotly.py
plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
MIT
def name(self): """ 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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
name
python
plotly/plotly.py
plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
MIT
def templateitemname(self): """ 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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["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 `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
templateitemname
python
plotly/plotly.py
plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
MIT
def value(self): """ string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["value"]
string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
value
python
plotly/plotly.py
plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
https://github.com/plotly/plotly.py/blob/master/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py
MIT