done
This commit is contained in:
@ -0,0 +1,120 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._activeselection import Activeselection
|
||||
from ._activeshape import Activeshape
|
||||
from ._annotation import Annotation
|
||||
from ._coloraxis import Coloraxis
|
||||
from ._colorscale import Colorscale
|
||||
from ._font import Font
|
||||
from ._geo import Geo
|
||||
from ._grid import Grid
|
||||
from ._hoverlabel import Hoverlabel
|
||||
from ._image import Image
|
||||
from ._legend import Legend
|
||||
from ._map import Map
|
||||
from ._mapbox import Mapbox
|
||||
from ._margin import Margin
|
||||
from ._modebar import Modebar
|
||||
from ._newselection import Newselection
|
||||
from ._newshape import Newshape
|
||||
from ._polar import Polar
|
||||
from ._scene import Scene
|
||||
from ._selection import Selection
|
||||
from ._shape import Shape
|
||||
from ._slider import Slider
|
||||
from ._smith import Smith
|
||||
from ._template import Template
|
||||
from ._ternary import Ternary
|
||||
from ._title import Title
|
||||
from ._transition import Transition
|
||||
from ._uniformtext import Uniformtext
|
||||
from ._updatemenu import Updatemenu
|
||||
from ._xaxis import XAxis
|
||||
from ._yaxis import YAxis
|
||||
from . import annotation
|
||||
from . import coloraxis
|
||||
from . import geo
|
||||
from . import grid
|
||||
from . import hoverlabel
|
||||
from . import legend
|
||||
from . import map
|
||||
from . import mapbox
|
||||
from . import newselection
|
||||
from . import newshape
|
||||
from . import polar
|
||||
from . import scene
|
||||
from . import selection
|
||||
from . import shape
|
||||
from . import slider
|
||||
from . import smith
|
||||
from . import template
|
||||
from . import ternary
|
||||
from . import title
|
||||
from . import updatemenu
|
||||
from . import xaxis
|
||||
from . import yaxis
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[
|
||||
".annotation",
|
||||
".coloraxis",
|
||||
".geo",
|
||||
".grid",
|
||||
".hoverlabel",
|
||||
".legend",
|
||||
".map",
|
||||
".mapbox",
|
||||
".newselection",
|
||||
".newshape",
|
||||
".polar",
|
||||
".scene",
|
||||
".selection",
|
||||
".shape",
|
||||
".slider",
|
||||
".smith",
|
||||
".template",
|
||||
".ternary",
|
||||
".title",
|
||||
".updatemenu",
|
||||
".xaxis",
|
||||
".yaxis",
|
||||
],
|
||||
[
|
||||
"._activeselection.Activeselection",
|
||||
"._activeshape.Activeshape",
|
||||
"._annotation.Annotation",
|
||||
"._coloraxis.Coloraxis",
|
||||
"._colorscale.Colorscale",
|
||||
"._font.Font",
|
||||
"._geo.Geo",
|
||||
"._grid.Grid",
|
||||
"._hoverlabel.Hoverlabel",
|
||||
"._image.Image",
|
||||
"._legend.Legend",
|
||||
"._map.Map",
|
||||
"._mapbox.Mapbox",
|
||||
"._margin.Margin",
|
||||
"._modebar.Modebar",
|
||||
"._newselection.Newselection",
|
||||
"._newshape.Newshape",
|
||||
"._polar.Polar",
|
||||
"._scene.Scene",
|
||||
"._selection.Selection",
|
||||
"._shape.Shape",
|
||||
"._slider.Slider",
|
||||
"._smith.Smith",
|
||||
"._template.Template",
|
||||
"._ternary.Ternary",
|
||||
"._title.Title",
|
||||
"._transition.Transition",
|
||||
"._uniformtext.Uniformtext",
|
||||
"._updatemenu.Updatemenu",
|
||||
"._xaxis.XAxis",
|
||||
"._yaxis.YAxis",
|
||||
],
|
||||
)
|
||||
@ -0,0 +1,104 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Activeselection(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.activeselection"
|
||||
_valid_props = {"fillcolor", "opacity"}
|
||||
|
||||
@property
|
||||
def fillcolor(self):
|
||||
"""
|
||||
Sets the color filling the active selection' interior.
|
||||
|
||||
The 'fillcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["fillcolor"]
|
||||
|
||||
@fillcolor.setter
|
||||
def fillcolor(self, val):
|
||||
self["fillcolor"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the active selection.
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
fillcolor
|
||||
Sets the color filling the active selection' interior.
|
||||
opacity
|
||||
Sets the opacity of the active selection.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs):
|
||||
"""
|
||||
Construct a new Activeselection object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Activeselection`
|
||||
fillcolor
|
||||
Sets the color filling the active selection' interior.
|
||||
opacity
|
||||
Sets the opacity of the active selection.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Activeselection
|
||||
"""
|
||||
super().__init__("activeselection")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Activeselection
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Activeselection`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("fillcolor", arg, fillcolor)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,104 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Activeshape(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.activeshape"
|
||||
_valid_props = {"fillcolor", "opacity"}
|
||||
|
||||
@property
|
||||
def fillcolor(self):
|
||||
"""
|
||||
Sets the color filling the active shape' interior.
|
||||
|
||||
The 'fillcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["fillcolor"]
|
||||
|
||||
@fillcolor.setter
|
||||
def fillcolor(self, val):
|
||||
self["fillcolor"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the active shape.
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
fillcolor
|
||||
Sets the color filling the active shape' interior.
|
||||
opacity
|
||||
Sets the opacity of the active shape.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs):
|
||||
"""
|
||||
Construct a new Activeshape object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Activeshape`
|
||||
fillcolor
|
||||
Sets the color filling the active shape' interior.
|
||||
opacity
|
||||
Sets the opacity of the active shape.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Activeshape
|
||||
"""
|
||||
super().__init__("activeshape")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Activeshape
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Activeshape`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("fillcolor", arg, fillcolor)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
1717
lib/python3.11/site-packages/plotly/graph_objs/layout/_annotation.py
Normal file
1717
lib/python3.11/site-packages/plotly/graph_objs/layout/_annotation.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,396 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Coloraxis(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.coloraxis"
|
||||
_valid_props = {
|
||||
"autocolorscale",
|
||||
"cauto",
|
||||
"cmax",
|
||||
"cmid",
|
||||
"cmin",
|
||||
"colorbar",
|
||||
"colorscale",
|
||||
"reversescale",
|
||||
"showscale",
|
||||
}
|
||||
|
||||
@property
|
||||
def autocolorscale(self):
|
||||
"""
|
||||
Determines whether the colorscale is a default palette
|
||||
(`autocolorscale: true`) or the palette determined by
|
||||
`colorscale`. In case `colorscale` is unspecified or
|
||||
`autocolorscale` is true, the default palette will be chosen
|
||||
according to whether numbers in the `color` array are all
|
||||
positive, all negative or mixed.
|
||||
|
||||
The 'autocolorscale' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["autocolorscale"]
|
||||
|
||||
@autocolorscale.setter
|
||||
def autocolorscale(self, val):
|
||||
self["autocolorscale"] = val
|
||||
|
||||
@property
|
||||
def cauto(self):
|
||||
"""
|
||||
Determines whether or not the color domain is computed with
|
||||
respect to the input data (here corresponding trace color
|
||||
array(s)) or the bounds set in `cmin` and `cmax` Defaults to
|
||||
`false` when `cmin` and `cmax` are set by the user.
|
||||
|
||||
The 'cauto' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["cauto"]
|
||||
|
||||
@cauto.setter
|
||||
def cauto(self, val):
|
||||
self["cauto"] = val
|
||||
|
||||
@property
|
||||
def cmax(self):
|
||||
"""
|
||||
Sets the upper bound of the color domain. Value should have the
|
||||
same units as corresponding trace color array(s) and if set,
|
||||
`cmin` must be set as well.
|
||||
|
||||
The 'cmax' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["cmax"]
|
||||
|
||||
@cmax.setter
|
||||
def cmax(self, val):
|
||||
self["cmax"] = val
|
||||
|
||||
@property
|
||||
def cmid(self):
|
||||
"""
|
||||
Sets the mid-point of the color domain by scaling `cmin` and/or
|
||||
`cmax` to be equidistant to this point. Value should have the
|
||||
same units as corresponding trace color array(s). Has no effect
|
||||
when `cauto` is `false`.
|
||||
|
||||
The 'cmid' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["cmid"]
|
||||
|
||||
@cmid.setter
|
||||
def cmid(self, val):
|
||||
self["cmid"] = val
|
||||
|
||||
@property
|
||||
def cmin(self):
|
||||
"""
|
||||
Sets the lower bound of the color domain. Value should have the
|
||||
same units as corresponding trace color array(s) and if set,
|
||||
`cmax` must be set as well.
|
||||
|
||||
The 'cmin' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["cmin"]
|
||||
|
||||
@cmin.setter
|
||||
def cmin(self, val):
|
||||
self["cmin"] = val
|
||||
|
||||
@property
|
||||
def colorbar(self):
|
||||
"""
|
||||
The 'colorbar' property is an instance of ColorBar
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the ColorBar constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.coloraxis.ColorBar
|
||||
"""
|
||||
return self["colorbar"]
|
||||
|
||||
@colorbar.setter
|
||||
def colorbar(self, val):
|
||||
self["colorbar"] = val
|
||||
|
||||
@property
|
||||
def colorscale(self):
|
||||
"""
|
||||
Sets the colorscale. The colorscale must be an array containing
|
||||
arrays mapping a normalized value to an rgb, rgba, hex, hsl,
|
||||
hsv, or named color string. At minimum, a mapping for the
|
||||
lowest (0) and highest (1) values are required. For example,
|
||||
`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the
|
||||
bounds of the colorscale in color space, use `cmin` and `cmax`.
|
||||
Alternatively, `colorscale` may be a palette name string of the
|
||||
following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,
|
||||
Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,
|
||||
YlGnBu,YlOrRd.
|
||||
|
||||
The 'colorscale' property is a colorscale and may be
|
||||
specified as:
|
||||
- A list of colors that will be spaced evenly to create the colorscale.
|
||||
Many predefined colorscale lists are included in the sequential, diverging,
|
||||
and cyclical modules in the plotly.colors package.
|
||||
- A list of 2-element lists where the first element is the
|
||||
normalized color level value (starting at 0 and ending at 1),
|
||||
and the second item is a valid color string.
|
||||
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
|
||||
- One of the following named colorscales:
|
||||
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
|
||||
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
|
||||
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
|
||||
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
|
||||
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
|
||||
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
|
||||
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
|
||||
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
|
||||
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
|
||||
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
|
||||
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
|
||||
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
|
||||
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
|
||||
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
|
||||
'ylorrd'].
|
||||
Appending '_r' to a named colorscale reverses it.
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["colorscale"]
|
||||
|
||||
@colorscale.setter
|
||||
def colorscale(self, val):
|
||||
self["colorscale"] = val
|
||||
|
||||
@property
|
||||
def reversescale(self):
|
||||
"""
|
||||
Reverses the color mapping if true. If true, `cmin` will
|
||||
correspond to the last color in the array and `cmax` will
|
||||
correspond to the first color.
|
||||
|
||||
The 'reversescale' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["reversescale"]
|
||||
|
||||
@reversescale.setter
|
||||
def reversescale(self, val):
|
||||
self["reversescale"] = val
|
||||
|
||||
@property
|
||||
def showscale(self):
|
||||
"""
|
||||
Determines whether or not a colorbar is displayed for this
|
||||
trace.
|
||||
|
||||
The 'showscale' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showscale"]
|
||||
|
||||
@showscale.setter
|
||||
def showscale(self, val):
|
||||
self["showscale"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
autocolorscale
|
||||
Determines whether the colorscale is a default palette
|
||||
(`autocolorscale: true`) or the palette determined by
|
||||
`colorscale`. In case `colorscale` is unspecified or
|
||||
`autocolorscale` is true, the default palette will be
|
||||
chosen according to whether numbers in the `color`
|
||||
array are all positive, all negative or mixed.
|
||||
cauto
|
||||
Determines whether or not the color domain is computed
|
||||
with respect to the input data (here corresponding
|
||||
trace color array(s)) or the bounds set in `cmin` and
|
||||
`cmax` Defaults to `false` when `cmin` and `cmax` are
|
||||
set by the user.
|
||||
cmax
|
||||
Sets the upper bound of the color domain. Value should
|
||||
have the same units as corresponding trace color
|
||||
array(s) and if set, `cmin` must be set as well.
|
||||
cmid
|
||||
Sets the mid-point of the color domain by scaling
|
||||
`cmin` and/or `cmax` to be equidistant to this point.
|
||||
Value should have the same units as corresponding trace
|
||||
color array(s). Has no effect when `cauto` is `false`.
|
||||
cmin
|
||||
Sets the lower bound of the color domain. Value should
|
||||
have the same units as corresponding trace color
|
||||
array(s) and if set, `cmax` must be set as well.
|
||||
colorbar
|
||||
:class:`plotly.graph_objects.layout.coloraxis.ColorBar`
|
||||
instance or dict with compatible properties
|
||||
colorscale
|
||||
Sets the colorscale. The colorscale must be an array
|
||||
containing arrays mapping a normalized value to an rgb,
|
||||
rgba, hex, hsl, hsv, or named color string. At minimum,
|
||||
a mapping for the lowest (0) and highest (1) values are
|
||||
required. For example, `[[0, 'rgb(0,0,255)'], [1,
|
||||
'rgb(255,0,0)']]`. To control the bounds of the
|
||||
colorscale in color space, use `cmin` and `cmax`.
|
||||
Alternatively, `colorscale` may be a palette name
|
||||
string of the following list: Blackbody,Bluered,Blues,C
|
||||
ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl
|
||||
and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.
|
||||
reversescale
|
||||
Reverses the color mapping if true. If true, `cmin`
|
||||
will correspond to the last color in the array and
|
||||
`cmax` will correspond to the first color.
|
||||
showscale
|
||||
Determines whether or not a colorbar is displayed for
|
||||
this trace.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
autocolorscale=None,
|
||||
cauto=None,
|
||||
cmax=None,
|
||||
cmid=None,
|
||||
cmin=None,
|
||||
colorbar=None,
|
||||
colorscale=None,
|
||||
reversescale=None,
|
||||
showscale=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Coloraxis object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Coloraxis`
|
||||
autocolorscale
|
||||
Determines whether the colorscale is a default palette
|
||||
(`autocolorscale: true`) or the palette determined by
|
||||
`colorscale`. In case `colorscale` is unspecified or
|
||||
`autocolorscale` is true, the default palette will be
|
||||
chosen according to whether numbers in the `color`
|
||||
array are all positive, all negative or mixed.
|
||||
cauto
|
||||
Determines whether or not the color domain is computed
|
||||
with respect to the input data (here corresponding
|
||||
trace color array(s)) or the bounds set in `cmin` and
|
||||
`cmax` Defaults to `false` when `cmin` and `cmax` are
|
||||
set by the user.
|
||||
cmax
|
||||
Sets the upper bound of the color domain. Value should
|
||||
have the same units as corresponding trace color
|
||||
array(s) and if set, `cmin` must be set as well.
|
||||
cmid
|
||||
Sets the mid-point of the color domain by scaling
|
||||
`cmin` and/or `cmax` to be equidistant to this point.
|
||||
Value should have the same units as corresponding trace
|
||||
color array(s). Has no effect when `cauto` is `false`.
|
||||
cmin
|
||||
Sets the lower bound of the color domain. Value should
|
||||
have the same units as corresponding trace color
|
||||
array(s) and if set, `cmax` must be set as well.
|
||||
colorbar
|
||||
:class:`plotly.graph_objects.layout.coloraxis.ColorBar`
|
||||
instance or dict with compatible properties
|
||||
colorscale
|
||||
Sets the colorscale. The colorscale must be an array
|
||||
containing arrays mapping a normalized value to an rgb,
|
||||
rgba, hex, hsl, hsv, or named color string. At minimum,
|
||||
a mapping for the lowest (0) and highest (1) values are
|
||||
required. For example, `[[0, 'rgb(0,0,255)'], [1,
|
||||
'rgb(255,0,0)']]`. To control the bounds of the
|
||||
colorscale in color space, use `cmin` and `cmax`.
|
||||
Alternatively, `colorscale` may be a palette name
|
||||
string of the following list: Blackbody,Bluered,Blues,C
|
||||
ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl
|
||||
and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.
|
||||
reversescale
|
||||
Reverses the color mapping if true. If true, `cmin`
|
||||
will correspond to the last color in the array and
|
||||
`cmax` will correspond to the first color.
|
||||
showscale
|
||||
Determines whether or not a colorbar is displayed for
|
||||
this trace.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Coloraxis
|
||||
"""
|
||||
super().__init__("coloraxis")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Coloraxis
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Coloraxis`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("autocolorscale", arg, autocolorscale)
|
||||
self._set_property("cauto", arg, cauto)
|
||||
self._set_property("cmax", arg, cmax)
|
||||
self._set_property("cmid", arg, cmid)
|
||||
self._set_property("cmin", arg, cmin)
|
||||
self._set_property("colorbar", arg, colorbar)
|
||||
self._set_property("colorscale", arg, colorscale)
|
||||
self._set_property("reversescale", arg, reversescale)
|
||||
self._set_property("showscale", arg, showscale)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,214 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Colorscale(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.colorscale"
|
||||
_valid_props = {"diverging", "sequential", "sequentialminus"}
|
||||
|
||||
@property
|
||||
def diverging(self):
|
||||
"""
|
||||
Sets the default diverging colorscale. Note that
|
||||
`autocolorscale` must be true for this attribute to work.
|
||||
|
||||
The 'diverging' property is a colorscale and may be
|
||||
specified as:
|
||||
- A list of colors that will be spaced evenly to create the colorscale.
|
||||
Many predefined colorscale lists are included in the sequential, diverging,
|
||||
and cyclical modules in the plotly.colors package.
|
||||
- A list of 2-element lists where the first element is the
|
||||
normalized color level value (starting at 0 and ending at 1),
|
||||
and the second item is a valid color string.
|
||||
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
|
||||
- One of the following named colorscales:
|
||||
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
|
||||
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
|
||||
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
|
||||
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
|
||||
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
|
||||
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
|
||||
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
|
||||
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
|
||||
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
|
||||
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
|
||||
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
|
||||
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
|
||||
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
|
||||
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
|
||||
'ylorrd'].
|
||||
Appending '_r' to a named colorscale reverses it.
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["diverging"]
|
||||
|
||||
@diverging.setter
|
||||
def diverging(self, val):
|
||||
self["diverging"] = val
|
||||
|
||||
@property
|
||||
def sequential(self):
|
||||
"""
|
||||
Sets the default sequential colorscale for positive values.
|
||||
Note that `autocolorscale` must be true for this attribute to
|
||||
work.
|
||||
|
||||
The 'sequential' property is a colorscale and may be
|
||||
specified as:
|
||||
- A list of colors that will be spaced evenly to create the colorscale.
|
||||
Many predefined colorscale lists are included in the sequential, diverging,
|
||||
and cyclical modules in the plotly.colors package.
|
||||
- A list of 2-element lists where the first element is the
|
||||
normalized color level value (starting at 0 and ending at 1),
|
||||
and the second item is a valid color string.
|
||||
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
|
||||
- One of the following named colorscales:
|
||||
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
|
||||
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
|
||||
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
|
||||
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
|
||||
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
|
||||
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
|
||||
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
|
||||
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
|
||||
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
|
||||
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
|
||||
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
|
||||
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
|
||||
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
|
||||
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
|
||||
'ylorrd'].
|
||||
Appending '_r' to a named colorscale reverses it.
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sequential"]
|
||||
|
||||
@sequential.setter
|
||||
def sequential(self, val):
|
||||
self["sequential"] = val
|
||||
|
||||
@property
|
||||
def sequentialminus(self):
|
||||
"""
|
||||
Sets the default sequential colorscale for negative values.
|
||||
Note that `autocolorscale` must be true for this attribute to
|
||||
work.
|
||||
|
||||
The 'sequentialminus' property is a colorscale and may be
|
||||
specified as:
|
||||
- A list of colors that will be spaced evenly to create the colorscale.
|
||||
Many predefined colorscale lists are included in the sequential, diverging,
|
||||
and cyclical modules in the plotly.colors package.
|
||||
- A list of 2-element lists where the first element is the
|
||||
normalized color level value (starting at 0 and ending at 1),
|
||||
and the second item is a valid color string.
|
||||
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
|
||||
- One of the following named colorscales:
|
||||
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
|
||||
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
|
||||
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
|
||||
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
|
||||
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
|
||||
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
|
||||
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
|
||||
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
|
||||
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
|
||||
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
|
||||
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
|
||||
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
|
||||
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
|
||||
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
|
||||
'ylorrd'].
|
||||
Appending '_r' to a named colorscale reverses it.
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sequentialminus"]
|
||||
|
||||
@sequentialminus.setter
|
||||
def sequentialminus(self, val):
|
||||
self["sequentialminus"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
diverging
|
||||
Sets the default diverging colorscale. Note that
|
||||
`autocolorscale` must be true for this attribute to
|
||||
work.
|
||||
sequential
|
||||
Sets the default sequential colorscale for positive
|
||||
values. Note that `autocolorscale` must be true for
|
||||
this attribute to work.
|
||||
sequentialminus
|
||||
Sets the default sequential colorscale for negative
|
||||
values. Note that `autocolorscale` must be true for
|
||||
this attribute to work.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, arg=None, diverging=None, sequential=None, sequentialminus=None, **kwargs
|
||||
):
|
||||
"""
|
||||
Construct a new Colorscale object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Colorscale`
|
||||
diverging
|
||||
Sets the default diverging colorscale. Note that
|
||||
`autocolorscale` must be true for this attribute to
|
||||
work.
|
||||
sequential
|
||||
Sets the default sequential colorscale for positive
|
||||
values. Note that `autocolorscale` must be true for
|
||||
this attribute to work.
|
||||
sequentialminus
|
||||
Sets the default sequential colorscale for negative
|
||||
values. Note that `autocolorscale` must be true for
|
||||
this attribute to work.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Colorscale
|
||||
"""
|
||||
super().__init__("colorscale")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Colorscale
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Colorscale`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("diverging", arg, diverging)
|
||||
self._set_property("sequential", arg, sequential)
|
||||
self._set_property("sequentialminus", arg, sequentialminus)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
334
lib/python3.11/site-packages/plotly/graph_objs/layout/_font.py
Normal file
334
lib/python3.11/site-packages/plotly/graph_objs/layout/_font.py
Normal file
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the global font. Note that fonts used in traces and other
|
||||
layout components inherit from the global font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
968
lib/python3.11/site-packages/plotly/graph_objs/layout/_geo.py
Normal file
968
lib/python3.11/site-packages/plotly/graph_objs/layout/_geo.py
Normal file
@ -0,0 +1,968 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Geo(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.geo"
|
||||
_valid_props = {
|
||||
"bgcolor",
|
||||
"center",
|
||||
"coastlinecolor",
|
||||
"coastlinewidth",
|
||||
"countrycolor",
|
||||
"countrywidth",
|
||||
"domain",
|
||||
"fitbounds",
|
||||
"framecolor",
|
||||
"framewidth",
|
||||
"lakecolor",
|
||||
"landcolor",
|
||||
"lataxis",
|
||||
"lonaxis",
|
||||
"oceancolor",
|
||||
"projection",
|
||||
"resolution",
|
||||
"rivercolor",
|
||||
"riverwidth",
|
||||
"scope",
|
||||
"showcoastlines",
|
||||
"showcountries",
|
||||
"showframe",
|
||||
"showlakes",
|
||||
"showland",
|
||||
"showocean",
|
||||
"showrivers",
|
||||
"showsubunits",
|
||||
"subunitcolor",
|
||||
"subunitwidth",
|
||||
"uirevision",
|
||||
"visible",
|
||||
}
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Set the background color of the map
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def center(self):
|
||||
"""
|
||||
The 'center' property is an instance of Center
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.Center`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Center constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.Center
|
||||
"""
|
||||
return self["center"]
|
||||
|
||||
@center.setter
|
||||
def center(self, val):
|
||||
self["center"] = val
|
||||
|
||||
@property
|
||||
def coastlinecolor(self):
|
||||
"""
|
||||
Sets the coastline color.
|
||||
|
||||
The 'coastlinecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["coastlinecolor"]
|
||||
|
||||
@coastlinecolor.setter
|
||||
def coastlinecolor(self, val):
|
||||
self["coastlinecolor"] = val
|
||||
|
||||
@property
|
||||
def coastlinewidth(self):
|
||||
"""
|
||||
Sets the coastline stroke width (in px).
|
||||
|
||||
The 'coastlinewidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["coastlinewidth"]
|
||||
|
||||
@coastlinewidth.setter
|
||||
def coastlinewidth(self, val):
|
||||
self["coastlinewidth"] = val
|
||||
|
||||
@property
|
||||
def countrycolor(self):
|
||||
"""
|
||||
Sets line color of the country boundaries.
|
||||
|
||||
The 'countrycolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["countrycolor"]
|
||||
|
||||
@countrycolor.setter
|
||||
def countrycolor(self, val):
|
||||
self["countrycolor"] = val
|
||||
|
||||
@property
|
||||
def countrywidth(self):
|
||||
"""
|
||||
Sets line width (in px) of the country boundaries.
|
||||
|
||||
The 'countrywidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["countrywidth"]
|
||||
|
||||
@countrywidth.setter
|
||||
def countrywidth(self, val):
|
||||
self["countrywidth"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def fitbounds(self):
|
||||
"""
|
||||
Determines if this subplot's view settings are auto-computed to
|
||||
fit trace data. On scoped maps, setting `fitbounds` leads to
|
||||
`center.lon` and `center.lat` getting auto-filled. On maps with
|
||||
a non-clipped projection, setting `fitbounds` leads to
|
||||
`center.lon`, `center.lat`, and `projection.rotation.lon`
|
||||
getting auto-filled. On maps with a clipped projection, setting
|
||||
`fitbounds` leads to `center.lon`, `center.lat`,
|
||||
`projection.rotation.lon`, `projection.rotation.lat`,
|
||||
`lonaxis.range` and `lataxis.range` getting auto-filled. If
|
||||
"locations", only the trace's visible locations are considered
|
||||
in the `fitbounds` computations. If "geojson", the entire trace
|
||||
input `geojson` (if provided) is considered in the `fitbounds`
|
||||
computations, Defaults to False.
|
||||
|
||||
The 'fitbounds' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
[False, 'locations', 'geojson']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["fitbounds"]
|
||||
|
||||
@fitbounds.setter
|
||||
def fitbounds(self, val):
|
||||
self["fitbounds"] = val
|
||||
|
||||
@property
|
||||
def framecolor(self):
|
||||
"""
|
||||
Sets the color the frame.
|
||||
|
||||
The 'framecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["framecolor"]
|
||||
|
||||
@framecolor.setter
|
||||
def framecolor(self, val):
|
||||
self["framecolor"] = val
|
||||
|
||||
@property
|
||||
def framewidth(self):
|
||||
"""
|
||||
Sets the stroke width (in px) of the frame.
|
||||
|
||||
The 'framewidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["framewidth"]
|
||||
|
||||
@framewidth.setter
|
||||
def framewidth(self, val):
|
||||
self["framewidth"] = val
|
||||
|
||||
@property
|
||||
def lakecolor(self):
|
||||
"""
|
||||
Sets the color of the lakes.
|
||||
|
||||
The 'lakecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["lakecolor"]
|
||||
|
||||
@lakecolor.setter
|
||||
def lakecolor(self, val):
|
||||
self["lakecolor"] = val
|
||||
|
||||
@property
|
||||
def landcolor(self):
|
||||
"""
|
||||
Sets the land mass color.
|
||||
|
||||
The 'landcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["landcolor"]
|
||||
|
||||
@landcolor.setter
|
||||
def landcolor(self, val):
|
||||
self["landcolor"] = val
|
||||
|
||||
@property
|
||||
def lataxis(self):
|
||||
"""
|
||||
The 'lataxis' property is an instance of Lataxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.Lataxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Lataxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.Lataxis
|
||||
"""
|
||||
return self["lataxis"]
|
||||
|
||||
@lataxis.setter
|
||||
def lataxis(self, val):
|
||||
self["lataxis"] = val
|
||||
|
||||
@property
|
||||
def lonaxis(self):
|
||||
"""
|
||||
The 'lonaxis' property is an instance of Lonaxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Lonaxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.Lonaxis
|
||||
"""
|
||||
return self["lonaxis"]
|
||||
|
||||
@lonaxis.setter
|
||||
def lonaxis(self, val):
|
||||
self["lonaxis"] = val
|
||||
|
||||
@property
|
||||
def oceancolor(self):
|
||||
"""
|
||||
Sets the ocean color
|
||||
|
||||
The 'oceancolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["oceancolor"]
|
||||
|
||||
@oceancolor.setter
|
||||
def oceancolor(self, val):
|
||||
self["oceancolor"] = val
|
||||
|
||||
@property
|
||||
def projection(self):
|
||||
"""
|
||||
The 'projection' property is an instance of Projection
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.Projection`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Projection constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.Projection
|
||||
"""
|
||||
return self["projection"]
|
||||
|
||||
@projection.setter
|
||||
def projection(self, val):
|
||||
self["projection"] = val
|
||||
|
||||
@property
|
||||
def resolution(self):
|
||||
"""
|
||||
Sets the resolution of the base layers. The values have units
|
||||
of km/mm e.g. 110 corresponds to a scale ratio of
|
||||
1:110,000,000.
|
||||
|
||||
The 'resolution' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
[110, 50]
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["resolution"]
|
||||
|
||||
@resolution.setter
|
||||
def resolution(self, val):
|
||||
self["resolution"] = val
|
||||
|
||||
@property
|
||||
def rivercolor(self):
|
||||
"""
|
||||
Sets color of the rivers.
|
||||
|
||||
The 'rivercolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["rivercolor"]
|
||||
|
||||
@rivercolor.setter
|
||||
def rivercolor(self, val):
|
||||
self["rivercolor"] = val
|
||||
|
||||
@property
|
||||
def riverwidth(self):
|
||||
"""
|
||||
Sets the stroke width (in px) of the rivers.
|
||||
|
||||
The 'riverwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["riverwidth"]
|
||||
|
||||
@riverwidth.setter
|
||||
def riverwidth(self, val):
|
||||
self["riverwidth"] = val
|
||||
|
||||
@property
|
||||
def scope(self):
|
||||
"""
|
||||
Set the scope of the map.
|
||||
|
||||
The 'scope' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['africa', 'antarctica', 'asia', 'europe', 'north
|
||||
america', 'oceania', 'south america', 'usa', 'world']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["scope"]
|
||||
|
||||
@scope.setter
|
||||
def scope(self, val):
|
||||
self["scope"] = val
|
||||
|
||||
@property
|
||||
def showcoastlines(self):
|
||||
"""
|
||||
Sets whether or not the coastlines are drawn.
|
||||
|
||||
The 'showcoastlines' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showcoastlines"]
|
||||
|
||||
@showcoastlines.setter
|
||||
def showcoastlines(self, val):
|
||||
self["showcoastlines"] = val
|
||||
|
||||
@property
|
||||
def showcountries(self):
|
||||
"""
|
||||
Sets whether or not country boundaries are drawn.
|
||||
|
||||
The 'showcountries' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showcountries"]
|
||||
|
||||
@showcountries.setter
|
||||
def showcountries(self, val):
|
||||
self["showcountries"] = val
|
||||
|
||||
@property
|
||||
def showframe(self):
|
||||
"""
|
||||
Sets whether or not a frame is drawn around the map.
|
||||
|
||||
The 'showframe' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showframe"]
|
||||
|
||||
@showframe.setter
|
||||
def showframe(self, val):
|
||||
self["showframe"] = val
|
||||
|
||||
@property
|
||||
def showlakes(self):
|
||||
"""
|
||||
Sets whether or not lakes are drawn.
|
||||
|
||||
The 'showlakes' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showlakes"]
|
||||
|
||||
@showlakes.setter
|
||||
def showlakes(self, val):
|
||||
self["showlakes"] = val
|
||||
|
||||
@property
|
||||
def showland(self):
|
||||
"""
|
||||
Sets whether or not land masses are filled in color.
|
||||
|
||||
The 'showland' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showland"]
|
||||
|
||||
@showland.setter
|
||||
def showland(self, val):
|
||||
self["showland"] = val
|
||||
|
||||
@property
|
||||
def showocean(self):
|
||||
"""
|
||||
Sets whether or not oceans are filled in color.
|
||||
|
||||
The 'showocean' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showocean"]
|
||||
|
||||
@showocean.setter
|
||||
def showocean(self, val):
|
||||
self["showocean"] = val
|
||||
|
||||
@property
|
||||
def showrivers(self):
|
||||
"""
|
||||
Sets whether or not rivers are drawn.
|
||||
|
||||
The 'showrivers' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showrivers"]
|
||||
|
||||
@showrivers.setter
|
||||
def showrivers(self, val):
|
||||
self["showrivers"] = val
|
||||
|
||||
@property
|
||||
def showsubunits(self):
|
||||
"""
|
||||
Sets whether or not boundaries of subunits within countries
|
||||
(e.g. states, provinces) are drawn.
|
||||
|
||||
The 'showsubunits' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showsubunits"]
|
||||
|
||||
@showsubunits.setter
|
||||
def showsubunits(self, val):
|
||||
self["showsubunits"] = val
|
||||
|
||||
@property
|
||||
def subunitcolor(self):
|
||||
"""
|
||||
Sets the color of the subunits boundaries.
|
||||
|
||||
The 'subunitcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["subunitcolor"]
|
||||
|
||||
@subunitcolor.setter
|
||||
def subunitcolor(self, val):
|
||||
self["subunitcolor"] = val
|
||||
|
||||
@property
|
||||
def subunitwidth(self):
|
||||
"""
|
||||
Sets the stroke width (in px) of the subunits boundaries.
|
||||
|
||||
The 'subunitwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["subunitwidth"]
|
||||
|
||||
@subunitwidth.setter
|
||||
def subunitwidth(self, val):
|
||||
self["subunitwidth"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes in the view
|
||||
(projection and center). Defaults to `layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Sets the default visibility of the base layers.
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
bgcolor
|
||||
Set the background color of the map
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.geo.Center`
|
||||
instance or dict with compatible properties
|
||||
coastlinecolor
|
||||
Sets the coastline color.
|
||||
coastlinewidth
|
||||
Sets the coastline stroke width (in px).
|
||||
countrycolor
|
||||
Sets line color of the country boundaries.
|
||||
countrywidth
|
||||
Sets line width (in px) of the country boundaries.
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.geo.Domain`
|
||||
instance or dict with compatible properties
|
||||
fitbounds
|
||||
Determines if this subplot's view settings are auto-
|
||||
computed to fit trace data. On scoped maps, setting
|
||||
`fitbounds` leads to `center.lon` and `center.lat`
|
||||
getting auto-filled. On maps with a non-clipped
|
||||
projection, setting `fitbounds` leads to `center.lon`,
|
||||
`center.lat`, and `projection.rotation.lon` getting
|
||||
auto-filled. On maps with a clipped projection, setting
|
||||
`fitbounds` leads to `center.lon`, `center.lat`,
|
||||
`projection.rotation.lon`, `projection.rotation.lat`,
|
||||
`lonaxis.range` and `lataxis.range` getting auto-
|
||||
filled. If "locations", only the trace's visible
|
||||
locations are considered in the `fitbounds`
|
||||
computations. If "geojson", the entire trace input
|
||||
`geojson` (if provided) is considered in the
|
||||
`fitbounds` computations, Defaults to False.
|
||||
framecolor
|
||||
Sets the color the frame.
|
||||
framewidth
|
||||
Sets the stroke width (in px) of the frame.
|
||||
lakecolor
|
||||
Sets the color of the lakes.
|
||||
landcolor
|
||||
Sets the land mass color.
|
||||
lataxis
|
||||
:class:`plotly.graph_objects.layout.geo.Lataxis`
|
||||
instance or dict with compatible properties
|
||||
lonaxis
|
||||
:class:`plotly.graph_objects.layout.geo.Lonaxis`
|
||||
instance or dict with compatible properties
|
||||
oceancolor
|
||||
Sets the ocean color
|
||||
projection
|
||||
:class:`plotly.graph_objects.layout.geo.Projection`
|
||||
instance or dict with compatible properties
|
||||
resolution
|
||||
Sets the resolution of the base layers. The values have
|
||||
units of km/mm e.g. 110 corresponds to a scale ratio of
|
||||
1:110,000,000.
|
||||
rivercolor
|
||||
Sets color of the rivers.
|
||||
riverwidth
|
||||
Sets the stroke width (in px) of the rivers.
|
||||
scope
|
||||
Set the scope of the map.
|
||||
showcoastlines
|
||||
Sets whether or not the coastlines are drawn.
|
||||
showcountries
|
||||
Sets whether or not country boundaries are drawn.
|
||||
showframe
|
||||
Sets whether or not a frame is drawn around the map.
|
||||
showlakes
|
||||
Sets whether or not lakes are drawn.
|
||||
showland
|
||||
Sets whether or not land masses are filled in color.
|
||||
showocean
|
||||
Sets whether or not oceans are filled in color.
|
||||
showrivers
|
||||
Sets whether or not rivers are drawn.
|
||||
showsubunits
|
||||
Sets whether or not boundaries of subunits within
|
||||
countries (e.g. states, provinces) are drawn.
|
||||
subunitcolor
|
||||
Sets the color of the subunits boundaries.
|
||||
subunitwidth
|
||||
Sets the stroke width (in px) of the subunits
|
||||
boundaries.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the view
|
||||
(projection and center). Defaults to
|
||||
`layout.uirevision`.
|
||||
visible
|
||||
Sets the default visibility of the base layers.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
bgcolor=None,
|
||||
center=None,
|
||||
coastlinecolor=None,
|
||||
coastlinewidth=None,
|
||||
countrycolor=None,
|
||||
countrywidth=None,
|
||||
domain=None,
|
||||
fitbounds=None,
|
||||
framecolor=None,
|
||||
framewidth=None,
|
||||
lakecolor=None,
|
||||
landcolor=None,
|
||||
lataxis=None,
|
||||
lonaxis=None,
|
||||
oceancolor=None,
|
||||
projection=None,
|
||||
resolution=None,
|
||||
rivercolor=None,
|
||||
riverwidth=None,
|
||||
scope=None,
|
||||
showcoastlines=None,
|
||||
showcountries=None,
|
||||
showframe=None,
|
||||
showlakes=None,
|
||||
showland=None,
|
||||
showocean=None,
|
||||
showrivers=None,
|
||||
showsubunits=None,
|
||||
subunitcolor=None,
|
||||
subunitwidth=None,
|
||||
uirevision=None,
|
||||
visible=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Geo object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Geo`
|
||||
bgcolor
|
||||
Set the background color of the map
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.geo.Center`
|
||||
instance or dict with compatible properties
|
||||
coastlinecolor
|
||||
Sets the coastline color.
|
||||
coastlinewidth
|
||||
Sets the coastline stroke width (in px).
|
||||
countrycolor
|
||||
Sets line color of the country boundaries.
|
||||
countrywidth
|
||||
Sets line width (in px) of the country boundaries.
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.geo.Domain`
|
||||
instance or dict with compatible properties
|
||||
fitbounds
|
||||
Determines if this subplot's view settings are auto-
|
||||
computed to fit trace data. On scoped maps, setting
|
||||
`fitbounds` leads to `center.lon` and `center.lat`
|
||||
getting auto-filled. On maps with a non-clipped
|
||||
projection, setting `fitbounds` leads to `center.lon`,
|
||||
`center.lat`, and `projection.rotation.lon` getting
|
||||
auto-filled. On maps with a clipped projection, setting
|
||||
`fitbounds` leads to `center.lon`, `center.lat`,
|
||||
`projection.rotation.lon`, `projection.rotation.lat`,
|
||||
`lonaxis.range` and `lataxis.range` getting auto-
|
||||
filled. If "locations", only the trace's visible
|
||||
locations are considered in the `fitbounds`
|
||||
computations. If "geojson", the entire trace input
|
||||
`geojson` (if provided) is considered in the
|
||||
`fitbounds` computations, Defaults to False.
|
||||
framecolor
|
||||
Sets the color the frame.
|
||||
framewidth
|
||||
Sets the stroke width (in px) of the frame.
|
||||
lakecolor
|
||||
Sets the color of the lakes.
|
||||
landcolor
|
||||
Sets the land mass color.
|
||||
lataxis
|
||||
:class:`plotly.graph_objects.layout.geo.Lataxis`
|
||||
instance or dict with compatible properties
|
||||
lonaxis
|
||||
:class:`plotly.graph_objects.layout.geo.Lonaxis`
|
||||
instance or dict with compatible properties
|
||||
oceancolor
|
||||
Sets the ocean color
|
||||
projection
|
||||
:class:`plotly.graph_objects.layout.geo.Projection`
|
||||
instance or dict with compatible properties
|
||||
resolution
|
||||
Sets the resolution of the base layers. The values have
|
||||
units of km/mm e.g. 110 corresponds to a scale ratio of
|
||||
1:110,000,000.
|
||||
rivercolor
|
||||
Sets color of the rivers.
|
||||
riverwidth
|
||||
Sets the stroke width (in px) of the rivers.
|
||||
scope
|
||||
Set the scope of the map.
|
||||
showcoastlines
|
||||
Sets whether or not the coastlines are drawn.
|
||||
showcountries
|
||||
Sets whether or not country boundaries are drawn.
|
||||
showframe
|
||||
Sets whether or not a frame is drawn around the map.
|
||||
showlakes
|
||||
Sets whether or not lakes are drawn.
|
||||
showland
|
||||
Sets whether or not land masses are filled in color.
|
||||
showocean
|
||||
Sets whether or not oceans are filled in color.
|
||||
showrivers
|
||||
Sets whether or not rivers are drawn.
|
||||
showsubunits
|
||||
Sets whether or not boundaries of subunits within
|
||||
countries (e.g. states, provinces) are drawn.
|
||||
subunitcolor
|
||||
Sets the color of the subunits boundaries.
|
||||
subunitwidth
|
||||
Sets the stroke width (in px) of the subunits
|
||||
boundaries.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the view
|
||||
(projection and center). Defaults to
|
||||
`layout.uirevision`.
|
||||
visible
|
||||
Sets the default visibility of the base layers.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Geo
|
||||
"""
|
||||
super().__init__("geo")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Geo
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Geo`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("center", arg, center)
|
||||
self._set_property("coastlinecolor", arg, coastlinecolor)
|
||||
self._set_property("coastlinewidth", arg, coastlinewidth)
|
||||
self._set_property("countrycolor", arg, countrycolor)
|
||||
self._set_property("countrywidth", arg, countrywidth)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("fitbounds", arg, fitbounds)
|
||||
self._set_property("framecolor", arg, framecolor)
|
||||
self._set_property("framewidth", arg, framewidth)
|
||||
self._set_property("lakecolor", arg, lakecolor)
|
||||
self._set_property("landcolor", arg, landcolor)
|
||||
self._set_property("lataxis", arg, lataxis)
|
||||
self._set_property("lonaxis", arg, lonaxis)
|
||||
self._set_property("oceancolor", arg, oceancolor)
|
||||
self._set_property("projection", arg, projection)
|
||||
self._set_property("resolution", arg, resolution)
|
||||
self._set_property("rivercolor", arg, rivercolor)
|
||||
self._set_property("riverwidth", arg, riverwidth)
|
||||
self._set_property("scope", arg, scope)
|
||||
self._set_property("showcoastlines", arg, showcoastlines)
|
||||
self._set_property("showcountries", arg, showcountries)
|
||||
self._set_property("showframe", arg, showframe)
|
||||
self._set_property("showlakes", arg, showlakes)
|
||||
self._set_property("showland", arg, showland)
|
||||
self._set_property("showocean", arg, showocean)
|
||||
self._set_property("showrivers", arg, showrivers)
|
||||
self._set_property("showsubunits", arg, showsubunits)
|
||||
self._set_property("subunitcolor", arg, subunitcolor)
|
||||
self._set_property("subunitwidth", arg, subunitwidth)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
511
lib/python3.11/site-packages/plotly/graph_objs/layout/_grid.py
Normal file
511
lib/python3.11/site-packages/plotly/graph_objs/layout/_grid.py
Normal file
@ -0,0 +1,511 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Grid(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.grid"
|
||||
_valid_props = {
|
||||
"columns",
|
||||
"domain",
|
||||
"pattern",
|
||||
"roworder",
|
||||
"rows",
|
||||
"subplots",
|
||||
"xaxes",
|
||||
"xgap",
|
||||
"xside",
|
||||
"yaxes",
|
||||
"ygap",
|
||||
"yside",
|
||||
}
|
||||
|
||||
@property
|
||||
def columns(self):
|
||||
"""
|
||||
The number of columns in the grid. If you provide a 2D
|
||||
`subplots` array, the length of its longest row is used as the
|
||||
default. If you give an `xaxes` array, its length is used as
|
||||
the default. But it's also possible to have a different length,
|
||||
if you want to leave a row at the end for non-cartesian
|
||||
subplots.
|
||||
|
||||
The 'columns' 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["columns"]
|
||||
|
||||
@columns.setter
|
||||
def columns(self, val):
|
||||
self["columns"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.grid.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.grid.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def pattern(self):
|
||||
"""
|
||||
If no `subplots`, `xaxes`, or `yaxes` are given but we do have
|
||||
`rows` and `columns`, we can generate defaults using
|
||||
consecutive axis IDs, in two ways: "coupled" gives one x axis
|
||||
per column and one y axis per row. "independent" uses a new xy
|
||||
pair for each cell, left-to-right across each row then
|
||||
iterating rows according to `roworder`.
|
||||
|
||||
The 'pattern' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['independent', 'coupled']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["pattern"]
|
||||
|
||||
@pattern.setter
|
||||
def pattern(self, val):
|
||||
self["pattern"] = val
|
||||
|
||||
@property
|
||||
def roworder(self):
|
||||
"""
|
||||
Is the first row the top or the bottom? Note that columns are
|
||||
always enumerated from left to right.
|
||||
|
||||
The 'roworder' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top to bottom', 'bottom to top']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["roworder"]
|
||||
|
||||
@roworder.setter
|
||||
def roworder(self, val):
|
||||
self["roworder"] = val
|
||||
|
||||
@property
|
||||
def rows(self):
|
||||
"""
|
||||
The number of rows in the grid. If you provide a 2D `subplots`
|
||||
array or a `yaxes` array, its length is used as the default.
|
||||
But it's also possible to have a different length, if you want
|
||||
to leave a row at the end for non-cartesian subplots.
|
||||
|
||||
The 'rows' 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["rows"]
|
||||
|
||||
@rows.setter
|
||||
def rows(self, val):
|
||||
self["rows"] = val
|
||||
|
||||
@property
|
||||
def subplots(self):
|
||||
"""
|
||||
Used for freeform grids, where some axes may be shared across
|
||||
subplots but others are not. Each entry should be a cartesian
|
||||
subplot id, like "xy" or "x3y2", or "" to leave that cell
|
||||
empty. You may reuse x axes within the same column, and y axes
|
||||
within the same row. Non-cartesian subplots and traces that
|
||||
support `domain` can place themselves in this grid separately
|
||||
using the `gridcell` attribute.
|
||||
|
||||
The 'subplots' property is an info array that may be specified as:
|
||||
* a 2D list where:
|
||||
The 'subplots[i][j]' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["subplots"]
|
||||
|
||||
@subplots.setter
|
||||
def subplots(self, val):
|
||||
self["subplots"] = val
|
||||
|
||||
@property
|
||||
def xaxes(self):
|
||||
"""
|
||||
Used with `yaxes` when the x and y axes are shared across
|
||||
columns and rows. Each entry should be an x axis id like "x",
|
||||
"x2", etc., or "" to not put an x axis in that column. Entries
|
||||
other than "" must be unique. Ignored if `subplots` is present.
|
||||
If missing but `yaxes` is present, will generate consecutive
|
||||
IDs.
|
||||
|
||||
The 'xaxes' property is an info array that may be specified as:
|
||||
* a list of elements where:
|
||||
The 'xaxes[i]' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^x([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["xaxes"]
|
||||
|
||||
@xaxes.setter
|
||||
def xaxes(self, val):
|
||||
self["xaxes"] = val
|
||||
|
||||
@property
|
||||
def xgap(self):
|
||||
"""
|
||||
Horizontal space between grid cells, expressed as a fraction of
|
||||
the total width available to one cell. Defaults to 0.1 for
|
||||
coupled-axes grids and 0.2 for independent grids.
|
||||
|
||||
The 'xgap' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["xgap"]
|
||||
|
||||
@xgap.setter
|
||||
def xgap(self, val):
|
||||
self["xgap"] = val
|
||||
|
||||
@property
|
||||
def xside(self):
|
||||
"""
|
||||
Sets where the x axis labels and titles go. "bottom" means the
|
||||
very bottom of the grid. "bottom plot" is the lowest plot that
|
||||
each x axis is used in. "top" and "top plot" are similar.
|
||||
|
||||
The 'xside' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['bottom', 'bottom plot', 'top plot', 'top']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xside"]
|
||||
|
||||
@xside.setter
|
||||
def xside(self, val):
|
||||
self["xside"] = val
|
||||
|
||||
@property
|
||||
def yaxes(self):
|
||||
"""
|
||||
Used with `yaxes` when the x and y axes are shared across
|
||||
columns and rows. Each entry should be an y axis id like "y",
|
||||
"y2", etc., or "" to not put a y axis in that row. Entries
|
||||
other than "" must be unique. Ignored if `subplots` is present.
|
||||
If missing but `xaxes` is present, will generate consecutive
|
||||
IDs.
|
||||
|
||||
The 'yaxes' property is an info array that may be specified as:
|
||||
* a list of elements where:
|
||||
The 'yaxes[i]' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^y([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["yaxes"]
|
||||
|
||||
@yaxes.setter
|
||||
def yaxes(self, val):
|
||||
self["yaxes"] = val
|
||||
|
||||
@property
|
||||
def ygap(self):
|
||||
"""
|
||||
Vertical space between grid cells, expressed as a fraction of
|
||||
the total height available to one cell. Defaults to 0.1 for
|
||||
coupled-axes grids and 0.3 for independent grids.
|
||||
|
||||
The 'ygap' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["ygap"]
|
||||
|
||||
@ygap.setter
|
||||
def ygap(self, val):
|
||||
self["ygap"] = val
|
||||
|
||||
@property
|
||||
def yside(self):
|
||||
"""
|
||||
Sets where the y axis labels and titles go. "left" means the
|
||||
very left edge of the grid. *left plot* is the leftmost plot
|
||||
that each y axis is used in. "right" and *right plot* are
|
||||
similar.
|
||||
|
||||
The 'yside' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['left', 'left plot', 'right plot', 'right']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yside"]
|
||||
|
||||
@yside.setter
|
||||
def yside(self, val):
|
||||
self["yside"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
columns
|
||||
The number of columns in the grid. If you provide a 2D
|
||||
`subplots` array, the length of its longest row is used
|
||||
as the default. If you give an `xaxes` array, its
|
||||
length is used as the default. But it's also possible
|
||||
to have a different length, if you want to leave a row
|
||||
at the end for non-cartesian subplots.
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.grid.Domain`
|
||||
instance or dict with compatible properties
|
||||
pattern
|
||||
If no `subplots`, `xaxes`, or `yaxes` are given but we
|
||||
do have `rows` and `columns`, we can generate defaults
|
||||
using consecutive axis IDs, in two ways: "coupled"
|
||||
gives one x axis per column and one y axis per row.
|
||||
"independent" uses a new xy pair for each cell, left-
|
||||
to-right across each row then iterating rows according
|
||||
to `roworder`.
|
||||
roworder
|
||||
Is the first row the top or the bottom? Note that
|
||||
columns are always enumerated from left to right.
|
||||
rows
|
||||
The number of rows in the grid. If you provide a 2D
|
||||
`subplots` array or a `yaxes` array, its length is used
|
||||
as the default. But it's also possible to have a
|
||||
different length, if you want to leave a row at the end
|
||||
for non-cartesian subplots.
|
||||
subplots
|
||||
Used for freeform grids, where some axes may be shared
|
||||
across subplots but others are not. Each entry should
|
||||
be a cartesian subplot id, like "xy" or "x3y2", or ""
|
||||
to leave that cell empty. You may reuse x axes within
|
||||
the same column, and y axes within the same row. Non-
|
||||
cartesian subplots and traces that support `domain` can
|
||||
place themselves in this grid separately using the
|
||||
`gridcell` attribute.
|
||||
xaxes
|
||||
Used with `yaxes` when the x and y axes are shared
|
||||
across columns and rows. Each entry should be an x axis
|
||||
id like "x", "x2", etc., or "" to not put an x axis in
|
||||
that column. Entries other than "" must be unique.
|
||||
Ignored if `subplots` is present. If missing but
|
||||
`yaxes` is present, will generate consecutive IDs.
|
||||
xgap
|
||||
Horizontal space between grid cells, expressed as a
|
||||
fraction of the total width available to one cell.
|
||||
Defaults to 0.1 for coupled-axes grids and 0.2 for
|
||||
independent grids.
|
||||
xside
|
||||
Sets where the x axis labels and titles go. "bottom"
|
||||
means the very bottom of the grid. "bottom plot" is the
|
||||
lowest plot that each x axis is used in. "top" and "top
|
||||
plot" are similar.
|
||||
yaxes
|
||||
Used with `yaxes` when the x and y axes are shared
|
||||
across columns and rows. Each entry should be an y axis
|
||||
id like "y", "y2", etc., or "" to not put a y axis in
|
||||
that row. Entries other than "" must be unique. Ignored
|
||||
if `subplots` is present. If missing but `xaxes` is
|
||||
present, will generate consecutive IDs.
|
||||
ygap
|
||||
Vertical space between grid cells, expressed as a
|
||||
fraction of the total height available to one cell.
|
||||
Defaults to 0.1 for coupled-axes grids and 0.3 for
|
||||
independent grids.
|
||||
yside
|
||||
Sets where the y axis labels and titles go. "left"
|
||||
means the very left edge of the grid. *left plot* is
|
||||
the leftmost plot that each y axis is used in. "right"
|
||||
and *right plot* are similar.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
columns=None,
|
||||
domain=None,
|
||||
pattern=None,
|
||||
roworder=None,
|
||||
rows=None,
|
||||
subplots=None,
|
||||
xaxes=None,
|
||||
xgap=None,
|
||||
xside=None,
|
||||
yaxes=None,
|
||||
ygap=None,
|
||||
yside=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Grid object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Grid`
|
||||
columns
|
||||
The number of columns in the grid. If you provide a 2D
|
||||
`subplots` array, the length of its longest row is used
|
||||
as the default. If you give an `xaxes` array, its
|
||||
length is used as the default. But it's also possible
|
||||
to have a different length, if you want to leave a row
|
||||
at the end for non-cartesian subplots.
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.grid.Domain`
|
||||
instance or dict with compatible properties
|
||||
pattern
|
||||
If no `subplots`, `xaxes`, or `yaxes` are given but we
|
||||
do have `rows` and `columns`, we can generate defaults
|
||||
using consecutive axis IDs, in two ways: "coupled"
|
||||
gives one x axis per column and one y axis per row.
|
||||
"independent" uses a new xy pair for each cell, left-
|
||||
to-right across each row then iterating rows according
|
||||
to `roworder`.
|
||||
roworder
|
||||
Is the first row the top or the bottom? Note that
|
||||
columns are always enumerated from left to right.
|
||||
rows
|
||||
The number of rows in the grid. If you provide a 2D
|
||||
`subplots` array or a `yaxes` array, its length is used
|
||||
as the default. But it's also possible to have a
|
||||
different length, if you want to leave a row at the end
|
||||
for non-cartesian subplots.
|
||||
subplots
|
||||
Used for freeform grids, where some axes may be shared
|
||||
across subplots but others are not. Each entry should
|
||||
be a cartesian subplot id, like "xy" or "x3y2", or ""
|
||||
to leave that cell empty. You may reuse x axes within
|
||||
the same column, and y axes within the same row. Non-
|
||||
cartesian subplots and traces that support `domain` can
|
||||
place themselves in this grid separately using the
|
||||
`gridcell` attribute.
|
||||
xaxes
|
||||
Used with `yaxes` when the x and y axes are shared
|
||||
across columns and rows. Each entry should be an x axis
|
||||
id like "x", "x2", etc., or "" to not put an x axis in
|
||||
that column. Entries other than "" must be unique.
|
||||
Ignored if `subplots` is present. If missing but
|
||||
`yaxes` is present, will generate consecutive IDs.
|
||||
xgap
|
||||
Horizontal space between grid cells, expressed as a
|
||||
fraction of the total width available to one cell.
|
||||
Defaults to 0.1 for coupled-axes grids and 0.2 for
|
||||
independent grids.
|
||||
xside
|
||||
Sets where the x axis labels and titles go. "bottom"
|
||||
means the very bottom of the grid. "bottom plot" is the
|
||||
lowest plot that each x axis is used in. "top" and "top
|
||||
plot" are similar.
|
||||
yaxes
|
||||
Used with `yaxes` when the x and y axes are shared
|
||||
across columns and rows. Each entry should be an y axis
|
||||
id like "y", "y2", etc., or "" to not put a y axis in
|
||||
that row. Entries other than "" must be unique. Ignored
|
||||
if `subplots` is present. If missing but `xaxes` is
|
||||
present, will generate consecutive IDs.
|
||||
ygap
|
||||
Vertical space between grid cells, expressed as a
|
||||
fraction of the total height available to one cell.
|
||||
Defaults to 0.1 for coupled-axes grids and 0.3 for
|
||||
independent grids.
|
||||
yside
|
||||
Sets where the y axis labels and titles go. "left"
|
||||
means the very left edge of the grid. *left plot* is
|
||||
the leftmost plot that each y axis is used in. "right"
|
||||
and *right plot* are similar.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Grid
|
||||
"""
|
||||
super().__init__("grid")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Grid
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Grid`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("columns", arg, columns)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("pattern", arg, pattern)
|
||||
self._set_property("roworder", arg, roworder)
|
||||
self._set_property("rows", arg, rows)
|
||||
self._set_property("subplots", arg, subplots)
|
||||
self._set_property("xaxes", arg, xaxes)
|
||||
self._set_property("xgap", arg, xgap)
|
||||
self._set_property("xside", arg, xside)
|
||||
self._set_property("yaxes", arg, yaxes)
|
||||
self._set_property("ygap", arg, ygap)
|
||||
self._set_property("yside", arg, yside)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,282 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Hoverlabel(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.hoverlabel"
|
||||
_valid_props = {
|
||||
"align",
|
||||
"bgcolor",
|
||||
"bordercolor",
|
||||
"font",
|
||||
"grouptitlefont",
|
||||
"namelength",
|
||||
"showarrow",
|
||||
}
|
||||
|
||||
@property
|
||||
def align(self):
|
||||
"""
|
||||
Sets the horizontal alignment of the text content within hover
|
||||
label box. Has an effect only if the hover label text spans
|
||||
more two or more lines
|
||||
|
||||
The 'align' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['left', 'right', 'auto']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["align"]
|
||||
|
||||
@align.setter
|
||||
def align(self, val):
|
||||
self["align"] = val
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Sets the background color of all hover labels on graph
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def bordercolor(self):
|
||||
"""
|
||||
Sets the border color of all hover labels on graph.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bordercolor"]
|
||||
|
||||
@bordercolor.setter
|
||||
def bordercolor(self, val):
|
||||
self["bordercolor"] = val
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the default hover label font used by all traces on the
|
||||
graph.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.hoverlabel.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def grouptitlefont(self):
|
||||
"""
|
||||
Sets the font for group titles in hover (unified modes).
|
||||
Defaults to `hoverlabel.font`.
|
||||
|
||||
The 'grouptitlefont' property is an instance of Grouptitlefont
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Grouptitlefont constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.hoverlabel.Grouptitlefont
|
||||
"""
|
||||
return self["grouptitlefont"]
|
||||
|
||||
@grouptitlefont.setter
|
||||
def grouptitlefont(self, val):
|
||||
self["grouptitlefont"] = val
|
||||
|
||||
@property
|
||||
def namelength(self):
|
||||
"""
|
||||
Sets the default length (in number of characters) of the trace
|
||||
name in the hover labels for all traces. -1 shows the whole
|
||||
name regardless of length. 0-3 shows the first 0-3 characters,
|
||||
and an integer >3 will show the whole name if it is less than
|
||||
that many characters, but if it is longer, will truncate to
|
||||
`namelength - 3` characters and add an ellipsis.
|
||||
|
||||
The 'namelength' 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["namelength"]
|
||||
|
||||
@namelength.setter
|
||||
def namelength(self, val):
|
||||
self["namelength"] = val
|
||||
|
||||
@property
|
||||
def showarrow(self):
|
||||
"""
|
||||
Sets whether or not to show the hover label arrow/triangle
|
||||
pointing to the data point.
|
||||
|
||||
The 'showarrow' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showarrow"]
|
||||
|
||||
@showarrow.setter
|
||||
def showarrow(self, val):
|
||||
self["showarrow"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
align
|
||||
Sets the horizontal alignment of the text content
|
||||
within hover label box. Has an effect only if the hover
|
||||
label text spans more two or more lines
|
||||
bgcolor
|
||||
Sets the background color of all hover labels on graph
|
||||
bordercolor
|
||||
Sets the border color of all hover labels on graph.
|
||||
font
|
||||
Sets the default hover label font used by all traces on
|
||||
the graph.
|
||||
grouptitlefont
|
||||
Sets the font for group titles in hover (unified
|
||||
modes). Defaults to `hoverlabel.font`.
|
||||
namelength
|
||||
Sets the default length (in number of characters) of
|
||||
the trace name in the hover labels for all traces. -1
|
||||
shows the whole name regardless of length. 0-3 shows
|
||||
the first 0-3 characters, and an integer >3 will show
|
||||
the whole name if it is less than that many characters,
|
||||
but if it is longer, will truncate to `namelength - 3`
|
||||
characters and add an ellipsis.
|
||||
showarrow
|
||||
Sets whether or not to show the hover label
|
||||
arrow/triangle pointing to the data point.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
align=None,
|
||||
bgcolor=None,
|
||||
bordercolor=None,
|
||||
font=None,
|
||||
grouptitlefont=None,
|
||||
namelength=None,
|
||||
showarrow=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Hoverlabel object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Hoverlabel`
|
||||
align
|
||||
Sets the horizontal alignment of the text content
|
||||
within hover label box. Has an effect only if the hover
|
||||
label text spans more two or more lines
|
||||
bgcolor
|
||||
Sets the background color of all hover labels on graph
|
||||
bordercolor
|
||||
Sets the border color of all hover labels on graph.
|
||||
font
|
||||
Sets the default hover label font used by all traces on
|
||||
the graph.
|
||||
grouptitlefont
|
||||
Sets the font for group titles in hover (unified
|
||||
modes). Defaults to `hoverlabel.font`.
|
||||
namelength
|
||||
Sets the default length (in number of characters) of
|
||||
the trace name in the hover labels for all traces. -1
|
||||
shows the whole name regardless of length. 0-3 shows
|
||||
the first 0-3 characters, and an integer >3 will show
|
||||
the whole name if it is less than that many characters,
|
||||
but if it is longer, will truncate to `namelength - 3`
|
||||
characters and add an ellipsis.
|
||||
showarrow
|
||||
Sets whether or not to show the hover label
|
||||
arrow/triangle pointing to the data point.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Hoverlabel
|
||||
"""
|
||||
super().__init__("hoverlabel")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Hoverlabel
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Hoverlabel`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("align", arg, align)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("bordercolor", arg, bordercolor)
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("grouptitlefont", arg, grouptitlefont)
|
||||
self._set_property("namelength", arg, namelength)
|
||||
self._set_property("showarrow", arg, showarrow)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
608
lib/python3.11/site-packages/plotly/graph_objs/layout/_image.py
Normal file
608
lib/python3.11/site-packages/plotly/graph_objs/layout/_image.py
Normal file
@ -0,0 +1,608 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Image(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.image"
|
||||
_valid_props = {
|
||||
"layer",
|
||||
"name",
|
||||
"opacity",
|
||||
"sizex",
|
||||
"sizey",
|
||||
"sizing",
|
||||
"source",
|
||||
"templateitemname",
|
||||
"visible",
|
||||
"x",
|
||||
"xanchor",
|
||||
"xref",
|
||||
"y",
|
||||
"yanchor",
|
||||
"yref",
|
||||
}
|
||||
|
||||
@property
|
||||
def layer(self):
|
||||
"""
|
||||
Specifies whether images are drawn below or above traces. When
|
||||
`xref` and `yref` are both set to `paper`, image is drawn below
|
||||
the entire plot area.
|
||||
|
||||
The 'layer' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['below', 'above']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["layer"]
|
||||
|
||||
@layer.setter
|
||||
def layer(self, val):
|
||||
self["layer"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the image.
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def sizex(self):
|
||||
"""
|
||||
Sets the image container size horizontally. The image will be
|
||||
sized based on the `position` value. When `xref` is set to
|
||||
`paper`, units are sized relative to the plot width. When
|
||||
`xref` ends with ` domain`, units are sized relative to the
|
||||
axis width.
|
||||
|
||||
The 'sizex' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["sizex"]
|
||||
|
||||
@sizex.setter
|
||||
def sizex(self, val):
|
||||
self["sizex"] = val
|
||||
|
||||
@property
|
||||
def sizey(self):
|
||||
"""
|
||||
Sets the image container size vertically. The image will be
|
||||
sized based on the `position` value. When `yref` is set to
|
||||
`paper`, units are sized relative to the plot height. When
|
||||
`yref` ends with ` domain`, units are sized relative to the
|
||||
axis height.
|
||||
|
||||
The 'sizey' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["sizey"]
|
||||
|
||||
@sizey.setter
|
||||
def sizey(self, val):
|
||||
self["sizey"] = val
|
||||
|
||||
@property
|
||||
def sizing(self):
|
||||
"""
|
||||
Specifies which dimension of the image to constrain.
|
||||
|
||||
The 'sizing' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['fill', 'contain', 'stretch']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["sizing"]
|
||||
|
||||
@sizing.setter
|
||||
def sizing(self, val):
|
||||
self["sizing"] = val
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""
|
||||
Specifies the URL of the image to be used. The URL must be
|
||||
accessible from the domain where the plot code is run, and can
|
||||
be either relative or absolute.
|
||||
|
||||
The 'source' property is an image URI that may be specified as:
|
||||
- A remote image URI string
|
||||
(e.g. 'http://www.somewhere.com/image.png')
|
||||
- A data URI image string
|
||||
(e.g. 'data:image/png;base64,iVBORw0KGgoAAAANSU')
|
||||
- A PIL.Image.Image object which will be immediately converted
|
||||
to a data URI image string
|
||||
See http://pillow.readthedocs.io/en/latest/reference/Image.html
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["source"]
|
||||
|
||||
@source.setter
|
||||
def source(self, val):
|
||||
self["source"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether or not this image is visible.
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the image's x position. When `xref` is set to `paper`,
|
||||
units are sized relative to the plot height. See `xref` for
|
||||
more info
|
||||
|
||||
The 'x' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def xanchor(self):
|
||||
"""
|
||||
Sets the anchor for the x position
|
||||
|
||||
The 'xanchor' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['left', 'center', 'right']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xanchor"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
def xref(self):
|
||||
"""
|
||||
Sets the images's x coordinate axis. If set to a x axis id
|
||||
(e.g. "x" or "x2"), the `x` position refers to a x coordinate.
|
||||
If set to "paper", the `x` position refers to the distance from
|
||||
the left of the plotting area in normalized coordinates where 0
|
||||
(1) corresponds to the left (right). If set to a x axis ID
|
||||
followed by "domain" (separated by a space), the position
|
||||
behaves like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the domain of
|
||||
that axis: e.g., *x2 domain* refers to the domain of the second
|
||||
x axis and a x position of 0.5 refers to the point between the
|
||||
left and the right of the domain of the second x axis.
|
||||
|
||||
The 'xref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['paper']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^x([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xref"]
|
||||
|
||||
@xref.setter
|
||||
def xref(self, val):
|
||||
self["xref"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the image's y position. When `yref` is set to `paper`,
|
||||
units are sized relative to the plot height. See `yref` for
|
||||
more info
|
||||
|
||||
The 'y' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def yanchor(self):
|
||||
"""
|
||||
Sets the anchor for the y position.
|
||||
|
||||
The 'yanchor' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top', 'middle', 'bottom']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yanchor"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def yref(self):
|
||||
"""
|
||||
Sets the images's y coordinate axis. If set to a y axis id
|
||||
(e.g. "y" or "y2"), the `y` position refers to a y coordinate.
|
||||
If set to "paper", the `y` position refers to the distance from
|
||||
the bottom of the plotting area in normalized coordinates where
|
||||
0 (1) corresponds to the bottom (top). If set to a y axis ID
|
||||
followed by "domain" (separated by a space), the position
|
||||
behaves like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the domain of
|
||||
that axis: e.g., *y2 domain* refers to the domain of the second
|
||||
y axis and a y position of 0.5 refers to the point between the
|
||||
bottom and the top of the domain of the second y axis.
|
||||
|
||||
The 'yref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['paper']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^y([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yref"]
|
||||
|
||||
@yref.setter
|
||||
def yref(self, val):
|
||||
self["yref"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
layer
|
||||
Specifies whether images are drawn below or above
|
||||
traces. When `xref` and `yref` are both set to `paper`,
|
||||
image is drawn below the entire plot area.
|
||||
name
|
||||
When used in a template, named items are created in the
|
||||
output figure in addition to any items the figure
|
||||
already has in this array. You can modify these items
|
||||
in the output figure by making your own item with
|
||||
`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 image.
|
||||
sizex
|
||||
Sets the image container size horizontally. The image
|
||||
will be sized based on the `position` value. When
|
||||
`xref` is set to `paper`, units are sized relative to
|
||||
the plot width. When `xref` ends with ` domain`, units
|
||||
are sized relative to the axis width.
|
||||
sizey
|
||||
Sets the image container size vertically. The image
|
||||
will be sized based on the `position` value. When
|
||||
`yref` is set to `paper`, units are sized relative to
|
||||
the plot height. When `yref` ends with ` domain`, units
|
||||
are sized relative to the axis height.
|
||||
sizing
|
||||
Specifies which dimension of the image to constrain.
|
||||
source
|
||||
Specifies the URL of the image to be used. The URL must
|
||||
be accessible from the domain where the plot code is
|
||||
run, and can be either relative or absolute.
|
||||
templateitemname
|
||||
Used to refer to a named item in this array in the
|
||||
template. Named items from the template will be created
|
||||
even without a matching item in the input figure, but
|
||||
you can modify one by making an item with
|
||||
`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 image is visible.
|
||||
x
|
||||
Sets the image's x position. When `xref` is set to
|
||||
`paper`, units are sized relative to the plot height.
|
||||
See `xref` for more info
|
||||
xanchor
|
||||
Sets the anchor for the x position
|
||||
xref
|
||||
Sets the images's x coordinate axis. If set to a x axis
|
||||
id (e.g. "x" or "x2"), the `x` position refers to a x
|
||||
coordinate. If set to "paper", the `x` position refers
|
||||
to the distance from the left of the plotting area in
|
||||
normalized coordinates where 0 (1) corresponds to the
|
||||
left (right). If set to a x axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the
|
||||
domain of that axis: e.g., *x2 domain* refers to the
|
||||
domain of the second x axis and a x position of 0.5
|
||||
refers to the point between the left and the right of
|
||||
the domain of the second x axis.
|
||||
y
|
||||
Sets the image's y position. When `yref` is set to
|
||||
`paper`, units are sized relative to the plot height.
|
||||
See `yref` for more info
|
||||
yanchor
|
||||
Sets the anchor for the y position.
|
||||
yref
|
||||
Sets the images's y coordinate axis. If set to a y axis
|
||||
id (e.g. "y" or "y2"), the `y` position refers to a y
|
||||
coordinate. If set to "paper", the `y` position refers
|
||||
to the distance from the bottom of the plotting area in
|
||||
normalized coordinates where 0 (1) corresponds to the
|
||||
bottom (top). If set to a y axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the
|
||||
domain of that axis: e.g., *y2 domain* refers to the
|
||||
domain of the second y axis and a y position of 0.5
|
||||
refers to the point between the bottom and the top of
|
||||
the domain of the second y axis.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
layer=None,
|
||||
name=None,
|
||||
opacity=None,
|
||||
sizex=None,
|
||||
sizey=None,
|
||||
sizing=None,
|
||||
source=None,
|
||||
templateitemname=None,
|
||||
visible=None,
|
||||
x=None,
|
||||
xanchor=None,
|
||||
xref=None,
|
||||
y=None,
|
||||
yanchor=None,
|
||||
yref=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Image object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Image`
|
||||
layer
|
||||
Specifies whether images are drawn below or above
|
||||
traces. When `xref` and `yref` are both set to `paper`,
|
||||
image is drawn below the entire plot area.
|
||||
name
|
||||
When used in a template, named items are created in the
|
||||
output figure in addition to any items the figure
|
||||
already has in this array. You can modify these items
|
||||
in the output figure by making your own item with
|
||||
`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 image.
|
||||
sizex
|
||||
Sets the image container size horizontally. The image
|
||||
will be sized based on the `position` value. When
|
||||
`xref` is set to `paper`, units are sized relative to
|
||||
the plot width. When `xref` ends with ` domain`, units
|
||||
are sized relative to the axis width.
|
||||
sizey
|
||||
Sets the image container size vertically. The image
|
||||
will be sized based on the `position` value. When
|
||||
`yref` is set to `paper`, units are sized relative to
|
||||
the plot height. When `yref` ends with ` domain`, units
|
||||
are sized relative to the axis height.
|
||||
sizing
|
||||
Specifies which dimension of the image to constrain.
|
||||
source
|
||||
Specifies the URL of the image to be used. The URL must
|
||||
be accessible from the domain where the plot code is
|
||||
run, and can be either relative or absolute.
|
||||
templateitemname
|
||||
Used to refer to a named item in this array in the
|
||||
template. Named items from the template will be created
|
||||
even without a matching item in the input figure, but
|
||||
you can modify one by making an item with
|
||||
`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 image is visible.
|
||||
x
|
||||
Sets the image's x position. When `xref` is set to
|
||||
`paper`, units are sized relative to the plot height.
|
||||
See `xref` for more info
|
||||
xanchor
|
||||
Sets the anchor for the x position
|
||||
xref
|
||||
Sets the images's x coordinate axis. If set to a x axis
|
||||
id (e.g. "x" or "x2"), the `x` position refers to a x
|
||||
coordinate. If set to "paper", the `x` position refers
|
||||
to the distance from the left of the plotting area in
|
||||
normalized coordinates where 0 (1) corresponds to the
|
||||
left (right). If set to a x axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the
|
||||
domain of that axis: e.g., *x2 domain* refers to the
|
||||
domain of the second x axis and a x position of 0.5
|
||||
refers to the point between the left and the right of
|
||||
the domain of the second x axis.
|
||||
y
|
||||
Sets the image's y position. When `yref` is set to
|
||||
`paper`, units are sized relative to the plot height.
|
||||
See `yref` for more info
|
||||
yanchor
|
||||
Sets the anchor for the y position.
|
||||
yref
|
||||
Sets the images's y coordinate axis. If set to a y axis
|
||||
id (e.g. "y" or "y2"), the `y` position refers to a y
|
||||
coordinate. If set to "paper", the `y` position refers
|
||||
to the distance from the bottom of the plotting area in
|
||||
normalized coordinates where 0 (1) corresponds to the
|
||||
bottom (top). If set to a y axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the
|
||||
domain of that axis: e.g., *y2 domain* refers to the
|
||||
domain of the second y axis and a y position of 0.5
|
||||
refers to the point between the bottom and the top of
|
||||
the domain of the second y axis.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Image
|
||||
"""
|
||||
super().__init__("images")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Image
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Image`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("layer", arg, layer)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._set_property("sizex", arg, sizex)
|
||||
self._set_property("sizey", arg, sizey)
|
||||
self._set_property("sizing", arg, sizing)
|
||||
self._set_property("source", arg, source)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("xref", arg, xref)
|
||||
self._set_property("y", arg, y)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._set_property("yref", arg, yref)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
969
lib/python3.11/site-packages/plotly/graph_objs/layout/_legend.py
Normal file
969
lib/python3.11/site-packages/plotly/graph_objs/layout/_legend.py
Normal file
@ -0,0 +1,969 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Legend(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.legend"
|
||||
_valid_props = {
|
||||
"bgcolor",
|
||||
"bordercolor",
|
||||
"borderwidth",
|
||||
"entrywidth",
|
||||
"entrywidthmode",
|
||||
"font",
|
||||
"groupclick",
|
||||
"grouptitlefont",
|
||||
"indentation",
|
||||
"itemclick",
|
||||
"itemdoubleclick",
|
||||
"itemsizing",
|
||||
"itemwidth",
|
||||
"maxheight",
|
||||
"orientation",
|
||||
"title",
|
||||
"tracegroupgap",
|
||||
"traceorder",
|
||||
"uirevision",
|
||||
"valign",
|
||||
"visible",
|
||||
"x",
|
||||
"xanchor",
|
||||
"xref",
|
||||
"y",
|
||||
"yanchor",
|
||||
"yref",
|
||||
}
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Sets the legend background color. Defaults to
|
||||
`layout.paper_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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def bordercolor(self):
|
||||
"""
|
||||
Sets the color of the border enclosing the legend.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bordercolor"]
|
||||
|
||||
@bordercolor.setter
|
||||
def bordercolor(self, val):
|
||||
self["bordercolor"] = val
|
||||
|
||||
@property
|
||||
def borderwidth(self):
|
||||
"""
|
||||
Sets the width (in px) of the border enclosing the legend.
|
||||
|
||||
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"]
|
||||
|
||||
@borderwidth.setter
|
||||
def borderwidth(self, val):
|
||||
self["borderwidth"] = val
|
||||
|
||||
@property
|
||||
def entrywidth(self):
|
||||
"""
|
||||
Sets the width (in px or fraction) of the legend. Use 0 to size
|
||||
the entry based on the text width, when `entrywidthmode` is set
|
||||
to "pixels".
|
||||
|
||||
The 'entrywidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["entrywidth"]
|
||||
|
||||
@entrywidth.setter
|
||||
def entrywidth(self, val):
|
||||
self["entrywidth"] = val
|
||||
|
||||
@property
|
||||
def entrywidthmode(self):
|
||||
"""
|
||||
Determines what entrywidth means.
|
||||
|
||||
The 'entrywidthmode' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['fraction', 'pixels']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["entrywidthmode"]
|
||||
|
||||
@entrywidthmode.setter
|
||||
def entrywidthmode(self, val):
|
||||
self["entrywidthmode"] = val
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the font used to text the legend items.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.legend.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.legend.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def groupclick(self):
|
||||
"""
|
||||
Determines the behavior on legend group item click.
|
||||
"toggleitem" toggles the visibility of the individual item
|
||||
clicked on the graph. "togglegroup" toggles the visibility of
|
||||
all items in the same legendgroup as the item clicked on the
|
||||
graph.
|
||||
|
||||
The 'groupclick' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['toggleitem', 'togglegroup']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["groupclick"]
|
||||
|
||||
@groupclick.setter
|
||||
def groupclick(self, val):
|
||||
self["groupclick"] = val
|
||||
|
||||
@property
|
||||
def grouptitlefont(self):
|
||||
"""
|
||||
Sets the font for group titles in legend. Defaults to
|
||||
`legend.font` with its size increased about 10%.
|
||||
|
||||
The 'grouptitlefont' property is an instance of Grouptitlefont
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.legend.Grouptitlefont`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Grouptitlefont constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.legend.Grouptitlefont
|
||||
"""
|
||||
return self["grouptitlefont"]
|
||||
|
||||
@grouptitlefont.setter
|
||||
def grouptitlefont(self, val):
|
||||
self["grouptitlefont"] = val
|
||||
|
||||
@property
|
||||
def indentation(self):
|
||||
"""
|
||||
Sets the indentation (in px) of the legend entries.
|
||||
|
||||
The 'indentation' property is a number and may be specified as:
|
||||
- An int or float in the interval [-15, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["indentation"]
|
||||
|
||||
@indentation.setter
|
||||
def indentation(self, val):
|
||||
self["indentation"] = val
|
||||
|
||||
@property
|
||||
def itemclick(self):
|
||||
"""
|
||||
Determines the behavior on legend item click. "toggle" toggles
|
||||
the visibility of the item clicked on the graph. "toggleothers"
|
||||
makes the clicked item the sole visible item on the graph.
|
||||
False disables legend item click interactions.
|
||||
|
||||
The 'itemclick' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['toggle', 'toggleothers', False]
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["itemclick"]
|
||||
|
||||
@itemclick.setter
|
||||
def itemclick(self, val):
|
||||
self["itemclick"] = val
|
||||
|
||||
@property
|
||||
def itemdoubleclick(self):
|
||||
"""
|
||||
Determines the behavior on legend item double-click. "toggle"
|
||||
toggles the visibility of the item clicked on the graph.
|
||||
"toggleothers" makes the clicked item the sole visible item on
|
||||
the graph. False disables legend item double-click
|
||||
interactions.
|
||||
|
||||
The 'itemdoubleclick' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['toggle', 'toggleothers', False]
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["itemdoubleclick"]
|
||||
|
||||
@itemdoubleclick.setter
|
||||
def itemdoubleclick(self, val):
|
||||
self["itemdoubleclick"] = val
|
||||
|
||||
@property
|
||||
def itemsizing(self):
|
||||
"""
|
||||
Determines if the legend items symbols scale with their
|
||||
corresponding "trace" attributes or remain "constant"
|
||||
independent of the symbol size on the graph.
|
||||
|
||||
The 'itemsizing' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['trace', 'constant']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["itemsizing"]
|
||||
|
||||
@itemsizing.setter
|
||||
def itemsizing(self, val):
|
||||
self["itemsizing"] = val
|
||||
|
||||
@property
|
||||
def itemwidth(self):
|
||||
"""
|
||||
Sets the width (in px) of the legend item symbols (the part
|
||||
other than the title.text).
|
||||
|
||||
The 'itemwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [30, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["itemwidth"]
|
||||
|
||||
@itemwidth.setter
|
||||
def itemwidth(self, val):
|
||||
self["itemwidth"] = val
|
||||
|
||||
@property
|
||||
def maxheight(self):
|
||||
"""
|
||||
Sets the max height (in px) of the legend, or max height ratio
|
||||
(reference height * ratio) if less than or equal to 1. Default
|
||||
value is: 0.5 for horizontal legends; 1 for vertical legends.
|
||||
The minimum allowed height is 30px. For a ratio of 0.5, the
|
||||
legend will take up to 50% of the reference height before
|
||||
displaying a scrollbar. The reference height is the full layout
|
||||
height with the following exception: vertically oriented
|
||||
legends with a `yref` of `"paper", located to the side of the
|
||||
plot. In this case, the reference height is the plot height.
|
||||
|
||||
The 'maxheight' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["maxheight"]
|
||||
|
||||
@maxheight.setter
|
||||
def maxheight(self, val):
|
||||
self["maxheight"] = val
|
||||
|
||||
@property
|
||||
def orientation(self):
|
||||
"""
|
||||
Sets the orientation of the legend.
|
||||
|
||||
The 'orientation' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['v', 'h']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["orientation"]
|
||||
|
||||
@orientation.setter
|
||||
def orientation(self, val):
|
||||
self["orientation"] = val
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
"""
|
||||
The 'title' property is an instance of Title
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.legend.Title`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Title constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.legend.Title
|
||||
"""
|
||||
return self["title"]
|
||||
|
||||
@title.setter
|
||||
def title(self, val):
|
||||
self["title"] = val
|
||||
|
||||
@property
|
||||
def tracegroupgap(self):
|
||||
"""
|
||||
Sets the amount of vertical space (in px) between legend
|
||||
groups.
|
||||
|
||||
The 'tracegroupgap' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tracegroupgap"]
|
||||
|
||||
@tracegroupgap.setter
|
||||
def tracegroupgap(self, val):
|
||||
self["tracegroupgap"] = val
|
||||
|
||||
@property
|
||||
def traceorder(self):
|
||||
"""
|
||||
Determines the order at which the legend items are displayed.
|
||||
If "normal", the items are displayed top-to-bottom in the same
|
||||
order as the input data. If "reversed", the items are displayed
|
||||
in the opposite order as "normal". If "grouped", the items are
|
||||
displayed in groups (when a trace `legendgroup` is provided).
|
||||
if "grouped+reversed", the items are displayed in the opposite
|
||||
order as "grouped".
|
||||
|
||||
The 'traceorder' property is a flaglist and may be specified
|
||||
as a string containing:
|
||||
- Any combination of ['reversed', 'grouped'] joined with '+' characters
|
||||
(e.g. 'reversed+grouped')
|
||||
OR exactly one of ['normal'] (e.g. 'normal')
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["traceorder"]
|
||||
|
||||
@traceorder.setter
|
||||
def traceorder(self, val):
|
||||
self["traceorder"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of legend-driven changes in trace and pie
|
||||
label visibility. Defaults to `layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def valign(self):
|
||||
"""
|
||||
Sets the vertical alignment of the symbols with respect to
|
||||
their associated text.
|
||||
|
||||
The 'valign' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top', 'middle', 'bottom']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["valign"]
|
||||
|
||||
@valign.setter
|
||||
def valign(self, val):
|
||||
self["valign"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether or not this legend is visible.
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the x position with respect to `xref` (in normalized
|
||||
coordinates) of the legend. When `xref` is "paper", defaults to
|
||||
1.02 for vertical legends and defaults to 0 for horizontal
|
||||
legends. When `xref` is "container", defaults to 1 for vertical
|
||||
legends and defaults to 0 for horizontal legends. Must be
|
||||
between 0 and 1 if `xref` is "container". and between "-2" and
|
||||
3 if `xref` is "paper".
|
||||
|
||||
The 'x' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def xanchor(self):
|
||||
"""
|
||||
Sets the legend's horizontal position anchor. This anchor binds
|
||||
the `x` position to the "left", "center" or "right" of the
|
||||
legend. Value "auto" anchors legends to the right for `x`
|
||||
values greater than or equal to 2/3, anchors legends to the
|
||||
left for `x` values less than or equal to 1/3 and anchors
|
||||
legends with respect to their center otherwise.
|
||||
|
||||
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"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
def xref(self):
|
||||
"""
|
||||
Sets the container `x` refers to. "container" spans the entire
|
||||
`width` of the plot. "paper" refers to the width of the
|
||||
plotting area only.
|
||||
|
||||
The 'xref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['container', 'paper']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xref"]
|
||||
|
||||
@xref.setter
|
||||
def xref(self, val):
|
||||
self["xref"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the y position with respect to `yref` (in normalized
|
||||
coordinates) of the legend. When `yref` is "paper", defaults to
|
||||
1 for vertical legends, defaults to "-0.1" for horizontal
|
||||
legends on graphs w/o range sliders and defaults to 1.1 for
|
||||
horizontal legends on graph with one or multiple range sliders.
|
||||
When `yref` is "container", defaults to 1. Must be between 0
|
||||
and 1 if `yref` is "container" and between "-2" and 3 if `yref`
|
||||
is "paper".
|
||||
|
||||
The 'y' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def yanchor(self):
|
||||
"""
|
||||
Sets the legend's vertical position anchor. This anchor binds
|
||||
the `y` position to the "top", "middle" or "bottom" of the
|
||||
legend. Value "auto" anchors legends at their bottom for `y`
|
||||
values less than or equal to 1/3, anchors legends to at their
|
||||
top for `y` values greater than or equal to 2/3 and anchors
|
||||
legends with respect to their middle otherwise.
|
||||
|
||||
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"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def yref(self):
|
||||
"""
|
||||
Sets the container `y` refers to. "container" spans the entire
|
||||
`height` of the plot. "paper" refers to the height of the
|
||||
plotting area only.
|
||||
|
||||
The 'yref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['container', 'paper']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yref"]
|
||||
|
||||
@yref.setter
|
||||
def yref(self, val):
|
||||
self["yref"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
bgcolor
|
||||
Sets the legend background color. Defaults to
|
||||
`layout.paper_bgcolor`.
|
||||
bordercolor
|
||||
Sets the color of the border enclosing the legend.
|
||||
borderwidth
|
||||
Sets the width (in px) of the border enclosing the
|
||||
legend.
|
||||
entrywidth
|
||||
Sets the width (in px or fraction) of the legend. Use 0
|
||||
to size the entry based on the text width, when
|
||||
`entrywidthmode` is set to "pixels".
|
||||
entrywidthmode
|
||||
Determines what entrywidth means.
|
||||
font
|
||||
Sets the font used to text the legend items.
|
||||
groupclick
|
||||
Determines the behavior on legend group item click.
|
||||
"toggleitem" toggles the visibility of the individual
|
||||
item clicked on the graph. "togglegroup" toggles the
|
||||
visibility of all items in the same legendgroup as the
|
||||
item clicked on the graph.
|
||||
grouptitlefont
|
||||
Sets the font for group titles in legend. Defaults to
|
||||
`legend.font` with its size increased about 10%.
|
||||
indentation
|
||||
Sets the indentation (in px) of the legend entries.
|
||||
itemclick
|
||||
Determines the behavior on legend item click. "toggle"
|
||||
toggles the visibility of the item clicked on the
|
||||
graph. "toggleothers" makes the clicked item the sole
|
||||
visible item on the graph. False disables legend item
|
||||
click interactions.
|
||||
itemdoubleclick
|
||||
Determines the behavior on legend item double-click.
|
||||
"toggle" toggles the visibility of the item clicked on
|
||||
the graph. "toggleothers" makes the clicked item the
|
||||
sole visible item on the graph. False disables legend
|
||||
item double-click interactions.
|
||||
itemsizing
|
||||
Determines if the legend items symbols scale with their
|
||||
corresponding "trace" attributes or remain "constant"
|
||||
independent of the symbol size on the graph.
|
||||
itemwidth
|
||||
Sets the width (in px) of the legend item symbols (the
|
||||
part other than the title.text).
|
||||
maxheight
|
||||
Sets the max height (in px) of the legend, or max
|
||||
height ratio (reference height * ratio) if less than or
|
||||
equal to 1. Default value is: 0.5 for horizontal
|
||||
legends; 1 for vertical legends. The minimum allowed
|
||||
height is 30px. For a ratio of 0.5, the legend will
|
||||
take up to 50% of the reference height before
|
||||
displaying a scrollbar. The reference height is the
|
||||
full layout height with the following exception:
|
||||
vertically oriented legends with a `yref` of `"paper",
|
||||
located to the side of the plot. In this case, the
|
||||
reference height is the plot height.
|
||||
orientation
|
||||
Sets the orientation of the legend.
|
||||
title
|
||||
:class:`plotly.graph_objects.layout.legend.Title`
|
||||
instance or dict with compatible properties
|
||||
tracegroupgap
|
||||
Sets the amount of vertical space (in px) between
|
||||
legend groups.
|
||||
traceorder
|
||||
Determines the order at which the legend items are
|
||||
displayed. If "normal", the items are displayed top-to-
|
||||
bottom in the same order as the input data. If
|
||||
"reversed", the items are displayed in the opposite
|
||||
order as "normal". If "grouped", the items are
|
||||
displayed in groups (when a trace `legendgroup` is
|
||||
provided). if "grouped+reversed", the items are
|
||||
displayed in the opposite order as "grouped".
|
||||
uirevision
|
||||
Controls persistence of legend-driven changes in trace
|
||||
and pie label visibility. Defaults to
|
||||
`layout.uirevision`.
|
||||
valign
|
||||
Sets the vertical alignment of the symbols with respect
|
||||
to their associated text.
|
||||
visible
|
||||
Determines whether or not this legend is visible.
|
||||
x
|
||||
Sets the x position with respect to `xref` (in
|
||||
normalized coordinates) of the legend. When `xref` is
|
||||
"paper", defaults to 1.02 for vertical legends and
|
||||
defaults to 0 for horizontal legends. When `xref` is
|
||||
"container", defaults to 1 for vertical legends and
|
||||
defaults to 0 for horizontal legends. Must be between 0
|
||||
and 1 if `xref` is "container". and between "-2" and 3
|
||||
if `xref` is "paper".
|
||||
xanchor
|
||||
Sets the legend's horizontal position anchor. This
|
||||
anchor binds the `x` position to the "left", "center"
|
||||
or "right" of the legend. Value "auto" anchors legends
|
||||
to the right for `x` values greater than or equal to
|
||||
2/3, anchors legends to the left for `x` values less
|
||||
than or equal to 1/3 and anchors legends with respect
|
||||
to their center otherwise.
|
||||
xref
|
||||
Sets the container `x` refers to. "container" spans the
|
||||
entire `width` of the plot. "paper" refers to the width
|
||||
of the plotting area only.
|
||||
y
|
||||
Sets the y position with respect to `yref` (in
|
||||
normalized coordinates) of the legend. When `yref` is
|
||||
"paper", defaults to 1 for vertical legends, defaults
|
||||
to "-0.1" for horizontal legends on graphs w/o range
|
||||
sliders and defaults to 1.1 for horizontal legends on
|
||||
graph with one or multiple range sliders. When `yref`
|
||||
is "container", defaults to 1. Must be between 0 and 1
|
||||
if `yref` is "container" and between "-2" and 3 if
|
||||
`yref` is "paper".
|
||||
yanchor
|
||||
Sets the legend's vertical position anchor. This anchor
|
||||
binds the `y` position to the "top", "middle" or
|
||||
"bottom" of the legend. Value "auto" anchors legends at
|
||||
their bottom for `y` values less than or equal to 1/3,
|
||||
anchors legends to at their top for `y` values greater
|
||||
than or equal to 2/3 and anchors legends with respect
|
||||
to their middle otherwise.
|
||||
yref
|
||||
Sets the container `y` refers to. "container" spans the
|
||||
entire `height` of the plot. "paper" refers to the
|
||||
height of the plotting area only.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
bgcolor=None,
|
||||
bordercolor=None,
|
||||
borderwidth=None,
|
||||
entrywidth=None,
|
||||
entrywidthmode=None,
|
||||
font=None,
|
||||
groupclick=None,
|
||||
grouptitlefont=None,
|
||||
indentation=None,
|
||||
itemclick=None,
|
||||
itemdoubleclick=None,
|
||||
itemsizing=None,
|
||||
itemwidth=None,
|
||||
maxheight=None,
|
||||
orientation=None,
|
||||
title=None,
|
||||
tracegroupgap=None,
|
||||
traceorder=None,
|
||||
uirevision=None,
|
||||
valign=None,
|
||||
visible=None,
|
||||
x=None,
|
||||
xanchor=None,
|
||||
xref=None,
|
||||
y=None,
|
||||
yanchor=None,
|
||||
yref=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Legend object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Legend`
|
||||
bgcolor
|
||||
Sets the legend background color. Defaults to
|
||||
`layout.paper_bgcolor`.
|
||||
bordercolor
|
||||
Sets the color of the border enclosing the legend.
|
||||
borderwidth
|
||||
Sets the width (in px) of the border enclosing the
|
||||
legend.
|
||||
entrywidth
|
||||
Sets the width (in px or fraction) of the legend. Use 0
|
||||
to size the entry based on the text width, when
|
||||
`entrywidthmode` is set to "pixels".
|
||||
entrywidthmode
|
||||
Determines what entrywidth means.
|
||||
font
|
||||
Sets the font used to text the legend items.
|
||||
groupclick
|
||||
Determines the behavior on legend group item click.
|
||||
"toggleitem" toggles the visibility of the individual
|
||||
item clicked on the graph. "togglegroup" toggles the
|
||||
visibility of all items in the same legendgroup as the
|
||||
item clicked on the graph.
|
||||
grouptitlefont
|
||||
Sets the font for group titles in legend. Defaults to
|
||||
`legend.font` with its size increased about 10%.
|
||||
indentation
|
||||
Sets the indentation (in px) of the legend entries.
|
||||
itemclick
|
||||
Determines the behavior on legend item click. "toggle"
|
||||
toggles the visibility of the item clicked on the
|
||||
graph. "toggleothers" makes the clicked item the sole
|
||||
visible item on the graph. False disables legend item
|
||||
click interactions.
|
||||
itemdoubleclick
|
||||
Determines the behavior on legend item double-click.
|
||||
"toggle" toggles the visibility of the item clicked on
|
||||
the graph. "toggleothers" makes the clicked item the
|
||||
sole visible item on the graph. False disables legend
|
||||
item double-click interactions.
|
||||
itemsizing
|
||||
Determines if the legend items symbols scale with their
|
||||
corresponding "trace" attributes or remain "constant"
|
||||
independent of the symbol size on the graph.
|
||||
itemwidth
|
||||
Sets the width (in px) of the legend item symbols (the
|
||||
part other than the title.text).
|
||||
maxheight
|
||||
Sets the max height (in px) of the legend, or max
|
||||
height ratio (reference height * ratio) if less than or
|
||||
equal to 1. Default value is: 0.5 for horizontal
|
||||
legends; 1 for vertical legends. The minimum allowed
|
||||
height is 30px. For a ratio of 0.5, the legend will
|
||||
take up to 50% of the reference height before
|
||||
displaying a scrollbar. The reference height is the
|
||||
full layout height with the following exception:
|
||||
vertically oriented legends with a `yref` of `"paper",
|
||||
located to the side of the plot. In this case, the
|
||||
reference height is the plot height.
|
||||
orientation
|
||||
Sets the orientation of the legend.
|
||||
title
|
||||
:class:`plotly.graph_objects.layout.legend.Title`
|
||||
instance or dict with compatible properties
|
||||
tracegroupgap
|
||||
Sets the amount of vertical space (in px) between
|
||||
legend groups.
|
||||
traceorder
|
||||
Determines the order at which the legend items are
|
||||
displayed. If "normal", the items are displayed top-to-
|
||||
bottom in the same order as the input data. If
|
||||
"reversed", the items are displayed in the opposite
|
||||
order as "normal". If "grouped", the items are
|
||||
displayed in groups (when a trace `legendgroup` is
|
||||
provided). if "grouped+reversed", the items are
|
||||
displayed in the opposite order as "grouped".
|
||||
uirevision
|
||||
Controls persistence of legend-driven changes in trace
|
||||
and pie label visibility. Defaults to
|
||||
`layout.uirevision`.
|
||||
valign
|
||||
Sets the vertical alignment of the symbols with respect
|
||||
to their associated text.
|
||||
visible
|
||||
Determines whether or not this legend is visible.
|
||||
x
|
||||
Sets the x position with respect to `xref` (in
|
||||
normalized coordinates) of the legend. When `xref` is
|
||||
"paper", defaults to 1.02 for vertical legends and
|
||||
defaults to 0 for horizontal legends. When `xref` is
|
||||
"container", defaults to 1 for vertical legends and
|
||||
defaults to 0 for horizontal legends. Must be between 0
|
||||
and 1 if `xref` is "container". and between "-2" and 3
|
||||
if `xref` is "paper".
|
||||
xanchor
|
||||
Sets the legend's horizontal position anchor. This
|
||||
anchor binds the `x` position to the "left", "center"
|
||||
or "right" of the legend. Value "auto" anchors legends
|
||||
to the right for `x` values greater than or equal to
|
||||
2/3, anchors legends to the left for `x` values less
|
||||
than or equal to 1/3 and anchors legends with respect
|
||||
to their center otherwise.
|
||||
xref
|
||||
Sets the container `x` refers to. "container" spans the
|
||||
entire `width` of the plot. "paper" refers to the width
|
||||
of the plotting area only.
|
||||
y
|
||||
Sets the y position with respect to `yref` (in
|
||||
normalized coordinates) of the legend. When `yref` is
|
||||
"paper", defaults to 1 for vertical legends, defaults
|
||||
to "-0.1" for horizontal legends on graphs w/o range
|
||||
sliders and defaults to 1.1 for horizontal legends on
|
||||
graph with one or multiple range sliders. When `yref`
|
||||
is "container", defaults to 1. Must be between 0 and 1
|
||||
if `yref` is "container" and between "-2" and 3 if
|
||||
`yref` is "paper".
|
||||
yanchor
|
||||
Sets the legend's vertical position anchor. This anchor
|
||||
binds the `y` position to the "top", "middle" or
|
||||
"bottom" of the legend. Value "auto" anchors legends at
|
||||
their bottom for `y` values less than or equal to 1/3,
|
||||
anchors legends to at their top for `y` values greater
|
||||
than or equal to 2/3 and anchors legends with respect
|
||||
to their middle otherwise.
|
||||
yref
|
||||
Sets the container `y` refers to. "container" spans the
|
||||
entire `height` of the plot. "paper" refers to the
|
||||
height of the plotting area only.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Legend
|
||||
"""
|
||||
super().__init__("legend")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Legend
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Legend`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("bordercolor", arg, bordercolor)
|
||||
self._set_property("borderwidth", arg, borderwidth)
|
||||
self._set_property("entrywidth", arg, entrywidth)
|
||||
self._set_property("entrywidthmode", arg, entrywidthmode)
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("groupclick", arg, groupclick)
|
||||
self._set_property("grouptitlefont", arg, grouptitlefont)
|
||||
self._set_property("indentation", arg, indentation)
|
||||
self._set_property("itemclick", arg, itemclick)
|
||||
self._set_property("itemdoubleclick", arg, itemdoubleclick)
|
||||
self._set_property("itemsizing", arg, itemsizing)
|
||||
self._set_property("itemwidth", arg, itemwidth)
|
||||
self._set_property("maxheight", arg, maxheight)
|
||||
self._set_property("orientation", arg, orientation)
|
||||
self._set_property("title", arg, title)
|
||||
self._set_property("tracegroupgap", arg, tracegroupgap)
|
||||
self._set_property("traceorder", arg, traceorder)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._set_property("valign", arg, valign)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("xref", arg, xref)
|
||||
self._set_property("y", arg, y)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._set_property("yref", arg, yref)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
392
lib/python3.11/site-packages/plotly/graph_objs/layout/_map.py
Normal file
392
lib/python3.11/site-packages/plotly/graph_objs/layout/_map.py
Normal file
@ -0,0 +1,392 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Map(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.map"
|
||||
_valid_props = {
|
||||
"bearing",
|
||||
"bounds",
|
||||
"center",
|
||||
"domain",
|
||||
"layerdefaults",
|
||||
"layers",
|
||||
"pitch",
|
||||
"style",
|
||||
"uirevision",
|
||||
"zoom",
|
||||
}
|
||||
|
||||
@property
|
||||
def bearing(self):
|
||||
"""
|
||||
Sets the bearing angle of the map in degrees counter-clockwise
|
||||
from North (map.bearing).
|
||||
|
||||
The 'bearing' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["bearing"]
|
||||
|
||||
@bearing.setter
|
||||
def bearing(self, val):
|
||||
self["bearing"] = val
|
||||
|
||||
@property
|
||||
def bounds(self):
|
||||
"""
|
||||
The 'bounds' property is an instance of Bounds
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.Bounds`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Bounds constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.Bounds
|
||||
"""
|
||||
return self["bounds"]
|
||||
|
||||
@bounds.setter
|
||||
def bounds(self, val):
|
||||
self["bounds"] = val
|
||||
|
||||
@property
|
||||
def center(self):
|
||||
"""
|
||||
The 'center' property is an instance of Center
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.Center`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Center constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.Center
|
||||
"""
|
||||
return self["center"]
|
||||
|
||||
@center.setter
|
||||
def center(self, val):
|
||||
self["center"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def layers(self):
|
||||
"""
|
||||
The 'layers' property is a tuple of instances of
|
||||
Layer that may be specified as:
|
||||
- A list or tuple of instances of plotly.graph_objs.layout.map.Layer
|
||||
- A list or tuple of dicts of string/value properties that
|
||||
will be passed to the Layer constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
tuple[plotly.graph_objs.layout.map.Layer]
|
||||
"""
|
||||
return self["layers"]
|
||||
|
||||
@layers.setter
|
||||
def layers(self, val):
|
||||
self["layers"] = val
|
||||
|
||||
@property
|
||||
def layerdefaults(self):
|
||||
"""
|
||||
When used in a template (as
|
||||
layout.template.layout.map.layerdefaults), sets the default
|
||||
property values to use for elements of layout.map.layers
|
||||
|
||||
The 'layerdefaults' property is an instance of Layer
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.Layer`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Layer constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.Layer
|
||||
"""
|
||||
return self["layerdefaults"]
|
||||
|
||||
@layerdefaults.setter
|
||||
def layerdefaults(self, val):
|
||||
self["layerdefaults"] = val
|
||||
|
||||
@property
|
||||
def pitch(self):
|
||||
"""
|
||||
Sets the pitch angle of the map (in degrees, where 0 means
|
||||
perpendicular to the surface of the map) (map.pitch).
|
||||
|
||||
The 'pitch' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["pitch"]
|
||||
|
||||
@pitch.setter
|
||||
def pitch(self, val):
|
||||
self["pitch"] = val
|
||||
|
||||
@property
|
||||
def style(self):
|
||||
"""
|
||||
Defines the map layers that are rendered by default below the
|
||||
trace layers defined in `data`, which are themselves by default
|
||||
rendered below the layers defined in `layout.map.layers`.
|
||||
These layers can be defined either explicitly as a Map Style
|
||||
object which can contain multiple layer definitions that load
|
||||
data from any public or private Tile Map Service (TMS or XYZ)
|
||||
or Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes or by using a custom
|
||||
style URL Map Style objects are of the form described in the
|
||||
MapLibre GL JS documentation available at
|
||||
https://maplibre.org/maplibre-style-spec/ The built-in
|
||||
plotly.js styles objects are: basic, carto-darkmatter, carto-
|
||||
darkmatter-nolabels, carto-positron, carto-positron-nolabels,
|
||||
carto-voyager, carto-voyager-nolabels, dark, light, open-
|
||||
street-map, outdoors, satellite, satellite-streets, streets,
|
||||
white-bg.
|
||||
|
||||
The 'style' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["style"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes in the view:
|
||||
`center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def zoom(self):
|
||||
"""
|
||||
Sets the zoom level of the map (map.zoom).
|
||||
|
||||
The 'zoom' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["zoom"]
|
||||
|
||||
@zoom.setter
|
||||
def zoom(self, val):
|
||||
self["zoom"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
bearing
|
||||
Sets the bearing angle of the map in degrees counter-
|
||||
clockwise from North (map.bearing).
|
||||
bounds
|
||||
:class:`plotly.graph_objects.layout.map.Bounds`
|
||||
instance or dict with compatible properties
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.map.Center`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.map.Domain`
|
||||
instance or dict with compatible properties
|
||||
layers
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.map.Layer`
|
||||
instances or dicts with compatible properties
|
||||
layerdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.map.layerdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.map.layers
|
||||
pitch
|
||||
Sets the pitch angle of the map (in degrees, where 0
|
||||
means perpendicular to the surface of the map)
|
||||
(map.pitch).
|
||||
style
|
||||
Defines the map layers that are rendered by default
|
||||
below the trace layers defined in `data`, which are
|
||||
themselves by default rendered below the layers defined
|
||||
in `layout.map.layers`. These layers can be defined
|
||||
either explicitly as a Map Style object which can
|
||||
contain multiple layer definitions that load data from
|
||||
any public or private Tile Map Service (TMS or XYZ) or
|
||||
Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes or by using a
|
||||
custom style URL Map Style objects are of the form
|
||||
described in the MapLibre GL JS documentation available
|
||||
at https://maplibre.org/maplibre-style-spec/ The
|
||||
built-in plotly.js styles objects are: basic, carto-
|
||||
darkmatter, carto-darkmatter-nolabels, carto-positron,
|
||||
carto-positron-nolabels, carto-voyager, carto-voyager-
|
||||
nolabels, dark, light, open-street-map, outdoors,
|
||||
satellite, satellite-streets, streets, white-bg.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the
|
||||
view: `center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
zoom
|
||||
Sets the zoom level of the map (map.zoom).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
bearing=None,
|
||||
bounds=None,
|
||||
center=None,
|
||||
domain=None,
|
||||
layers=None,
|
||||
layerdefaults=None,
|
||||
pitch=None,
|
||||
style=None,
|
||||
uirevision=None,
|
||||
zoom=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Map object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Map`
|
||||
bearing
|
||||
Sets the bearing angle of the map in degrees counter-
|
||||
clockwise from North (map.bearing).
|
||||
bounds
|
||||
:class:`plotly.graph_objects.layout.map.Bounds`
|
||||
instance or dict with compatible properties
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.map.Center`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.map.Domain`
|
||||
instance or dict with compatible properties
|
||||
layers
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.map.Layer`
|
||||
instances or dicts with compatible properties
|
||||
layerdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.map.layerdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.map.layers
|
||||
pitch
|
||||
Sets the pitch angle of the map (in degrees, where 0
|
||||
means perpendicular to the surface of the map)
|
||||
(map.pitch).
|
||||
style
|
||||
Defines the map layers that are rendered by default
|
||||
below the trace layers defined in `data`, which are
|
||||
themselves by default rendered below the layers defined
|
||||
in `layout.map.layers`. These layers can be defined
|
||||
either explicitly as a Map Style object which can
|
||||
contain multiple layer definitions that load data from
|
||||
any public or private Tile Map Service (TMS or XYZ) or
|
||||
Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes or by using a
|
||||
custom style URL Map Style objects are of the form
|
||||
described in the MapLibre GL JS documentation available
|
||||
at https://maplibre.org/maplibre-style-spec/ The
|
||||
built-in plotly.js styles objects are: basic, carto-
|
||||
darkmatter, carto-darkmatter-nolabels, carto-positron,
|
||||
carto-positron-nolabels, carto-voyager, carto-voyager-
|
||||
nolabels, dark, light, open-street-map, outdoors,
|
||||
satellite, satellite-streets, streets, white-bg.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the
|
||||
view: `center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
zoom
|
||||
Sets the zoom level of the map (map.zoom).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Map
|
||||
"""
|
||||
super().__init__("map")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Map
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Map`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("bearing", arg, bearing)
|
||||
self._set_property("bounds", arg, bounds)
|
||||
self._set_property("center", arg, center)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("layers", arg, layers)
|
||||
self._set_property("layerdefaults", arg, layerdefaults)
|
||||
self._set_property("pitch", arg, pitch)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._set_property("zoom", arg, zoom)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
452
lib/python3.11/site-packages/plotly/graph_objs/layout/_mapbox.py
Normal file
452
lib/python3.11/site-packages/plotly/graph_objs/layout/_mapbox.py
Normal file
@ -0,0 +1,452 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Mapbox(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.mapbox"
|
||||
_valid_props = {
|
||||
"accesstoken",
|
||||
"bearing",
|
||||
"bounds",
|
||||
"center",
|
||||
"domain",
|
||||
"layerdefaults",
|
||||
"layers",
|
||||
"pitch",
|
||||
"style",
|
||||
"uirevision",
|
||||
"zoom",
|
||||
}
|
||||
|
||||
@property
|
||||
def accesstoken(self):
|
||||
"""
|
||||
Sets the mapbox access token to be used for this mapbox map.
|
||||
Alternatively, the mapbox access token can be set in the
|
||||
configuration options under `mapboxAccessToken`. Note that
|
||||
accessToken are only required when `style` (e.g with values :
|
||||
basic, streets, outdoors, light, dark, satellite, satellite-
|
||||
streets ) and/or a layout layer references the Mapbox server.
|
||||
|
||||
The 'accesstoken' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["accesstoken"]
|
||||
|
||||
@accesstoken.setter
|
||||
def accesstoken(self, val):
|
||||
self["accesstoken"] = val
|
||||
|
||||
@property
|
||||
def bearing(self):
|
||||
"""
|
||||
Sets the bearing angle of the map in degrees counter-clockwise
|
||||
from North (mapbox.bearing).
|
||||
|
||||
The 'bearing' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["bearing"]
|
||||
|
||||
@bearing.setter
|
||||
def bearing(self, val):
|
||||
self["bearing"] = val
|
||||
|
||||
@property
|
||||
def bounds(self):
|
||||
"""
|
||||
The 'bounds' property is an instance of Bounds
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.Bounds`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Bounds constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.Bounds
|
||||
"""
|
||||
return self["bounds"]
|
||||
|
||||
@bounds.setter
|
||||
def bounds(self, val):
|
||||
self["bounds"] = val
|
||||
|
||||
@property
|
||||
def center(self):
|
||||
"""
|
||||
The 'center' property is an instance of Center
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.Center`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Center constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.Center
|
||||
"""
|
||||
return self["center"]
|
||||
|
||||
@center.setter
|
||||
def center(self, val):
|
||||
self["center"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def layers(self):
|
||||
"""
|
||||
The 'layers' property is a tuple of instances of
|
||||
Layer that may be specified as:
|
||||
- A list or tuple of instances of plotly.graph_objs.layout.mapbox.Layer
|
||||
- A list or tuple of dicts of string/value properties that
|
||||
will be passed to the Layer constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
tuple[plotly.graph_objs.layout.mapbox.Layer]
|
||||
"""
|
||||
return self["layers"]
|
||||
|
||||
@layers.setter
|
||||
def layers(self, val):
|
||||
self["layers"] = val
|
||||
|
||||
@property
|
||||
def layerdefaults(self):
|
||||
"""
|
||||
When used in a template (as
|
||||
layout.template.layout.mapbox.layerdefaults), sets the default
|
||||
property values to use for elements of layout.mapbox.layers
|
||||
|
||||
The 'layerdefaults' property is an instance of Layer
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.Layer`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Layer constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.Layer
|
||||
"""
|
||||
return self["layerdefaults"]
|
||||
|
||||
@layerdefaults.setter
|
||||
def layerdefaults(self, val):
|
||||
self["layerdefaults"] = val
|
||||
|
||||
@property
|
||||
def pitch(self):
|
||||
"""
|
||||
Sets the pitch angle of the map (in degrees, where 0 means
|
||||
perpendicular to the surface of the map) (mapbox.pitch).
|
||||
|
||||
The 'pitch' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["pitch"]
|
||||
|
||||
@pitch.setter
|
||||
def pitch(self, val):
|
||||
self["pitch"] = val
|
||||
|
||||
@property
|
||||
def style(self):
|
||||
"""
|
||||
Defines the map layers that are rendered by default below the
|
||||
trace layers defined in `data`, which are themselves by default
|
||||
rendered below the layers defined in `layout.mapbox.layers`.
|
||||
These layers can be defined either explicitly as a Mapbox Style
|
||||
object which can contain multiple layer definitions that load
|
||||
data from any public or private Tile Map Service (TMS or XYZ)
|
||||
or Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes which do not require any
|
||||
access tokens, or by using a default Mapbox style or custom
|
||||
Mapbox style URL, both of which require a Mapbox access token
|
||||
Note that Mapbox access token can be set in the `accesstoken`
|
||||
attribute or in the `mapboxAccessToken` config option. Mapbox
|
||||
Style objects are of the form described in the Mapbox GL JS
|
||||
documentation available at https://docs.mapbox.com/mapbox-gl-
|
||||
js/style-spec The built-in plotly.js styles objects are:
|
||||
carto-darkmatter, carto-positron, open-street-map, stamen-
|
||||
terrain, stamen-toner, stamen-watercolor, white-bg The built-
|
||||
in Mapbox styles are: basic, streets, outdoors, light, dark,
|
||||
satellite, satellite-streets Mapbox style URLs are of the
|
||||
form: mapbox://mapbox.mapbox-<name>-<version>
|
||||
|
||||
The 'style' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["style"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes in the view:
|
||||
`center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def zoom(self):
|
||||
"""
|
||||
Sets the zoom level of the map (mapbox.zoom).
|
||||
|
||||
The 'zoom' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["zoom"]
|
||||
|
||||
@zoom.setter
|
||||
def zoom(self, val):
|
||||
self["zoom"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
accesstoken
|
||||
Sets the mapbox access token to be used for this mapbox
|
||||
map. Alternatively, the mapbox access token can be set
|
||||
in the configuration options under `mapboxAccessToken`.
|
||||
Note that accessToken are only required when `style`
|
||||
(e.g with values : basic, streets, outdoors, light,
|
||||
dark, satellite, satellite-streets ) and/or a layout
|
||||
layer references the Mapbox server.
|
||||
bearing
|
||||
Sets the bearing angle of the map in degrees counter-
|
||||
clockwise from North (mapbox.bearing).
|
||||
bounds
|
||||
:class:`plotly.graph_objects.layout.mapbox.Bounds`
|
||||
instance or dict with compatible properties
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.mapbox.Center`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.mapbox.Domain`
|
||||
instance or dict with compatible properties
|
||||
layers
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.mapbox.Layer`
|
||||
instances or dicts with compatible properties
|
||||
layerdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.mapbox.layerdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.mapbox.layers
|
||||
pitch
|
||||
Sets the pitch angle of the map (in degrees, where 0
|
||||
means perpendicular to the surface of the map)
|
||||
(mapbox.pitch).
|
||||
style
|
||||
Defines the map layers that are rendered by default
|
||||
below the trace layers defined in `data`, which are
|
||||
themselves by default rendered below the layers defined
|
||||
in `layout.mapbox.layers`. These layers can be defined
|
||||
either explicitly as a Mapbox Style object which can
|
||||
contain multiple layer definitions that load data from
|
||||
any public or private Tile Map Service (TMS or XYZ) or
|
||||
Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes which do not
|
||||
require any access tokens, or by using a default Mapbox
|
||||
style or custom Mapbox style URL, both of which require
|
||||
a Mapbox access token Note that Mapbox access token
|
||||
can be set in the `accesstoken` attribute or in the
|
||||
`mapboxAccessToken` config option. Mapbox Style
|
||||
objects are of the form described in the Mapbox GL JS
|
||||
documentation available at
|
||||
https://docs.mapbox.com/mapbox-gl-js/style-spec The
|
||||
built-in plotly.js styles objects are: carto-
|
||||
darkmatter, carto-positron, open-street-map, stamen-
|
||||
terrain, stamen-toner, stamen-watercolor, white-bg The
|
||||
built-in Mapbox styles are: basic, streets, outdoors,
|
||||
light, dark, satellite, satellite-streets Mapbox style
|
||||
URLs are of the form:
|
||||
mapbox://mapbox.mapbox-<name>-<version>
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the
|
||||
view: `center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
zoom
|
||||
Sets the zoom level of the map (mapbox.zoom).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
accesstoken=None,
|
||||
bearing=None,
|
||||
bounds=None,
|
||||
center=None,
|
||||
domain=None,
|
||||
layers=None,
|
||||
layerdefaults=None,
|
||||
pitch=None,
|
||||
style=None,
|
||||
uirevision=None,
|
||||
zoom=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Mapbox object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Mapbox`
|
||||
accesstoken
|
||||
Sets the mapbox access token to be used for this mapbox
|
||||
map. Alternatively, the mapbox access token can be set
|
||||
in the configuration options under `mapboxAccessToken`.
|
||||
Note that accessToken are only required when `style`
|
||||
(e.g with values : basic, streets, outdoors, light,
|
||||
dark, satellite, satellite-streets ) and/or a layout
|
||||
layer references the Mapbox server.
|
||||
bearing
|
||||
Sets the bearing angle of the map in degrees counter-
|
||||
clockwise from North (mapbox.bearing).
|
||||
bounds
|
||||
:class:`plotly.graph_objects.layout.mapbox.Bounds`
|
||||
instance or dict with compatible properties
|
||||
center
|
||||
:class:`plotly.graph_objects.layout.mapbox.Center`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.mapbox.Domain`
|
||||
instance or dict with compatible properties
|
||||
layers
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.mapbox.Layer`
|
||||
instances or dicts with compatible properties
|
||||
layerdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.mapbox.layerdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.mapbox.layers
|
||||
pitch
|
||||
Sets the pitch angle of the map (in degrees, where 0
|
||||
means perpendicular to the surface of the map)
|
||||
(mapbox.pitch).
|
||||
style
|
||||
Defines the map layers that are rendered by default
|
||||
below the trace layers defined in `data`, which are
|
||||
themselves by default rendered below the layers defined
|
||||
in `layout.mapbox.layers`. These layers can be defined
|
||||
either explicitly as a Mapbox Style object which can
|
||||
contain multiple layer definitions that load data from
|
||||
any public or private Tile Map Service (TMS or XYZ) or
|
||||
Web Map Service (WMS) or implicitly by using one of the
|
||||
built-in style objects which use WMSes which do not
|
||||
require any access tokens, or by using a default Mapbox
|
||||
style or custom Mapbox style URL, both of which require
|
||||
a Mapbox access token Note that Mapbox access token
|
||||
can be set in the `accesstoken` attribute or in the
|
||||
`mapboxAccessToken` config option. Mapbox Style
|
||||
objects are of the form described in the Mapbox GL JS
|
||||
documentation available at
|
||||
https://docs.mapbox.com/mapbox-gl-js/style-spec The
|
||||
built-in plotly.js styles objects are: carto-
|
||||
darkmatter, carto-positron, open-street-map, stamen-
|
||||
terrain, stamen-toner, stamen-watercolor, white-bg The
|
||||
built-in Mapbox styles are: basic, streets, outdoors,
|
||||
light, dark, satellite, satellite-streets Mapbox style
|
||||
URLs are of the form:
|
||||
mapbox://mapbox.mapbox-<name>-<version>
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in the
|
||||
view: `center`, `zoom`, `bearing`, `pitch`. Defaults to
|
||||
`layout.uirevision`.
|
||||
zoom
|
||||
Sets the zoom level of the map (mapbox.zoom).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Mapbox
|
||||
"""
|
||||
super().__init__("mapbox")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Mapbox
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Mapbox`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("accesstoken", arg, accesstoken)
|
||||
self._set_property("bearing", arg, bearing)
|
||||
self._set_property("bounds", arg, bounds)
|
||||
self._set_property("center", arg, center)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("layers", arg, layers)
|
||||
self._set_property("layerdefaults", arg, layerdefaults)
|
||||
self._set_property("pitch", arg, pitch)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._set_property("zoom", arg, zoom)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
212
lib/python3.11/site-packages/plotly/graph_objs/layout/_margin.py
Normal file
212
lib/python3.11/site-packages/plotly/graph_objs/layout/_margin.py
Normal file
@ -0,0 +1,212 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Margin(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.margin"
|
||||
_valid_props = {"autoexpand", "b", "l", "pad", "r", "t"}
|
||||
|
||||
@property
|
||||
def autoexpand(self):
|
||||
"""
|
||||
Turns on/off margin expansion computations. Legends, colorbars,
|
||||
updatemenus, sliders, axis rangeselector and rangeslider are
|
||||
allowed to push the margins by defaults.
|
||||
|
||||
The 'autoexpand' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["autoexpand"]
|
||||
|
||||
@autoexpand.setter
|
||||
def autoexpand(self, val):
|
||||
self["autoexpand"] = val
|
||||
|
||||
@property
|
||||
def b(self):
|
||||
"""
|
||||
Sets the bottom margin (in px).
|
||||
|
||||
The 'b' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["b"]
|
||||
|
||||
@b.setter
|
||||
def b(self, val):
|
||||
self["b"] = val
|
||||
|
||||
@property
|
||||
def l(self):
|
||||
"""
|
||||
Sets the left margin (in px).
|
||||
|
||||
The 'l' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["l"]
|
||||
|
||||
@l.setter
|
||||
def l(self, val):
|
||||
self["l"] = val
|
||||
|
||||
@property
|
||||
def pad(self):
|
||||
"""
|
||||
Sets the amount of padding (in px) between the plotting area
|
||||
and the axis lines
|
||||
|
||||
The 'pad' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["pad"]
|
||||
|
||||
@pad.setter
|
||||
def pad(self, val):
|
||||
self["pad"] = val
|
||||
|
||||
@property
|
||||
def r(self):
|
||||
"""
|
||||
Sets the right margin (in px).
|
||||
|
||||
The 'r' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["r"]
|
||||
|
||||
@r.setter
|
||||
def r(self, val):
|
||||
self["r"] = val
|
||||
|
||||
@property
|
||||
def t(self):
|
||||
"""
|
||||
Sets the top margin (in px).
|
||||
|
||||
The 't' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["t"]
|
||||
|
||||
@t.setter
|
||||
def t(self, val):
|
||||
self["t"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
autoexpand
|
||||
Turns on/off margin expansion computations. Legends,
|
||||
colorbars, updatemenus, sliders, axis rangeselector and
|
||||
rangeslider are allowed to push the margins by
|
||||
defaults.
|
||||
b
|
||||
Sets the bottom margin (in px).
|
||||
l
|
||||
Sets the left margin (in px).
|
||||
pad
|
||||
Sets the amount of padding (in px) between the plotting
|
||||
area and the axis lines
|
||||
r
|
||||
Sets the right margin (in px).
|
||||
t
|
||||
Sets the top margin (in px).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
autoexpand=None,
|
||||
b=None,
|
||||
l=None,
|
||||
pad=None,
|
||||
r=None,
|
||||
t=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Margin object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Margin`
|
||||
autoexpand
|
||||
Turns on/off margin expansion computations. Legends,
|
||||
colorbars, updatemenus, sliders, axis rangeselector and
|
||||
rangeslider are allowed to push the margins by
|
||||
defaults.
|
||||
b
|
||||
Sets the bottom margin (in px).
|
||||
l
|
||||
Sets the left margin (in px).
|
||||
pad
|
||||
Sets the amount of padding (in px) between the plotting
|
||||
area and the axis lines
|
||||
r
|
||||
Sets the right margin (in px).
|
||||
t
|
||||
Sets the top margin (in px).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Margin
|
||||
"""
|
||||
super().__init__("margin")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Margin
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Margin`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("autoexpand", arg, autoexpand)
|
||||
self._set_property("b", arg, b)
|
||||
self._set_property("l", arg, l)
|
||||
self._set_property("pad", arg, pad)
|
||||
self._set_property("r", arg, r)
|
||||
self._set_property("t", arg, t)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,387 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Modebar(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.modebar"
|
||||
_valid_props = {
|
||||
"activecolor",
|
||||
"add",
|
||||
"addsrc",
|
||||
"bgcolor",
|
||||
"color",
|
||||
"orientation",
|
||||
"remove",
|
||||
"removesrc",
|
||||
"uirevision",
|
||||
}
|
||||
|
||||
@property
|
||||
def activecolor(self):
|
||||
"""
|
||||
Sets the color of the active or hovered on icons in the
|
||||
modebar.
|
||||
|
||||
The 'activecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["activecolor"]
|
||||
|
||||
@activecolor.setter
|
||||
def activecolor(self, val):
|
||||
self["activecolor"] = val
|
||||
|
||||
@property
|
||||
def add(self):
|
||||
"""
|
||||
Determines which predefined modebar buttons to add. Please note
|
||||
that these buttons will only be shown if they are compatible
|
||||
with all trace types used in a graph. Similar to
|
||||
`config.modeBarButtonsToAdd` option. This may include
|
||||
"v1hovermode", "hoverclosest", "hovercompare", "togglehover",
|
||||
"togglespikelines", "drawline", "drawopenpath",
|
||||
"drawclosedpath", "drawcircle", "drawrect", "eraseshape".
|
||||
|
||||
The 'add' 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["add"]
|
||||
|
||||
@add.setter
|
||||
def add(self, val):
|
||||
self["add"] = val
|
||||
|
||||
@property
|
||||
def addsrc(self):
|
||||
"""
|
||||
Sets the source reference on Chart Studio Cloud for `add`.
|
||||
|
||||
The 'addsrc' property must be specified as a string or
|
||||
as a plotly.grid_objs.Column object
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["addsrc"]
|
||||
|
||||
@addsrc.setter
|
||||
def addsrc(self, val):
|
||||
self["addsrc"] = val
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Sets the background color of the modebar.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the color of the icons in the modebar.
|
||||
|
||||
The 'color' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def orientation(self):
|
||||
"""
|
||||
Sets the orientation of the modebar.
|
||||
|
||||
The 'orientation' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['v', 'h']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["orientation"]
|
||||
|
||||
@orientation.setter
|
||||
def orientation(self, val):
|
||||
self["orientation"] = val
|
||||
|
||||
@property
|
||||
def remove(self):
|
||||
"""
|
||||
Determines which predefined modebar buttons to remove. Similar
|
||||
to `config.modeBarButtonsToRemove` option. This may include
|
||||
"autoScale2d", "autoscale", "editInChartStudio",
|
||||
"editinchartstudio", "hoverCompareCartesian", "hovercompare",
|
||||
"lasso", "lasso2d", "orbitRotation", "orbitrotation", "pan",
|
||||
"pan2d", "pan3d", "reset", "resetCameraDefault3d",
|
||||
"resetCameraLastSave3d", "resetGeo", "resetSankeyGroup",
|
||||
"resetScale2d", "resetViewMap", "resetViewMapbox",
|
||||
"resetViews", "resetcameradefault", "resetcameralastsave",
|
||||
"resetsankeygroup", "resetscale", "resetview", "resetviews",
|
||||
"select", "select2d", "sendDataToCloud", "senddatatocloud",
|
||||
"tableRotation", "tablerotation", "toImage", "toggleHover",
|
||||
"toggleSpikelines", "togglehover", "togglespikelines",
|
||||
"toimage", "zoom", "zoom2d", "zoom3d", "zoomIn2d", "zoomInGeo",
|
||||
"zoomInMap", "zoomInMapbox", "zoomOut2d", "zoomOutGeo",
|
||||
"zoomOutMap", "zoomOutMapbox", "zoomin", "zoomout".
|
||||
|
||||
The 'remove' 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["remove"]
|
||||
|
||||
@remove.setter
|
||||
def remove(self, val):
|
||||
self["remove"] = val
|
||||
|
||||
@property
|
||||
def removesrc(self):
|
||||
"""
|
||||
Sets the source reference on Chart Studio Cloud for `remove`.
|
||||
|
||||
The 'removesrc' property must be specified as a string or
|
||||
as a plotly.grid_objs.Column object
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["removesrc"]
|
||||
|
||||
@removesrc.setter
|
||||
def removesrc(self, val):
|
||||
self["removesrc"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes related to the
|
||||
modebar, including `hovermode`, `dragmode`, and `showspikes` at
|
||||
both the root level and inside subplots. Defaults to
|
||||
`layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
activecolor
|
||||
Sets the color of the active or hovered on icons in the
|
||||
modebar.
|
||||
add
|
||||
Determines which predefined modebar buttons to add.
|
||||
Please note that these buttons will only be shown if
|
||||
they are compatible with all trace types used in a
|
||||
graph. Similar to `config.modeBarButtonsToAdd` option.
|
||||
This may include "v1hovermode", "hoverclosest",
|
||||
"hovercompare", "togglehover", "togglespikelines",
|
||||
"drawline", "drawopenpath", "drawclosedpath",
|
||||
"drawcircle", "drawrect", "eraseshape".
|
||||
addsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`add`.
|
||||
bgcolor
|
||||
Sets the background color of the modebar.
|
||||
color
|
||||
Sets the color of the icons in the modebar.
|
||||
orientation
|
||||
Sets the orientation of the modebar.
|
||||
remove
|
||||
Determines which predefined modebar buttons to remove.
|
||||
Similar to `config.modeBarButtonsToRemove` option. This
|
||||
may include "autoScale2d", "autoscale",
|
||||
"editInChartStudio", "editinchartstudio",
|
||||
"hoverCompareCartesian", "hovercompare", "lasso",
|
||||
"lasso2d", "orbitRotation", "orbitrotation", "pan",
|
||||
"pan2d", "pan3d", "reset", "resetCameraDefault3d",
|
||||
"resetCameraLastSave3d", "resetGeo",
|
||||
"resetSankeyGroup", "resetScale2d", "resetViewMap",
|
||||
"resetViewMapbox", "resetViews", "resetcameradefault",
|
||||
"resetcameralastsave", "resetsankeygroup",
|
||||
"resetscale", "resetview", "resetviews", "select",
|
||||
"select2d", "sendDataToCloud", "senddatatocloud",
|
||||
"tableRotation", "tablerotation", "toImage",
|
||||
"toggleHover", "toggleSpikelines", "togglehover",
|
||||
"togglespikelines", "toimage", "zoom", "zoom2d",
|
||||
"zoom3d", "zoomIn2d", "zoomInGeo", "zoomInMap",
|
||||
"zoomInMapbox", "zoomOut2d", "zoomOutGeo",
|
||||
"zoomOutMap", "zoomOutMapbox", "zoomin", "zoomout".
|
||||
removesrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`remove`.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes related to
|
||||
the modebar, including `hovermode`, `dragmode`, and
|
||||
`showspikes` at both the root level and inside
|
||||
subplots. Defaults to `layout.uirevision`.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
activecolor=None,
|
||||
add=None,
|
||||
addsrc=None,
|
||||
bgcolor=None,
|
||||
color=None,
|
||||
orientation=None,
|
||||
remove=None,
|
||||
removesrc=None,
|
||||
uirevision=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Modebar object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Modebar`
|
||||
activecolor
|
||||
Sets the color of the active or hovered on icons in the
|
||||
modebar.
|
||||
add
|
||||
Determines which predefined modebar buttons to add.
|
||||
Please note that these buttons will only be shown if
|
||||
they are compatible with all trace types used in a
|
||||
graph. Similar to `config.modeBarButtonsToAdd` option.
|
||||
This may include "v1hovermode", "hoverclosest",
|
||||
"hovercompare", "togglehover", "togglespikelines",
|
||||
"drawline", "drawopenpath", "drawclosedpath",
|
||||
"drawcircle", "drawrect", "eraseshape".
|
||||
addsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`add`.
|
||||
bgcolor
|
||||
Sets the background color of the modebar.
|
||||
color
|
||||
Sets the color of the icons in the modebar.
|
||||
orientation
|
||||
Sets the orientation of the modebar.
|
||||
remove
|
||||
Determines which predefined modebar buttons to remove.
|
||||
Similar to `config.modeBarButtonsToRemove` option. This
|
||||
may include "autoScale2d", "autoscale",
|
||||
"editInChartStudio", "editinchartstudio",
|
||||
"hoverCompareCartesian", "hovercompare", "lasso",
|
||||
"lasso2d", "orbitRotation", "orbitrotation", "pan",
|
||||
"pan2d", "pan3d", "reset", "resetCameraDefault3d",
|
||||
"resetCameraLastSave3d", "resetGeo",
|
||||
"resetSankeyGroup", "resetScale2d", "resetViewMap",
|
||||
"resetViewMapbox", "resetViews", "resetcameradefault",
|
||||
"resetcameralastsave", "resetsankeygroup",
|
||||
"resetscale", "resetview", "resetviews", "select",
|
||||
"select2d", "sendDataToCloud", "senddatatocloud",
|
||||
"tableRotation", "tablerotation", "toImage",
|
||||
"toggleHover", "toggleSpikelines", "togglehover",
|
||||
"togglespikelines", "toimage", "zoom", "zoom2d",
|
||||
"zoom3d", "zoomIn2d", "zoomInGeo", "zoomInMap",
|
||||
"zoomInMapbox", "zoomOut2d", "zoomOutGeo",
|
||||
"zoomOutMap", "zoomOutMapbox", "zoomin", "zoomout".
|
||||
removesrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`remove`.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes related to
|
||||
the modebar, including `hovermode`, `dragmode`, and
|
||||
`showspikes` at both the root level and inside
|
||||
subplots. Defaults to `layout.uirevision`.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Modebar
|
||||
"""
|
||||
super().__init__("modebar")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Modebar
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Modebar`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("activecolor", arg, activecolor)
|
||||
self._set_property("add", arg, add)
|
||||
self._set_property("addsrc", arg, addsrc)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("orientation", arg, orientation)
|
||||
self._set_property("remove", arg, remove)
|
||||
self._set_property("removesrc", arg, removesrc)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,118 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Newselection(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.newselection"
|
||||
_valid_props = {"line", "mode"}
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
"""
|
||||
The 'line' property is an instance of Line
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.newselection.Line`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Line constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newselection.Line
|
||||
"""
|
||||
return self["line"]
|
||||
|
||||
@line.setter
|
||||
def line(self, val):
|
||||
self["line"] = val
|
||||
|
||||
@property
|
||||
def mode(self):
|
||||
"""
|
||||
Describes how a new selection is created. If `immediate`, a new
|
||||
selection is created after first mouse up. If `gradual`, a new
|
||||
selection is not created after first mouse. By adding to and
|
||||
subtracting from the initial selection, this option allows
|
||||
declaring extra outlines of the selection.
|
||||
|
||||
The 'mode' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['immediate', 'gradual']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["mode"]
|
||||
|
||||
@mode.setter
|
||||
def mode(self, val):
|
||||
self["mode"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.newselection.Line`
|
||||
instance or dict with compatible properties
|
||||
mode
|
||||
Describes how a new selection is created. If
|
||||
`immediate`, a new selection is created after first
|
||||
mouse up. If `gradual`, a new selection is not created
|
||||
after first mouse. By adding to and subtracting from
|
||||
the initial selection, this option allows declaring
|
||||
extra outlines of the selection.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, line=None, mode=None, **kwargs):
|
||||
"""
|
||||
Construct a new Newselection object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Newselection`
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.newselection.Line`
|
||||
instance or dict with compatible properties
|
||||
mode
|
||||
Describes how a new selection is created. If
|
||||
`immediate`, a new selection is created after first
|
||||
mouse up. If `gradual`, a new selection is not created
|
||||
after first mouse. By adding to and subtracting from
|
||||
the initial selection, this option allows declaring
|
||||
extra outlines of the selection.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Newselection
|
||||
"""
|
||||
super().__init__("newselection")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Newselection
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Newselection`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("line", arg, line)
|
||||
self._set_property("mode", arg, mode)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,543 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Newshape(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.newshape"
|
||||
_valid_props = {
|
||||
"drawdirection",
|
||||
"fillcolor",
|
||||
"fillrule",
|
||||
"label",
|
||||
"layer",
|
||||
"legend",
|
||||
"legendgroup",
|
||||
"legendgrouptitle",
|
||||
"legendrank",
|
||||
"legendwidth",
|
||||
"line",
|
||||
"name",
|
||||
"opacity",
|
||||
"showlegend",
|
||||
"visible",
|
||||
}
|
||||
|
||||
@property
|
||||
def drawdirection(self):
|
||||
"""
|
||||
When `dragmode` is set to "drawrect", "drawline" or
|
||||
"drawcircle" this limits the drag to be horizontal, vertical or
|
||||
diagonal. Using "diagonal" there is no limit e.g. in drawing
|
||||
lines in any direction. "ortho" limits the draw to be either
|
||||
horizontal or vertical. "horizontal" allows horizontal extend.
|
||||
"vertical" allows vertical extend.
|
||||
|
||||
The 'drawdirection' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['ortho', 'horizontal', 'vertical', 'diagonal']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["drawdirection"]
|
||||
|
||||
@drawdirection.setter
|
||||
def drawdirection(self, val):
|
||||
self["drawdirection"] = val
|
||||
|
||||
@property
|
||||
def fillcolor(self):
|
||||
"""
|
||||
Sets the color filling new shapes' interior. Please note that
|
||||
if using a fillcolor with alpha greater than half, drag inside
|
||||
the active shape starts moving the shape underneath, otherwise
|
||||
a new shape could be started over.
|
||||
|
||||
The 'fillcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["fillcolor"]
|
||||
|
||||
@fillcolor.setter
|
||||
def fillcolor(self, val):
|
||||
self["fillcolor"] = val
|
||||
|
||||
@property
|
||||
def fillrule(self):
|
||||
"""
|
||||
Determines the path's interior. For more info please visit
|
||||
https://developer.mozilla.org/en-
|
||||
US/docs/Web/SVG/Attribute/fill-rule
|
||||
|
||||
The 'fillrule' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['evenodd', 'nonzero']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["fillrule"]
|
||||
|
||||
@fillrule.setter
|
||||
def fillrule(self, val):
|
||||
self["fillrule"] = val
|
||||
|
||||
@property
|
||||
def label(self):
|
||||
"""
|
||||
The 'label' property is an instance of Label
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.newshape.Label`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Label constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newshape.Label
|
||||
"""
|
||||
return self["label"]
|
||||
|
||||
@label.setter
|
||||
def label(self, val):
|
||||
self["label"] = val
|
||||
|
||||
@property
|
||||
def layer(self):
|
||||
"""
|
||||
Specifies whether new shapes are drawn below gridlines
|
||||
("below"), between gridlines and traces ("between") or above
|
||||
traces ("above").
|
||||
|
||||
The 'layer' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['below', 'above', 'between']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["layer"]
|
||||
|
||||
@layer.setter
|
||||
def layer(self, val):
|
||||
self["layer"] = val
|
||||
|
||||
@property
|
||||
def legend(self):
|
||||
"""
|
||||
Sets the reference to a legend to show new shape in. References
|
||||
to these legends are "legend", "legend2", "legend3", etc.
|
||||
Settings for these legends are set in the layout, under
|
||||
`layout.legend`, `layout.legend2`, etc.
|
||||
|
||||
The 'legend' property is an identifier of a particular
|
||||
subplot, of type 'legend', that may be specified as the string 'legend'
|
||||
optionally followed by an integer >= 1
|
||||
(e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["legend"]
|
||||
|
||||
@legend.setter
|
||||
def legend(self, val):
|
||||
self["legend"] = val
|
||||
|
||||
@property
|
||||
def legendgroup(self):
|
||||
"""
|
||||
Sets the legend group for new shape. Traces and shapes part of
|
||||
the same legend group hide/show at the same time when toggling
|
||||
legend items.
|
||||
|
||||
The 'legendgroup' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["legendgroup"]
|
||||
|
||||
@legendgroup.setter
|
||||
def legendgroup(self, val):
|
||||
self["legendgroup"] = val
|
||||
|
||||
@property
|
||||
def legendgrouptitle(self):
|
||||
"""
|
||||
The 'legendgrouptitle' property is an instance of Legendgrouptitle
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.newshape.Legendgrouptitle`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Legendgrouptitle constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newshape.Legendgrouptitle
|
||||
"""
|
||||
return self["legendgrouptitle"]
|
||||
|
||||
@legendgrouptitle.setter
|
||||
def legendgrouptitle(self, val):
|
||||
self["legendgrouptitle"] = val
|
||||
|
||||
@property
|
||||
def legendrank(self):
|
||||
"""
|
||||
Sets the legend rank for new shape. 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.
|
||||
|
||||
The 'legendrank' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["legendrank"]
|
||||
|
||||
@legendrank.setter
|
||||
def legendrank(self, val):
|
||||
self["legendrank"] = val
|
||||
|
||||
@property
|
||||
def legendwidth(self):
|
||||
"""
|
||||
Sets the width (in px or fraction) of the legend for new shape.
|
||||
|
||||
The 'legendwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["legendwidth"]
|
||||
|
||||
@legendwidth.setter
|
||||
def legendwidth(self, val):
|
||||
self["legendwidth"] = val
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
"""
|
||||
The 'line' property is an instance of Line
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.newshape.Line`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Line constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newshape.Line
|
||||
"""
|
||||
return self["line"]
|
||||
|
||||
@line.setter
|
||||
def line(self, val):
|
||||
self["line"] = val
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Sets new shape name. The name appears as the legend item.
|
||||
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of new shapes.
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def showlegend(self):
|
||||
"""
|
||||
Determines whether or not new shape is shown in the legend.
|
||||
|
||||
The 'showlegend' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showlegend"]
|
||||
|
||||
@showlegend.setter
|
||||
def showlegend(self, val):
|
||||
self["showlegend"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether or not new shape is visible. If
|
||||
"legendonly", the shape is not drawn, but can appear as a
|
||||
legend item (provided that the legend itself is visible).
|
||||
|
||||
The 'visible' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
[True, False, 'legendonly']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
drawdirection
|
||||
When `dragmode` is set to "drawrect", "drawline" or
|
||||
"drawcircle" this limits the drag to be horizontal,
|
||||
vertical or diagonal. Using "diagonal" there is no
|
||||
limit e.g. in drawing lines in any direction. "ortho"
|
||||
limits the draw to be either horizontal or vertical.
|
||||
"horizontal" allows horizontal extend. "vertical"
|
||||
allows vertical extend.
|
||||
fillcolor
|
||||
Sets the color filling new shapes' interior. Please
|
||||
note that if using a fillcolor with alpha greater than
|
||||
half, drag inside the active shape starts moving the
|
||||
shape underneath, otherwise a new shape could be
|
||||
started over.
|
||||
fillrule
|
||||
Determines the path's interior. For more info please
|
||||
visit https://developer.mozilla.org/en-
|
||||
US/docs/Web/SVG/Attribute/fill-rule
|
||||
label
|
||||
:class:`plotly.graph_objects.layout.newshape.Label`
|
||||
instance or dict with compatible properties
|
||||
layer
|
||||
Specifies whether new shapes are drawn below gridlines
|
||||
("below"), between gridlines and traces ("between") or
|
||||
above traces ("above").
|
||||
legend
|
||||
Sets the reference to a legend to show new shape in.
|
||||
References to these legends are "legend", "legend2",
|
||||
"legend3", etc. Settings for these legends are set in
|
||||
the layout, under `layout.legend`, `layout.legend2`,
|
||||
etc.
|
||||
legendgroup
|
||||
Sets the legend group for new shape. Traces and shapes
|
||||
part of the same legend group hide/show at the same
|
||||
time when toggling legend items.
|
||||
legendgrouptitle
|
||||
:class:`plotly.graph_objects.layout.newshape.Legendgrou
|
||||
ptitle` instance or dict with compatible properties
|
||||
legendrank
|
||||
Sets the legend rank for new shape. 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.
|
||||
legendwidth
|
||||
Sets the width (in px or fraction) of the legend for
|
||||
new shape.
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.newshape.Line`
|
||||
instance or dict with compatible properties
|
||||
name
|
||||
Sets new shape name. The name appears as the legend
|
||||
item.
|
||||
opacity
|
||||
Sets the opacity of new shapes.
|
||||
showlegend
|
||||
Determines whether or not new shape is shown in the
|
||||
legend.
|
||||
visible
|
||||
Determines whether or not new shape is visible. If
|
||||
"legendonly", the shape is not drawn, but can appear as
|
||||
a legend item (provided that the legend itself is
|
||||
visible).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
drawdirection=None,
|
||||
fillcolor=None,
|
||||
fillrule=None,
|
||||
label=None,
|
||||
layer=None,
|
||||
legend=None,
|
||||
legendgroup=None,
|
||||
legendgrouptitle=None,
|
||||
legendrank=None,
|
||||
legendwidth=None,
|
||||
line=None,
|
||||
name=None,
|
||||
opacity=None,
|
||||
showlegend=None,
|
||||
visible=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Newshape object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Newshape`
|
||||
drawdirection
|
||||
When `dragmode` is set to "drawrect", "drawline" or
|
||||
"drawcircle" this limits the drag to be horizontal,
|
||||
vertical or diagonal. Using "diagonal" there is no
|
||||
limit e.g. in drawing lines in any direction. "ortho"
|
||||
limits the draw to be either horizontal or vertical.
|
||||
"horizontal" allows horizontal extend. "vertical"
|
||||
allows vertical extend.
|
||||
fillcolor
|
||||
Sets the color filling new shapes' interior. Please
|
||||
note that if using a fillcolor with alpha greater than
|
||||
half, drag inside the active shape starts moving the
|
||||
shape underneath, otherwise a new shape could be
|
||||
started over.
|
||||
fillrule
|
||||
Determines the path's interior. For more info please
|
||||
visit https://developer.mozilla.org/en-
|
||||
US/docs/Web/SVG/Attribute/fill-rule
|
||||
label
|
||||
:class:`plotly.graph_objects.layout.newshape.Label`
|
||||
instance or dict with compatible properties
|
||||
layer
|
||||
Specifies whether new shapes are drawn below gridlines
|
||||
("below"), between gridlines and traces ("between") or
|
||||
above traces ("above").
|
||||
legend
|
||||
Sets the reference to a legend to show new shape in.
|
||||
References to these legends are "legend", "legend2",
|
||||
"legend3", etc. Settings for these legends are set in
|
||||
the layout, under `layout.legend`, `layout.legend2`,
|
||||
etc.
|
||||
legendgroup
|
||||
Sets the legend group for new shape. Traces and shapes
|
||||
part of the same legend group hide/show at the same
|
||||
time when toggling legend items.
|
||||
legendgrouptitle
|
||||
:class:`plotly.graph_objects.layout.newshape.Legendgrou
|
||||
ptitle` instance or dict with compatible properties
|
||||
legendrank
|
||||
Sets the legend rank for new shape. 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.
|
||||
legendwidth
|
||||
Sets the width (in px or fraction) of the legend for
|
||||
new shape.
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.newshape.Line`
|
||||
instance or dict with compatible properties
|
||||
name
|
||||
Sets new shape name. The name appears as the legend
|
||||
item.
|
||||
opacity
|
||||
Sets the opacity of new shapes.
|
||||
showlegend
|
||||
Determines whether or not new shape is shown in the
|
||||
legend.
|
||||
visible
|
||||
Determines whether or not new shape is visible. If
|
||||
"legendonly", the shape is not drawn, but can appear as
|
||||
a legend item (provided that the legend itself is
|
||||
visible).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Newshape
|
||||
"""
|
||||
super().__init__("newshape")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Newshape
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Newshape`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("drawdirection", arg, drawdirection)
|
||||
self._set_property("fillcolor", arg, fillcolor)
|
||||
self._set_property("fillrule", arg, fillrule)
|
||||
self._set_property("label", arg, label)
|
||||
self._set_property("layer", arg, layer)
|
||||
self._set_property("legend", arg, legend)
|
||||
self._set_property("legendgroup", arg, legendgroup)
|
||||
self._set_property("legendgrouptitle", arg, legendgrouptitle)
|
||||
self._set_property("legendrank", arg, legendrank)
|
||||
self._set_property("legendwidth", arg, legendwidth)
|
||||
self._set_property("line", arg, line)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._set_property("showlegend", arg, showlegend)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
382
lib/python3.11/site-packages/plotly/graph_objs/layout/_polar.py
Normal file
382
lib/python3.11/site-packages/plotly/graph_objs/layout/_polar.py
Normal file
@ -0,0 +1,382 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Polar(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.polar"
|
||||
_valid_props = {
|
||||
"angularaxis",
|
||||
"bargap",
|
||||
"barmode",
|
||||
"bgcolor",
|
||||
"domain",
|
||||
"gridshape",
|
||||
"hole",
|
||||
"radialaxis",
|
||||
"sector",
|
||||
"uirevision",
|
||||
}
|
||||
|
||||
@property
|
||||
def angularaxis(self):
|
||||
"""
|
||||
The 'angularaxis' property is an instance of AngularAxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.polar.AngularAxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the AngularAxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.polar.AngularAxis
|
||||
"""
|
||||
return self["angularaxis"]
|
||||
|
||||
@angularaxis.setter
|
||||
def angularaxis(self, val):
|
||||
self["angularaxis"] = val
|
||||
|
||||
@property
|
||||
def bargap(self):
|
||||
"""
|
||||
Sets the gap between bars of adjacent location coordinates.
|
||||
Values are unitless, they represent fractions of the minimum
|
||||
difference in bar positions in the data.
|
||||
|
||||
The 'bargap' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["bargap"]
|
||||
|
||||
@bargap.setter
|
||||
def bargap(self, val):
|
||||
self["bargap"] = val
|
||||
|
||||
@property
|
||||
def barmode(self):
|
||||
"""
|
||||
Determines how bars at the same location coordinate are
|
||||
displayed on the graph. With "stack", the bars are stacked on
|
||||
top of one another With "overlay", the bars are plotted over
|
||||
one another, you might need to reduce "opacity" to see multiple
|
||||
bars.
|
||||
|
||||
The 'barmode' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['stack', 'overlay']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["barmode"]
|
||||
|
||||
@barmode.setter
|
||||
def barmode(self, val):
|
||||
self["barmode"] = val
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Set the background color of the subplot
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.polar.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.polar.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def gridshape(self):
|
||||
"""
|
||||
Determines if the radial axis grid lines and angular axis line
|
||||
are drawn as "circular" sectors or as "linear" (polygon)
|
||||
sectors. Has an effect only when the angular axis has `type`
|
||||
"category". Note that `radialaxis.angle` is snapped to the
|
||||
angle of the closest vertex when `gridshape` is "circular" (so
|
||||
that radial axis scale is the same as the data scale).
|
||||
|
||||
The 'gridshape' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['circular', 'linear']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["gridshape"]
|
||||
|
||||
@gridshape.setter
|
||||
def gridshape(self, val):
|
||||
self["gridshape"] = val
|
||||
|
||||
@property
|
||||
def hole(self):
|
||||
"""
|
||||
Sets the fraction of the radius to cut out of the polar
|
||||
subplot.
|
||||
|
||||
The 'hole' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["hole"]
|
||||
|
||||
@hole.setter
|
||||
def hole(self, val):
|
||||
self["hole"] = val
|
||||
|
||||
@property
|
||||
def radialaxis(self):
|
||||
"""
|
||||
The 'radialaxis' property is an instance of RadialAxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the RadialAxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.polar.RadialAxis
|
||||
"""
|
||||
return self["radialaxis"]
|
||||
|
||||
@radialaxis.setter
|
||||
def radialaxis(self, val):
|
||||
self["radialaxis"] = val
|
||||
|
||||
@property
|
||||
def sector(self):
|
||||
"""
|
||||
Sets angular span of this polar subplot with two angles (in
|
||||
degrees). Sector are assumed to be spanned in the
|
||||
counterclockwise direction with 0 corresponding to rightmost
|
||||
limit of the polar subplot.
|
||||
|
||||
The 'sector' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'sector[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'sector[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["sector"]
|
||||
|
||||
@sector.setter
|
||||
def sector(self, val):
|
||||
self["sector"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes in axis attributes,
|
||||
if not overridden in the individual axes. Defaults to
|
||||
`layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
angularaxis
|
||||
:class:`plotly.graph_objects.layout.polar.AngularAxis`
|
||||
instance or dict with compatible properties
|
||||
bargap
|
||||
Sets the gap between bars of adjacent location
|
||||
coordinates. Values are unitless, they represent
|
||||
fractions of the minimum difference in bar positions in
|
||||
the data.
|
||||
barmode
|
||||
Determines how bars at the same location coordinate are
|
||||
displayed on the graph. With "stack", the bars are
|
||||
stacked on top of one another With "overlay", the bars
|
||||
are plotted over one another, you might need to reduce
|
||||
"opacity" to see multiple bars.
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.polar.Domain`
|
||||
instance or dict with compatible properties
|
||||
gridshape
|
||||
Determines if the radial axis grid lines and angular
|
||||
axis line are drawn as "circular" sectors or as
|
||||
"linear" (polygon) sectors. Has an effect only when the
|
||||
angular axis has `type` "category". Note that
|
||||
`radialaxis.angle` is snapped to the angle of the
|
||||
closest vertex when `gridshape` is "circular" (so that
|
||||
radial axis scale is the same as the data scale).
|
||||
hole
|
||||
Sets the fraction of the radius to cut out of the polar
|
||||
subplot.
|
||||
radialaxis
|
||||
:class:`plotly.graph_objects.layout.polar.RadialAxis`
|
||||
instance or dict with compatible properties
|
||||
sector
|
||||
Sets angular span of this polar subplot with two angles
|
||||
(in degrees). Sector are assumed to be spanned in the
|
||||
counterclockwise direction with 0 corresponding to
|
||||
rightmost limit of the polar subplot.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in axis
|
||||
attributes, if not overridden in the individual axes.
|
||||
Defaults to `layout.uirevision`.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
angularaxis=None,
|
||||
bargap=None,
|
||||
barmode=None,
|
||||
bgcolor=None,
|
||||
domain=None,
|
||||
gridshape=None,
|
||||
hole=None,
|
||||
radialaxis=None,
|
||||
sector=None,
|
||||
uirevision=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Polar object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Polar`
|
||||
angularaxis
|
||||
:class:`plotly.graph_objects.layout.polar.AngularAxis`
|
||||
instance or dict with compatible properties
|
||||
bargap
|
||||
Sets the gap between bars of adjacent location
|
||||
coordinates. Values are unitless, they represent
|
||||
fractions of the minimum difference in bar positions in
|
||||
the data.
|
||||
barmode
|
||||
Determines how bars at the same location coordinate are
|
||||
displayed on the graph. With "stack", the bars are
|
||||
stacked on top of one another With "overlay", the bars
|
||||
are plotted over one another, you might need to reduce
|
||||
"opacity" to see multiple bars.
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.polar.Domain`
|
||||
instance or dict with compatible properties
|
||||
gridshape
|
||||
Determines if the radial axis grid lines and angular
|
||||
axis line are drawn as "circular" sectors or as
|
||||
"linear" (polygon) sectors. Has an effect only when the
|
||||
angular axis has `type` "category". Note that
|
||||
`radialaxis.angle` is snapped to the angle of the
|
||||
closest vertex when `gridshape` is "circular" (so that
|
||||
radial axis scale is the same as the data scale).
|
||||
hole
|
||||
Sets the fraction of the radius to cut out of the polar
|
||||
subplot.
|
||||
radialaxis
|
||||
:class:`plotly.graph_objects.layout.polar.RadialAxis`
|
||||
instance or dict with compatible properties
|
||||
sector
|
||||
Sets angular span of this polar subplot with two angles
|
||||
(in degrees). Sector are assumed to be spanned in the
|
||||
counterclockwise direction with 0 corresponding to
|
||||
rightmost limit of the polar subplot.
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in axis
|
||||
attributes, if not overridden in the individual axes.
|
||||
Defaults to `layout.uirevision`.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Polar
|
||||
"""
|
||||
super().__init__("polar")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Polar
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Polar`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("angularaxis", arg, angularaxis)
|
||||
self._set_property("bargap", arg, bargap)
|
||||
self._set_property("barmode", arg, barmode)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("gridshape", arg, gridshape)
|
||||
self._set_property("hole", arg, hole)
|
||||
self._set_property("radialaxis", arg, radialaxis)
|
||||
self._set_property("sector", arg, sector)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
454
lib/python3.11/site-packages/plotly/graph_objs/layout/_scene.py
Normal file
454
lib/python3.11/site-packages/plotly/graph_objs/layout/_scene.py
Normal file
@ -0,0 +1,454 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Scene(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.scene"
|
||||
_valid_props = {
|
||||
"annotationdefaults",
|
||||
"annotations",
|
||||
"aspectmode",
|
||||
"aspectratio",
|
||||
"bgcolor",
|
||||
"camera",
|
||||
"domain",
|
||||
"dragmode",
|
||||
"hovermode",
|
||||
"uirevision",
|
||||
"xaxis",
|
||||
"yaxis",
|
||||
"zaxis",
|
||||
}
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
tuple[plotly.graph_objs.layout.scene.Annotation]
|
||||
"""
|
||||
return self["annotations"]
|
||||
|
||||
@annotations.setter
|
||||
def annotations(self, val):
|
||||
self["annotations"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.Annotation
|
||||
"""
|
||||
return self["annotationdefaults"]
|
||||
|
||||
@annotationdefaults.setter
|
||||
def annotationdefaults(self, val):
|
||||
self["annotationdefaults"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@aspectmode.setter
|
||||
def aspectmode(self, val):
|
||||
self["aspectmode"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.Aspectratio
|
||||
"""
|
||||
return self["aspectratio"]
|
||||
|
||||
@aspectratio.setter
|
||||
def aspectratio(self, val):
|
||||
self["aspectratio"] = val
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.Camera
|
||||
"""
|
||||
return self["camera"]
|
||||
|
||||
@camera.setter
|
||||
def camera(self, val):
|
||||
self["camera"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@dragmode.setter
|
||||
def dragmode(self, val):
|
||||
self["dragmode"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@hovermode.setter
|
||||
def hovermode(self, val):
|
||||
self["hovermode"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.XAxis
|
||||
"""
|
||||
return self["xaxis"]
|
||||
|
||||
@xaxis.setter
|
||||
def xaxis(self, val):
|
||||
self["xaxis"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.YAxis
|
||||
"""
|
||||
return self["yaxis"]
|
||||
|
||||
@yaxis.setter
|
||||
def yaxis(self, val):
|
||||
self["yaxis"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.scene.ZAxis
|
||||
"""
|
||||
return self["zaxis"]
|
||||
|
||||
@zaxis.setter
|
||||
def zaxis(self, val):
|
||||
self["zaxis"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
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
|
||||
"""
|
||||
|
||||
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().__init__("scene")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("annotations", arg, annotations)
|
||||
self._set_property("annotationdefaults", arg, annotationdefaults)
|
||||
self._set_property("aspectmode", arg, aspectmode)
|
||||
self._set_property("aspectratio", arg, aspectratio)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("camera", arg, camera)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("dragmode", arg, dragmode)
|
||||
self._set_property("hovermode", arg, hovermode)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._set_property("xaxis", arg, xaxis)
|
||||
self._set_property("yaxis", arg, yaxis)
|
||||
self._set_property("zaxis", arg, zaxis)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,493 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Selection(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.selection"
|
||||
_valid_props = {
|
||||
"line",
|
||||
"name",
|
||||
"opacity",
|
||||
"path",
|
||||
"templateitemname",
|
||||
"type",
|
||||
"x0",
|
||||
"x1",
|
||||
"xref",
|
||||
"y0",
|
||||
"y1",
|
||||
"yref",
|
||||
}
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
"""
|
||||
The 'line' property is an instance of Line
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.selection.Line`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Line constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.selection.Line
|
||||
"""
|
||||
return self["line"]
|
||||
|
||||
@line.setter
|
||||
def line(self, val):
|
||||
self["line"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the selection.
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
"""
|
||||
For `type` "path" - a valid SVG path similar to `shapes.path`
|
||||
in data coordinates. Allowed segments are: M, L and Z.
|
||||
|
||||
The 'path' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["path"]
|
||||
|
||||
@path.setter
|
||||
def path(self, val):
|
||||
self["path"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Specifies the selection type to be drawn. If "rect", a
|
||||
rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`),
|
||||
(`x1`,`y1`) and (`x0`,`y1`). If "path", draw a custom SVG path
|
||||
using `path`.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['rect', 'path']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
@property
|
||||
def x0(self):
|
||||
"""
|
||||
Sets the selection's starting x position.
|
||||
|
||||
The 'x0' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["x0"]
|
||||
|
||||
@x0.setter
|
||||
def x0(self, val):
|
||||
self["x0"] = val
|
||||
|
||||
@property
|
||||
def x1(self):
|
||||
"""
|
||||
Sets the selection's end x position.
|
||||
|
||||
The 'x1' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["x1"]
|
||||
|
||||
@x1.setter
|
||||
def x1(self, val):
|
||||
self["x1"] = val
|
||||
|
||||
@property
|
||||
def xref(self):
|
||||
"""
|
||||
Sets the selection's x coordinate axis. If set to a x axis id
|
||||
(e.g. "x" or "x2"), the `x` position refers to a x coordinate.
|
||||
If set to "paper", the `x` position refers to the distance from
|
||||
the left of the plotting area in normalized coordinates where 0
|
||||
(1) corresponds to the left (right). If set to a x axis ID
|
||||
followed by "domain" (separated by a space), the position
|
||||
behaves like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the domain of
|
||||
that axis: e.g., *x2 domain* refers to the domain of the second
|
||||
x axis and a x position of 0.5 refers to the point between the
|
||||
left and the right of the domain of the second x axis.
|
||||
|
||||
The 'xref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['paper']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^x([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xref"]
|
||||
|
||||
@xref.setter
|
||||
def xref(self, val):
|
||||
self["xref"] = val
|
||||
|
||||
@property
|
||||
def y0(self):
|
||||
"""
|
||||
Sets the selection's starting y position.
|
||||
|
||||
The 'y0' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["y0"]
|
||||
|
||||
@y0.setter
|
||||
def y0(self, val):
|
||||
self["y0"] = val
|
||||
|
||||
@property
|
||||
def y1(self):
|
||||
"""
|
||||
Sets the selection's end y position.
|
||||
|
||||
The 'y1' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["y1"]
|
||||
|
||||
@y1.setter
|
||||
def y1(self, val):
|
||||
self["y1"] = val
|
||||
|
||||
@property
|
||||
def yref(self):
|
||||
"""
|
||||
Sets the selection's x coordinate axis. If set to a y axis id
|
||||
(e.g. "y" or "y2"), the `y` position refers to a y coordinate.
|
||||
If set to "paper", the `y` position refers to the distance from
|
||||
the bottom of the plotting area in normalized coordinates where
|
||||
0 (1) corresponds to the bottom (top). If set to a y axis ID
|
||||
followed by "domain" (separated by a space), the position
|
||||
behaves like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the domain of
|
||||
that axis: e.g., *y2 domain* refers to the domain of the second
|
||||
y axis and a y position of 0.5 refers to the point between the
|
||||
bottom and the top of the domain of the second y axis.
|
||||
|
||||
The 'yref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['paper']
|
||||
- A string that matches one of the following regular expressions:
|
||||
['^y([2-9]|[1-9][0-9]+)?( domain)?$']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yref"]
|
||||
|
||||
@yref.setter
|
||||
def yref(self, val):
|
||||
self["yref"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.selection.Line`
|
||||
instance or dict with compatible properties
|
||||
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 selection.
|
||||
path
|
||||
For `type` "path" - a valid SVG path similar to
|
||||
`shapes.path` in data coordinates. Allowed segments
|
||||
are: M, L and Z.
|
||||
templateitemname
|
||||
Used to refer to a named item in this array in the
|
||||
template. Named items from the template will be created
|
||||
even without a matching item in the input figure, but
|
||||
you can modify one by making an item with
|
||||
`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
|
||||
Specifies the selection type to be drawn. If "rect", a
|
||||
rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`),
|
||||
(`x1`,`y1`) and (`x0`,`y1`). If "path", draw a custom
|
||||
SVG path using `path`.
|
||||
x0
|
||||
Sets the selection's starting x position.
|
||||
x1
|
||||
Sets the selection's end x position.
|
||||
xref
|
||||
Sets the selection's x coordinate axis. If set to a x
|
||||
axis id (e.g. "x" or "x2"), the `x` position refers to
|
||||
a x coordinate. If set to "paper", the `x` position
|
||||
refers to the distance from the left of the plotting
|
||||
area in normalized coordinates where 0 (1) corresponds
|
||||
to the left (right). If set to a x axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the
|
||||
domain of that axis: e.g., *x2 domain* refers to the
|
||||
domain of the second x axis and a x position of 0.5
|
||||
refers to the point between the left and the right of
|
||||
the domain of the second x axis.
|
||||
y0
|
||||
Sets the selection's starting y position.
|
||||
y1
|
||||
Sets the selection's end y position.
|
||||
yref
|
||||
Sets the selection's x coordinate axis. If set to a y
|
||||
axis id (e.g. "y" or "y2"), the `y` position refers to
|
||||
a y coordinate. If set to "paper", the `y` position
|
||||
refers to the distance from the bottom of the plotting
|
||||
area in normalized coordinates where 0 (1) corresponds
|
||||
to the bottom (top). If set to a y axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the
|
||||
domain of that axis: e.g., *y2 domain* refers to the
|
||||
domain of the second y axis and a y position of 0.5
|
||||
refers to the point between the bottom and the top of
|
||||
the domain of the second y axis.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
line=None,
|
||||
name=None,
|
||||
opacity=None,
|
||||
path=None,
|
||||
templateitemname=None,
|
||||
type=None,
|
||||
x0=None,
|
||||
x1=None,
|
||||
xref=None,
|
||||
y0=None,
|
||||
y1=None,
|
||||
yref=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Selection object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Selection`
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.selection.Line`
|
||||
instance or dict with compatible properties
|
||||
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 selection.
|
||||
path
|
||||
For `type` "path" - a valid SVG path similar to
|
||||
`shapes.path` in data coordinates. Allowed segments
|
||||
are: M, L and Z.
|
||||
templateitemname
|
||||
Used to refer to a named item in this array in the
|
||||
template. Named items from the template will be created
|
||||
even without a matching item in the input figure, but
|
||||
you can modify one by making an item with
|
||||
`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
|
||||
Specifies the selection type to be drawn. If "rect", a
|
||||
rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`),
|
||||
(`x1`,`y1`) and (`x0`,`y1`). If "path", draw a custom
|
||||
SVG path using `path`.
|
||||
x0
|
||||
Sets the selection's starting x position.
|
||||
x1
|
||||
Sets the selection's end x position.
|
||||
xref
|
||||
Sets the selection's x coordinate axis. If set to a x
|
||||
axis id (e.g. "x" or "x2"), the `x` position refers to
|
||||
a x coordinate. If set to "paper", the `x` position
|
||||
refers to the distance from the left of the plotting
|
||||
area in normalized coordinates where 0 (1) corresponds
|
||||
to the left (right). If set to a x axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the left of the
|
||||
domain of that axis: e.g., *x2 domain* refers to the
|
||||
domain of the second x axis and a x position of 0.5
|
||||
refers to the point between the left and the right of
|
||||
the domain of the second x axis.
|
||||
y0
|
||||
Sets the selection's starting y position.
|
||||
y1
|
||||
Sets the selection's end y position.
|
||||
yref
|
||||
Sets the selection's x coordinate axis. If set to a y
|
||||
axis id (e.g. "y" or "y2"), the `y` position refers to
|
||||
a y coordinate. If set to "paper", the `y` position
|
||||
refers to the distance from the bottom of the plotting
|
||||
area in normalized coordinates where 0 (1) corresponds
|
||||
to the bottom (top). If set to a y axis ID followed by
|
||||
"domain" (separated by a space), the position behaves
|
||||
like for "paper", but refers to the distance in
|
||||
fractions of the domain length from the bottom of the
|
||||
domain of that axis: e.g., *y2 domain* refers to the
|
||||
domain of the second y axis and a y position of 0.5
|
||||
refers to the point between the bottom and the top of
|
||||
the domain of the second y axis.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Selection
|
||||
"""
|
||||
super().__init__("selections")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Selection
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Selection`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("line", arg, line)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._set_property("path", arg, path)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("type", arg, type)
|
||||
self._set_property("x0", arg, x0)
|
||||
self._set_property("x1", arg, x1)
|
||||
self._set_property("xref", arg, xref)
|
||||
self._set_property("y0", arg, y0)
|
||||
self._set_property("y1", arg, y1)
|
||||
self._set_property("yref", arg, yref)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
1287
lib/python3.11/site-packages/plotly/graph_objs/layout/_shape.py
Normal file
1287
lib/python3.11/site-packages/plotly/graph_objs/layout/_shape.py
Normal file
File diff suppressed because it is too large
Load Diff
786
lib/python3.11/site-packages/plotly/graph_objs/layout/_slider.py
Normal file
786
lib/python3.11/site-packages/plotly/graph_objs/layout/_slider.py
Normal file
@ -0,0 +1,786 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Slider(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.slider"
|
||||
_valid_props = {
|
||||
"active",
|
||||
"activebgcolor",
|
||||
"bgcolor",
|
||||
"bordercolor",
|
||||
"borderwidth",
|
||||
"currentvalue",
|
||||
"font",
|
||||
"len",
|
||||
"lenmode",
|
||||
"minorticklen",
|
||||
"name",
|
||||
"pad",
|
||||
"stepdefaults",
|
||||
"steps",
|
||||
"templateitemname",
|
||||
"tickcolor",
|
||||
"ticklen",
|
||||
"tickwidth",
|
||||
"transition",
|
||||
"visible",
|
||||
"x",
|
||||
"xanchor",
|
||||
"y",
|
||||
"yanchor",
|
||||
}
|
||||
|
||||
@property
|
||||
def active(self):
|
||||
"""
|
||||
Determines which button (by index starting from 0) is
|
||||
considered active.
|
||||
|
||||
The 'active' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["active"]
|
||||
|
||||
@active.setter
|
||||
def active(self, val):
|
||||
self["active"] = val
|
||||
|
||||
@property
|
||||
def activebgcolor(self):
|
||||
"""
|
||||
Sets the background color of the slider grip while dragging.
|
||||
|
||||
The 'activebgcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["activebgcolor"]
|
||||
|
||||
@activebgcolor.setter
|
||||
def activebgcolor(self, val):
|
||||
self["activebgcolor"] = val
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Sets the background color of the slider.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def bordercolor(self):
|
||||
"""
|
||||
Sets the color of the border enclosing the slider.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bordercolor"]
|
||||
|
||||
@bordercolor.setter
|
||||
def bordercolor(self, val):
|
||||
self["bordercolor"] = val
|
||||
|
||||
@property
|
||||
def borderwidth(self):
|
||||
"""
|
||||
Sets the width (in px) of the border enclosing the slider.
|
||||
|
||||
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"]
|
||||
|
||||
@borderwidth.setter
|
||||
def borderwidth(self, val):
|
||||
self["borderwidth"] = val
|
||||
|
||||
@property
|
||||
def currentvalue(self):
|
||||
"""
|
||||
The 'currentvalue' property is an instance of Currentvalue
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.slider.Currentvalue`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Currentvalue constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.slider.Currentvalue
|
||||
"""
|
||||
return self["currentvalue"]
|
||||
|
||||
@currentvalue.setter
|
||||
def currentvalue(self, val):
|
||||
self["currentvalue"] = val
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the font of the slider step labels.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.slider.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.slider.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def len(self):
|
||||
"""
|
||||
Sets the length of the slider This measure excludes the padding
|
||||
of both ends. That is, the slider's length is this length minus
|
||||
the padding on both ends.
|
||||
|
||||
The 'len' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["len"]
|
||||
|
||||
@len.setter
|
||||
def len(self, val):
|
||||
self["len"] = val
|
||||
|
||||
@property
|
||||
def lenmode(self):
|
||||
"""
|
||||
Determines whether this slider length is set in units of plot
|
||||
"fraction" or in *pixels. Use `len` to set the value.
|
||||
|
||||
The 'lenmode' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['fraction', 'pixels']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["lenmode"]
|
||||
|
||||
@lenmode.setter
|
||||
def lenmode(self, val):
|
||||
self["lenmode"] = val
|
||||
|
||||
@property
|
||||
def minorticklen(self):
|
||||
"""
|
||||
Sets the length in pixels of minor step tick marks
|
||||
|
||||
The 'minorticklen' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["minorticklen"]
|
||||
|
||||
@minorticklen.setter
|
||||
def minorticklen(self, val):
|
||||
self["minorticklen"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def pad(self):
|
||||
"""
|
||||
Set the padding of the slider component along each side.
|
||||
|
||||
The 'pad' property is an instance of Pad
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.slider.Pad`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Pad constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.slider.Pad
|
||||
"""
|
||||
return self["pad"]
|
||||
|
||||
@pad.setter
|
||||
def pad(self, val):
|
||||
self["pad"] = val
|
||||
|
||||
@property
|
||||
def steps(self):
|
||||
"""
|
||||
The 'steps' property is a tuple of instances of
|
||||
Step that may be specified as:
|
||||
- A list or tuple of instances of plotly.graph_objs.layout.slider.Step
|
||||
- A list or tuple of dicts of string/value properties that
|
||||
will be passed to the Step constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
tuple[plotly.graph_objs.layout.slider.Step]
|
||||
"""
|
||||
return self["steps"]
|
||||
|
||||
@steps.setter
|
||||
def steps(self, val):
|
||||
self["steps"] = val
|
||||
|
||||
@property
|
||||
def stepdefaults(self):
|
||||
"""
|
||||
When used in a template (as
|
||||
layout.template.layout.slider.stepdefaults), sets the default
|
||||
property values to use for elements of layout.slider.steps
|
||||
|
||||
The 'stepdefaults' property is an instance of Step
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.slider.Step`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Step constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.slider.Step
|
||||
"""
|
||||
return self["stepdefaults"]
|
||||
|
||||
@stepdefaults.setter
|
||||
def stepdefaults(self, val):
|
||||
self["stepdefaults"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
def tickcolor(self):
|
||||
"""
|
||||
Sets the color of the border enclosing the slider.
|
||||
|
||||
The 'tickcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["tickcolor"]
|
||||
|
||||
@tickcolor.setter
|
||||
def tickcolor(self, val):
|
||||
self["tickcolor"] = val
|
||||
|
||||
@property
|
||||
def ticklen(self):
|
||||
"""
|
||||
Sets the length in pixels of step tick marks
|
||||
|
||||
The 'ticklen' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["ticklen"]
|
||||
|
||||
@ticklen.setter
|
||||
def ticklen(self, val):
|
||||
self["ticklen"] = val
|
||||
|
||||
@property
|
||||
def tickwidth(self):
|
||||
"""
|
||||
Sets the tick width (in px).
|
||||
|
||||
The 'tickwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tickwidth"]
|
||||
|
||||
@tickwidth.setter
|
||||
def tickwidth(self, val):
|
||||
self["tickwidth"] = val
|
||||
|
||||
@property
|
||||
def transition(self):
|
||||
"""
|
||||
The 'transition' property is an instance of Transition
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.slider.Transition`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Transition constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.slider.Transition
|
||||
"""
|
||||
return self["transition"]
|
||||
|
||||
@transition.setter
|
||||
def transition(self, val):
|
||||
self["transition"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether or not the slider is visible.
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the x position (in normalized coordinates) of the slider.
|
||||
|
||||
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"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def xanchor(self):
|
||||
"""
|
||||
Sets the slider'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"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the y position (in normalized coordinates) of the slider.
|
||||
|
||||
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"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def yanchor(self):
|
||||
"""
|
||||
Sets the slider'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"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
active
|
||||
Determines which button (by index starting from 0) is
|
||||
considered active.
|
||||
activebgcolor
|
||||
Sets the background color of the slider grip while
|
||||
dragging.
|
||||
bgcolor
|
||||
Sets the background color of the slider.
|
||||
bordercolor
|
||||
Sets the color of the border enclosing the slider.
|
||||
borderwidth
|
||||
Sets the width (in px) of the border enclosing the
|
||||
slider.
|
||||
currentvalue
|
||||
:class:`plotly.graph_objects.layout.slider.Currentvalue
|
||||
` instance or dict with compatible properties
|
||||
font
|
||||
Sets the font of the slider step labels.
|
||||
len
|
||||
Sets the length of the slider This measure excludes the
|
||||
padding of both ends. That is, the slider's length is
|
||||
this length minus the padding on both ends.
|
||||
lenmode
|
||||
Determines whether this slider length is set in units
|
||||
of plot "fraction" or in *pixels. Use `len` to set the
|
||||
value.
|
||||
minorticklen
|
||||
Sets the length in pixels of minor step tick marks
|
||||
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
|
||||
Set the padding of the slider component along each
|
||||
side.
|
||||
steps
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.slider.Step`
|
||||
instances or dicts with compatible properties
|
||||
stepdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.slider.stepdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.slider.steps
|
||||
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`.
|
||||
tickcolor
|
||||
Sets the color of the border enclosing the slider.
|
||||
ticklen
|
||||
Sets the length in pixels of step tick marks
|
||||
tickwidth
|
||||
Sets the tick width (in px).
|
||||
transition
|
||||
:class:`plotly.graph_objects.layout.slider.Transition`
|
||||
instance or dict with compatible properties
|
||||
visible
|
||||
Determines whether or not the slider is visible.
|
||||
x
|
||||
Sets the x position (in normalized coordinates) of the
|
||||
slider.
|
||||
xanchor
|
||||
Sets the slider'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
|
||||
slider.
|
||||
yanchor
|
||||
Sets the slider's vertical position anchor This anchor
|
||||
binds the `y` position to the "top", "middle" or
|
||||
"bottom" of the range selector.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
active=None,
|
||||
activebgcolor=None,
|
||||
bgcolor=None,
|
||||
bordercolor=None,
|
||||
borderwidth=None,
|
||||
currentvalue=None,
|
||||
font=None,
|
||||
len=None,
|
||||
lenmode=None,
|
||||
minorticklen=None,
|
||||
name=None,
|
||||
pad=None,
|
||||
steps=None,
|
||||
stepdefaults=None,
|
||||
templateitemname=None,
|
||||
tickcolor=None,
|
||||
ticklen=None,
|
||||
tickwidth=None,
|
||||
transition=None,
|
||||
visible=None,
|
||||
x=None,
|
||||
xanchor=None,
|
||||
y=None,
|
||||
yanchor=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Slider object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Slider`
|
||||
active
|
||||
Determines which button (by index starting from 0) is
|
||||
considered active.
|
||||
activebgcolor
|
||||
Sets the background color of the slider grip while
|
||||
dragging.
|
||||
bgcolor
|
||||
Sets the background color of the slider.
|
||||
bordercolor
|
||||
Sets the color of the border enclosing the slider.
|
||||
borderwidth
|
||||
Sets the width (in px) of the border enclosing the
|
||||
slider.
|
||||
currentvalue
|
||||
:class:`plotly.graph_objects.layout.slider.Currentvalue
|
||||
` instance or dict with compatible properties
|
||||
font
|
||||
Sets the font of the slider step labels.
|
||||
len
|
||||
Sets the length of the slider This measure excludes the
|
||||
padding of both ends. That is, the slider's length is
|
||||
this length minus the padding on both ends.
|
||||
lenmode
|
||||
Determines whether this slider length is set in units
|
||||
of plot "fraction" or in *pixels. Use `len` to set the
|
||||
value.
|
||||
minorticklen
|
||||
Sets the length in pixels of minor step tick marks
|
||||
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
|
||||
Set the padding of the slider component along each
|
||||
side.
|
||||
steps
|
||||
A tuple of
|
||||
:class:`plotly.graph_objects.layout.slider.Step`
|
||||
instances or dicts with compatible properties
|
||||
stepdefaults
|
||||
When used in a template (as
|
||||
layout.template.layout.slider.stepdefaults), sets the
|
||||
default property values to use for elements of
|
||||
layout.slider.steps
|
||||
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`.
|
||||
tickcolor
|
||||
Sets the color of the border enclosing the slider.
|
||||
ticklen
|
||||
Sets the length in pixels of step tick marks
|
||||
tickwidth
|
||||
Sets the tick width (in px).
|
||||
transition
|
||||
:class:`plotly.graph_objects.layout.slider.Transition`
|
||||
instance or dict with compatible properties
|
||||
visible
|
||||
Determines whether or not the slider is visible.
|
||||
x
|
||||
Sets the x position (in normalized coordinates) of the
|
||||
slider.
|
||||
xanchor
|
||||
Sets the slider'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
|
||||
slider.
|
||||
yanchor
|
||||
Sets the slider's vertical position anchor This anchor
|
||||
binds the `y` position to the "top", "middle" or
|
||||
"bottom" of the range selector.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Slider
|
||||
"""
|
||||
super().__init__("sliders")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Slider
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Slider`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("active", arg, active)
|
||||
self._set_property("activebgcolor", arg, activebgcolor)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("bordercolor", arg, bordercolor)
|
||||
self._set_property("borderwidth", arg, borderwidth)
|
||||
self._set_property("currentvalue", arg, currentvalue)
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("len", arg, len)
|
||||
self._set_property("lenmode", arg, lenmode)
|
||||
self._set_property("minorticklen", arg, minorticklen)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("pad", arg, pad)
|
||||
self._set_property("steps", arg, steps)
|
||||
self._set_property("stepdefaults", arg, stepdefaults)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("tickcolor", arg, tickcolor)
|
||||
self._set_property("ticklen", arg, ticklen)
|
||||
self._set_property("tickwidth", arg, tickwidth)
|
||||
self._set_property("transition", arg, transition)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("y", arg, y)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
166
lib/python3.11/site-packages/plotly/graph_objs/layout/_smith.py
Normal file
166
lib/python3.11/site-packages/plotly/graph_objs/layout/_smith.py
Normal file
@ -0,0 +1,166 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Smith(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.smith"
|
||||
_valid_props = {"bgcolor", "domain", "imaginaryaxis", "realaxis"}
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Set the background color of the subplot
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.smith.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.smith.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def imaginaryaxis(self):
|
||||
"""
|
||||
The 'imaginaryaxis' property is an instance of Imaginaryaxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.smith.Imaginaryaxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Imaginaryaxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.smith.Imaginaryaxis
|
||||
"""
|
||||
return self["imaginaryaxis"]
|
||||
|
||||
@imaginaryaxis.setter
|
||||
def imaginaryaxis(self, val):
|
||||
self["imaginaryaxis"] = val
|
||||
|
||||
@property
|
||||
def realaxis(self):
|
||||
"""
|
||||
The 'realaxis' property is an instance of Realaxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.smith.Realaxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Realaxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.smith.Realaxis
|
||||
"""
|
||||
return self["realaxis"]
|
||||
|
||||
@realaxis.setter
|
||||
def realaxis(self, val):
|
||||
self["realaxis"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.smith.Domain`
|
||||
instance or dict with compatible properties
|
||||
imaginaryaxis
|
||||
:class:`plotly.graph_objects.layout.smith.Imaginaryaxis
|
||||
` instance or dict with compatible properties
|
||||
realaxis
|
||||
:class:`plotly.graph_objects.layout.smith.Realaxis`
|
||||
instance or dict with compatible properties
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
bgcolor=None,
|
||||
domain=None,
|
||||
imaginaryaxis=None,
|
||||
realaxis=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Smith object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Smith`
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.smith.Domain`
|
||||
instance or dict with compatible properties
|
||||
imaginaryaxis
|
||||
:class:`plotly.graph_objects.layout.smith.Imaginaryaxis
|
||||
` instance or dict with compatible properties
|
||||
realaxis
|
||||
:class:`plotly.graph_objects.layout.smith.Realaxis`
|
||||
instance or dict with compatible properties
|
||||
|
||||
Returns
|
||||
-------
|
||||
Smith
|
||||
"""
|
||||
super().__init__("smith")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Smith
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Smith`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("imaginaryaxis", arg, imaginaryaxis)
|
||||
self._set_property("realaxis", arg, realaxis)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,133 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
import warnings
|
||||
|
||||
|
||||
class Template(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.template"
|
||||
_valid_props = {"data", "layout"}
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
"""
|
||||
The 'data' property is an instance of Data
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.template.Data`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Data constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.template.Data
|
||||
"""
|
||||
return self["data"]
|
||||
|
||||
@data.setter
|
||||
def data(self, val):
|
||||
self["data"] = val
|
||||
|
||||
@property
|
||||
def layout(self):
|
||||
"""
|
||||
The 'layout' property is an instance of Layout
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.Layout`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Layout constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.template.Layout
|
||||
"""
|
||||
return self["layout"]
|
||||
|
||||
@layout.setter
|
||||
def layout(self, val):
|
||||
self["layout"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
data
|
||||
:class:`plotly.graph_objects.layout.template.Data`
|
||||
instance or dict with compatible properties
|
||||
layout
|
||||
:class:`plotly.graph_objects.Layout` instance or dict
|
||||
with compatible properties
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, data=None, layout=None, **kwargs):
|
||||
"""
|
||||
Construct a new Template object
|
||||
|
||||
Default attributes to be applied to the plot. This should be a
|
||||
dict with format: `{'layout': layoutTemplate, 'data':
|
||||
{trace_type: [traceTemplate, ...], ...}}` where
|
||||
`layoutTemplate` is a dict matching the structure of
|
||||
`figure.layout` and `traceTemplate` is a dict matching the
|
||||
structure of the trace with type `trace_type` (e.g. 'scatter').
|
||||
Alternatively, this may be specified as an instance of
|
||||
plotly.graph_objs.layout.Template. Trace templates are applied
|
||||
cyclically to traces of each type. Container arrays (eg
|
||||
`annotations`) have special handling: An object ending in
|
||||
`defaults` (eg `annotationdefaults`) is applied to each array
|
||||
item. But if an item has a `templateitemname` key we look in
|
||||
the template array for an item with matching `name` and apply
|
||||
that instead. If no matching `name` is found we mark the item
|
||||
invisible. Any named template item not referenced is appended
|
||||
to the end of the array, so this can be used to add a watermark
|
||||
annotation or a logo image, for example. To omit one of these
|
||||
items on the plot, make an item with matching
|
||||
`templateitemname` and `visible: false`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Template`
|
||||
data
|
||||
:class:`plotly.graph_objects.layout.template.Data`
|
||||
instance or dict with compatible properties
|
||||
layout
|
||||
:class:`plotly.graph_objects.Layout` instance or dict
|
||||
with compatible properties
|
||||
|
||||
Returns
|
||||
-------
|
||||
Template
|
||||
"""
|
||||
super().__init__("template")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Template
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Template`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Template.data contains a 'scattermapbox' key, which causes a
|
||||
# go.Scattermapbox trace object to be created during validation.
|
||||
# In order to prevent false deprecation warnings from surfacing,
|
||||
# we suppress deprecation warnings for this line only.
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
self._set_property("data", arg, data)
|
||||
self._set_property("layout", arg, layout)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,250 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Ternary(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.ternary"
|
||||
_valid_props = {"aaxis", "baxis", "bgcolor", "caxis", "domain", "sum", "uirevision"}
|
||||
|
||||
@property
|
||||
def aaxis(self):
|
||||
"""
|
||||
The 'aaxis' property is an instance of Aaxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.ternary.Aaxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Aaxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.ternary.Aaxis
|
||||
"""
|
||||
return self["aaxis"]
|
||||
|
||||
@aaxis.setter
|
||||
def aaxis(self, val):
|
||||
self["aaxis"] = val
|
||||
|
||||
@property
|
||||
def baxis(self):
|
||||
"""
|
||||
The 'baxis' property is an instance of Baxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.ternary.Baxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Baxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.ternary.Baxis
|
||||
"""
|
||||
return self["baxis"]
|
||||
|
||||
@baxis.setter
|
||||
def baxis(self, val):
|
||||
self["baxis"] = val
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Set the background color of the subplot
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def caxis(self):
|
||||
"""
|
||||
The 'caxis' property is an instance of Caxis
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.ternary.Caxis`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Caxis constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.ternary.Caxis
|
||||
"""
|
||||
return self["caxis"]
|
||||
|
||||
@caxis.setter
|
||||
def caxis(self, val):
|
||||
self["caxis"] = val
|
||||
|
||||
@property
|
||||
def domain(self):
|
||||
"""
|
||||
The 'domain' property is an instance of Domain
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.ternary.Domain`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Domain constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.ternary.Domain
|
||||
"""
|
||||
return self["domain"]
|
||||
|
||||
@domain.setter
|
||||
def domain(self, val):
|
||||
self["domain"] = val
|
||||
|
||||
@property
|
||||
def sum(self):
|
||||
"""
|
||||
The number each triplet should sum to, and the maximum range of
|
||||
each axis
|
||||
|
||||
The 'sum' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["sum"]
|
||||
|
||||
@sum.setter
|
||||
def sum(self, val):
|
||||
self["sum"] = val
|
||||
|
||||
@property
|
||||
def uirevision(self):
|
||||
"""
|
||||
Controls persistence of user-driven changes in axis `min` and
|
||||
`title`, if not overridden in the individual axes. Defaults to
|
||||
`layout.uirevision`.
|
||||
|
||||
The 'uirevision' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["uirevision"]
|
||||
|
||||
@uirevision.setter
|
||||
def uirevision(self, val):
|
||||
self["uirevision"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
aaxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Aaxis`
|
||||
instance or dict with compatible properties
|
||||
baxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Baxis`
|
||||
instance or dict with compatible properties
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
caxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Caxis`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.ternary.Domain`
|
||||
instance or dict with compatible properties
|
||||
sum
|
||||
The number each triplet should sum to, and the maximum
|
||||
range of each axis
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in axis
|
||||
`min` and `title`, if not overridden in the individual
|
||||
axes. Defaults to `layout.uirevision`.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
aaxis=None,
|
||||
baxis=None,
|
||||
bgcolor=None,
|
||||
caxis=None,
|
||||
domain=None,
|
||||
sum=None,
|
||||
uirevision=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Ternary object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Ternary`
|
||||
aaxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Aaxis`
|
||||
instance or dict with compatible properties
|
||||
baxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Baxis`
|
||||
instance or dict with compatible properties
|
||||
bgcolor
|
||||
Set the background color of the subplot
|
||||
caxis
|
||||
:class:`plotly.graph_objects.layout.ternary.Caxis`
|
||||
instance or dict with compatible properties
|
||||
domain
|
||||
:class:`plotly.graph_objects.layout.ternary.Domain`
|
||||
instance or dict with compatible properties
|
||||
sum
|
||||
The number each triplet should sum to, and the maximum
|
||||
range of each axis
|
||||
uirevision
|
||||
Controls persistence of user-driven changes in axis
|
||||
`min` and `title`, if not overridden in the individual
|
||||
axes. Defaults to `layout.uirevision`.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Ternary
|
||||
"""
|
||||
super().__init__("ternary")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Ternary
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Ternary`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("aaxis", arg, aaxis)
|
||||
self._set_property("baxis", arg, baxis)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("caxis", arg, caxis)
|
||||
self._set_property("domain", arg, domain)
|
||||
self._set_property("sum", arg, sum)
|
||||
self._set_property("uirevision", arg, uirevision)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
450
lib/python3.11/site-packages/plotly/graph_objs/layout/_title.py
Normal file
450
lib/python3.11/site-packages/plotly/graph_objs/layout/_title.py
Normal file
@ -0,0 +1,450 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Title(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.title"
|
||||
_valid_props = {
|
||||
"automargin",
|
||||
"font",
|
||||
"pad",
|
||||
"subtitle",
|
||||
"text",
|
||||
"x",
|
||||
"xanchor",
|
||||
"xref",
|
||||
"y",
|
||||
"yanchor",
|
||||
"yref",
|
||||
}
|
||||
|
||||
@property
|
||||
def automargin(self):
|
||||
"""
|
||||
Determines whether the title can automatically push the figure
|
||||
margins. If `yref='paper'` then the margin will expand to
|
||||
ensure that the title doesn’t overlap with the edges of the
|
||||
container. If `yref='container'` then the margins will ensure
|
||||
that the title doesn’t overlap with the plot area, tick labels,
|
||||
and axis titles. If `automargin=true` and the margins need to
|
||||
be expanded, then y will be set to a default 1 and yanchor will
|
||||
be set to an appropriate default to ensure that minimal margin
|
||||
space is needed. Note that when `yref='paper'`, only 1 or 0 are
|
||||
allowed y values. Invalid values will be reset to the default
|
||||
1.
|
||||
|
||||
The 'automargin' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["automargin"]
|
||||
|
||||
@automargin.setter
|
||||
def automargin(self, val):
|
||||
self["automargin"] = val
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the title font.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.title.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.title.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def pad(self):
|
||||
"""
|
||||
Sets the padding of the title. Each padding value only applies
|
||||
when the corresponding `xanchor`/`yanchor` value is set
|
||||
accordingly. E.g. for left padding to take effect, `xanchor`
|
||||
must be set to "left". The same rule applies if
|
||||
`xanchor`/`yanchor` is determined automatically. Padding is
|
||||
muted if the respective anchor value is "middle*/*center".
|
||||
|
||||
The 'pad' property is an instance of Pad
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.title.Pad`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Pad constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.title.Pad
|
||||
"""
|
||||
return self["pad"]
|
||||
|
||||
@pad.setter
|
||||
def pad(self, val):
|
||||
self["pad"] = val
|
||||
|
||||
@property
|
||||
def subtitle(self):
|
||||
"""
|
||||
The 'subtitle' property is an instance of Subtitle
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.title.Subtitle`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Subtitle constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.title.Subtitle
|
||||
"""
|
||||
return self["subtitle"]
|
||||
|
||||
@subtitle.setter
|
||||
def subtitle(self, val):
|
||||
self["subtitle"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the plot's title.
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the x position with respect to `xref` in normalized
|
||||
coordinates from 0 (left) to 1 (right).
|
||||
|
||||
The 'x' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def xanchor(self):
|
||||
"""
|
||||
Sets the title's horizontal alignment with respect to its x
|
||||
position. "left" means that the title starts at x, "right"
|
||||
means that the title ends at x and "center" means that the
|
||||
title's center is at x. "auto" divides `xref` by three and
|
||||
calculates the `xanchor` value automatically based on the value
|
||||
of `x`.
|
||||
|
||||
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"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
def xref(self):
|
||||
"""
|
||||
Sets the container `x` refers to. "container" spans the entire
|
||||
`width` of the plot. "paper" refers to the width of the
|
||||
plotting area only.
|
||||
|
||||
The 'xref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['container', 'paper']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["xref"]
|
||||
|
||||
@xref.setter
|
||||
def xref(self, val):
|
||||
self["xref"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the y position with respect to `yref` in normalized
|
||||
coordinates from 0 (bottom) to 1 (top). "auto" places the
|
||||
baseline of the title onto the vertical center of the top
|
||||
margin.
|
||||
|
||||
The 'y' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def yanchor(self):
|
||||
"""
|
||||
Sets the title's vertical alignment with respect to its y
|
||||
position. "top" means that the title's cap line is at y,
|
||||
"bottom" means that the title's baseline is at y and "middle"
|
||||
means that the title's midline is at y. "auto" divides `yref`
|
||||
by three and calculates the `yanchor` value automatically based
|
||||
on the value of `y`.
|
||||
|
||||
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"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def yref(self):
|
||||
"""
|
||||
Sets the container `y` refers to. "container" spans the entire
|
||||
`height` of the plot. "paper" refers to the height of the
|
||||
plotting area only.
|
||||
|
||||
The 'yref' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['container', 'paper']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yref"]
|
||||
|
||||
@yref.setter
|
||||
def yref(self, val):
|
||||
self["yref"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
automargin
|
||||
Determines whether the title can automatically push the
|
||||
figure margins. If `yref='paper'` then the margin will
|
||||
expand to ensure that the title doesn’t overlap with
|
||||
the edges of the container. If `yref='container'` then
|
||||
the margins will ensure that the title doesn’t overlap
|
||||
with the plot area, tick labels, and axis titles. If
|
||||
`automargin=true` and the margins need to be expanded,
|
||||
then y will be set to a default 1 and yanchor will be
|
||||
set to an appropriate default to ensure that minimal
|
||||
margin space is needed. Note that when `yref='paper'`,
|
||||
only 1 or 0 are allowed y values. Invalid values will
|
||||
be reset to the default 1.
|
||||
font
|
||||
Sets the title font.
|
||||
pad
|
||||
Sets the padding of the title. Each padding value only
|
||||
applies when the corresponding `xanchor`/`yanchor`
|
||||
value is set accordingly. E.g. for left padding to take
|
||||
effect, `xanchor` must be set to "left". The same rule
|
||||
applies if `xanchor`/`yanchor` is determined
|
||||
automatically. Padding is muted if the respective
|
||||
anchor value is "middle*/*center".
|
||||
subtitle
|
||||
:class:`plotly.graph_objects.layout.title.Subtitle`
|
||||
instance or dict with compatible properties
|
||||
text
|
||||
Sets the plot's title.
|
||||
x
|
||||
Sets the x position with respect to `xref` in
|
||||
normalized coordinates from 0 (left) to 1 (right).
|
||||
xanchor
|
||||
Sets the title's horizontal alignment with respect to
|
||||
its x position. "left" means that the title starts at
|
||||
x, "right" means that the title ends at x and "center"
|
||||
means that the title's center is at x. "auto" divides
|
||||
`xref` by three and calculates the `xanchor` value
|
||||
automatically based on the value of `x`.
|
||||
xref
|
||||
Sets the container `x` refers to. "container" spans the
|
||||
entire `width` of the plot. "paper" refers to the width
|
||||
of the plotting area only.
|
||||
y
|
||||
Sets the y position with respect to `yref` in
|
||||
normalized coordinates from 0 (bottom) to 1 (top).
|
||||
"auto" places the baseline of the title onto the
|
||||
vertical center of the top margin.
|
||||
yanchor
|
||||
Sets the title's vertical alignment with respect to its
|
||||
y position. "top" means that the title's cap line is at
|
||||
y, "bottom" means that the title's baseline is at y and
|
||||
"middle" means that the title's midline is at y. "auto"
|
||||
divides `yref` by three and calculates the `yanchor`
|
||||
value automatically based on the value of `y`.
|
||||
yref
|
||||
Sets the container `y` refers to. "container" spans the
|
||||
entire `height` of the plot. "paper" refers to the
|
||||
height of the plotting area only.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
automargin=None,
|
||||
font=None,
|
||||
pad=None,
|
||||
subtitle=None,
|
||||
text=None,
|
||||
x=None,
|
||||
xanchor=None,
|
||||
xref=None,
|
||||
y=None,
|
||||
yanchor=None,
|
||||
yref=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Title object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.Title`
|
||||
automargin
|
||||
Determines whether the title can automatically push the
|
||||
figure margins. If `yref='paper'` then the margin will
|
||||
expand to ensure that the title doesn’t overlap with
|
||||
the edges of the container. If `yref='container'` then
|
||||
the margins will ensure that the title doesn’t overlap
|
||||
with the plot area, tick labels, and axis titles. If
|
||||
`automargin=true` and the margins need to be expanded,
|
||||
then y will be set to a default 1 and yanchor will be
|
||||
set to an appropriate default to ensure that minimal
|
||||
margin space is needed. Note that when `yref='paper'`,
|
||||
only 1 or 0 are allowed y values. Invalid values will
|
||||
be reset to the default 1.
|
||||
font
|
||||
Sets the title font.
|
||||
pad
|
||||
Sets the padding of the title. Each padding value only
|
||||
applies when the corresponding `xanchor`/`yanchor`
|
||||
value is set accordingly. E.g. for left padding to take
|
||||
effect, `xanchor` must be set to "left". The same rule
|
||||
applies if `xanchor`/`yanchor` is determined
|
||||
automatically. Padding is muted if the respective
|
||||
anchor value is "middle*/*center".
|
||||
subtitle
|
||||
:class:`plotly.graph_objects.layout.title.Subtitle`
|
||||
instance or dict with compatible properties
|
||||
text
|
||||
Sets the plot's title.
|
||||
x
|
||||
Sets the x position with respect to `xref` in
|
||||
normalized coordinates from 0 (left) to 1 (right).
|
||||
xanchor
|
||||
Sets the title's horizontal alignment with respect to
|
||||
its x position. "left" means that the title starts at
|
||||
x, "right" means that the title ends at x and "center"
|
||||
means that the title's center is at x. "auto" divides
|
||||
`xref` by three and calculates the `xanchor` value
|
||||
automatically based on the value of `x`.
|
||||
xref
|
||||
Sets the container `x` refers to. "container" spans the
|
||||
entire `width` of the plot. "paper" refers to the width
|
||||
of the plotting area only.
|
||||
y
|
||||
Sets the y position with respect to `yref` in
|
||||
normalized coordinates from 0 (bottom) to 1 (top).
|
||||
"auto" places the baseline of the title onto the
|
||||
vertical center of the top margin.
|
||||
yanchor
|
||||
Sets the title's vertical alignment with respect to its
|
||||
y position. "top" means that the title's cap line is at
|
||||
y, "bottom" means that the title's baseline is at y and
|
||||
"middle" means that the title's midline is at y. "auto"
|
||||
divides `yref` by three and calculates the `yanchor`
|
||||
value automatically based on the value of `y`.
|
||||
yref
|
||||
Sets the container `y` refers to. "container" spans the
|
||||
entire `height` of the plot. "paper" refers to the
|
||||
height of the plotting area only.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Title
|
||||
"""
|
||||
super().__init__("title")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Title
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Title`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("automargin", arg, automargin)
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("pad", arg, pad)
|
||||
self._set_property("subtitle", arg, subtitle)
|
||||
self._set_property("text", arg, text)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("xref", arg, xref)
|
||||
self._set_property("y", arg, y)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._set_property("yref", arg, yref)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,144 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Transition(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.transition"
|
||||
_valid_props = {"duration", "easing", "ordering"}
|
||||
|
||||
@property
|
||||
def duration(self):
|
||||
"""
|
||||
The duration of the transition, in milliseconds. If equal to
|
||||
zero, updates are synchronous.
|
||||
|
||||
The 'duration' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["duration"]
|
||||
|
||||
@duration.setter
|
||||
def duration(self, val):
|
||||
self["duration"] = val
|
||||
|
||||
@property
|
||||
def easing(self):
|
||||
"""
|
||||
The easing function used for the transition
|
||||
|
||||
The 'easing' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['linear', 'quad', 'cubic', 'sin', 'exp', 'circle',
|
||||
'elastic', 'back', 'bounce', 'linear-in', 'quad-in',
|
||||
'cubic-in', 'sin-in', 'exp-in', 'circle-in', 'elastic-in',
|
||||
'back-in', 'bounce-in', 'linear-out', 'quad-out',
|
||||
'cubic-out', 'sin-out', 'exp-out', 'circle-out',
|
||||
'elastic-out', 'back-out', 'bounce-out', 'linear-in-out',
|
||||
'quad-in-out', 'cubic-in-out', 'sin-in-out', 'exp-in-out',
|
||||
'circle-in-out', 'elastic-in-out', 'back-in-out',
|
||||
'bounce-in-out']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["easing"]
|
||||
|
||||
@easing.setter
|
||||
def easing(self, val):
|
||||
self["easing"] = val
|
||||
|
||||
@property
|
||||
def ordering(self):
|
||||
"""
|
||||
Determines whether the figure's layout or traces smoothly
|
||||
transitions during updates that make both traces and layout
|
||||
change.
|
||||
|
||||
The 'ordering' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['layout first', 'traces first']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["ordering"]
|
||||
|
||||
@ordering.setter
|
||||
def ordering(self, val):
|
||||
self["ordering"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
duration
|
||||
The duration of the transition, in milliseconds. If
|
||||
equal to zero, updates are synchronous.
|
||||
easing
|
||||
The easing function used for the transition
|
||||
ordering
|
||||
Determines whether the figure's layout or traces
|
||||
smoothly transitions during updates that make both
|
||||
traces and layout change.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs):
|
||||
"""
|
||||
Construct a new Transition object
|
||||
|
||||
Sets transition options used during Plotly.react updates.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Transition`
|
||||
duration
|
||||
The duration of the transition, in milliseconds. If
|
||||
equal to zero, updates are synchronous.
|
||||
easing
|
||||
The easing function used for the transition
|
||||
ordering
|
||||
Determines whether the figure's layout or traces
|
||||
smoothly transitions during updates that make both
|
||||
traces and layout change.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Transition
|
||||
"""
|
||||
super().__init__("transition")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Transition
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Transition`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("duration", arg, duration)
|
||||
self._set_property("easing", arg, easing)
|
||||
self._set_property("ordering", arg, ordering)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,124 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Uniformtext(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.uniformtext"
|
||||
_valid_props = {"minsize", "mode"}
|
||||
|
||||
@property
|
||||
def minsize(self):
|
||||
"""
|
||||
Sets the minimum text size between traces of the same type.
|
||||
|
||||
The 'minsize' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["minsize"]
|
||||
|
||||
@minsize.setter
|
||||
def minsize(self, val):
|
||||
self["minsize"] = val
|
||||
|
||||
@property
|
||||
def mode(self):
|
||||
"""
|
||||
Determines how the font size for various text elements are
|
||||
uniformed between each trace type. If the computed text sizes
|
||||
were smaller than the minimum size defined by
|
||||
`uniformtext.minsize` using "hide" option hides the text; and
|
||||
using "show" option shows the text without further downscaling.
|
||||
Please note that if the size defined by `minsize` is greater
|
||||
than the font size defined by trace, then the `minsize` is
|
||||
used.
|
||||
|
||||
The 'mode' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
[False, 'hide', 'show']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["mode"]
|
||||
|
||||
@mode.setter
|
||||
def mode(self, val):
|
||||
self["mode"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
minsize
|
||||
Sets the minimum text size between traces of the same
|
||||
type.
|
||||
mode
|
||||
Determines how the font size for various text elements
|
||||
are uniformed between each trace type. If the computed
|
||||
text sizes were smaller than the minimum size defined
|
||||
by `uniformtext.minsize` using "hide" option hides the
|
||||
text; and using "show" option shows the text without
|
||||
further downscaling. Please note that if the size
|
||||
defined by `minsize` is greater than the font size
|
||||
defined by trace, then the `minsize` is used.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, minsize=None, mode=None, **kwargs):
|
||||
"""
|
||||
Construct a new Uniformtext object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.Uniformtext`
|
||||
minsize
|
||||
Sets the minimum text size between traces of the same
|
||||
type.
|
||||
mode
|
||||
Determines how the font size for various text elements
|
||||
are uniformed between each trace type. If the computed
|
||||
text sizes were smaller than the minimum size defined
|
||||
by `uniformtext.minsize` using "hide" option hides the
|
||||
text; and using "show" option shows the text without
|
||||
further downscaling. Please note that if the size
|
||||
defined by `minsize` is greater than the font size
|
||||
defined by trace, then the `minsize` is used.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Uniformtext
|
||||
"""
|
||||
super().__init__("uniformtext")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.Uniformtext
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.Uniformtext`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("minsize", arg, minsize)
|
||||
self._set_property("mode", arg, mode)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,632 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Updatemenu(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout"
|
||||
_path_str = "layout.updatemenu"
|
||||
_valid_props = {
|
||||
"active",
|
||||
"bgcolor",
|
||||
"bordercolor",
|
||||
"borderwidth",
|
||||
"buttondefaults",
|
||||
"buttons",
|
||||
"direction",
|
||||
"font",
|
||||
"name",
|
||||
"pad",
|
||||
"showactive",
|
||||
"templateitemname",
|
||||
"type",
|
||||
"visible",
|
||||
"x",
|
||||
"xanchor",
|
||||
"y",
|
||||
"yanchor",
|
||||
}
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@active.setter
|
||||
def active(self, val):
|
||||
self["active"] = val
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bordercolor"]
|
||||
|
||||
@bordercolor.setter
|
||||
def bordercolor(self, val):
|
||||
self["bordercolor"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@borderwidth.setter
|
||||
def borderwidth(self, val):
|
||||
self["borderwidth"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
tuple[plotly.graph_objs.layout.updatemenu.Button]
|
||||
"""
|
||||
return self["buttons"]
|
||||
|
||||
@buttons.setter
|
||||
def buttons(self, val):
|
||||
self["buttons"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.updatemenu.Button
|
||||
"""
|
||||
return self["buttondefaults"]
|
||||
|
||||
@buttondefaults.setter
|
||||
def buttondefaults(self, val):
|
||||
self["buttondefaults"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@direction.setter
|
||||
def direction(self, val):
|
||||
self["direction"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.updatemenu.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.updatemenu.Pad
|
||||
"""
|
||||
return self["pad"]
|
||||
|
||||
@pad.setter
|
||||
def pad(self, val):
|
||||
self["pad"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@showactive.setter
|
||||
def showactive(self, val):
|
||||
self["showactive"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
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.
|
||||
"""
|
||||
|
||||
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().__init__("updatemenus")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("active", arg, active)
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("bordercolor", arg, bordercolor)
|
||||
self._set_property("borderwidth", arg, borderwidth)
|
||||
self._set_property("buttons", arg, buttons)
|
||||
self._set_property("buttondefaults", arg, buttondefaults)
|
||||
self._set_property("direction", arg, direction)
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("pad", arg, pad)
|
||||
self._set_property("showactive", arg, showactive)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("type", arg, type)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("y", arg, y)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
3558
lib/python3.11/site-packages/plotly/graph_objs/layout/_xaxis.py
Normal file
3558
lib/python3.11/site-packages/plotly/graph_objs/layout/_xaxis.py
Normal file
File diff suppressed because it is too large
Load Diff
3586
lib/python3.11/site-packages/plotly/graph_objs/layout/_yaxis.py
Normal file
3586
lib/python3.11/site-packages/plotly/graph_objs/layout/_yaxis.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
from ._hoverlabel import Hoverlabel
|
||||
from . import hoverlabel
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [".hoverlabel"], ["._font.Font", "._hoverlabel.Hoverlabel"]
|
||||
)
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.annotation"
|
||||
_path_str = "layout.annotation.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the annotation text font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.annotation.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.annotation.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.annotation.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,151 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Hoverlabel(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.annotation"
|
||||
_path_str = "layout.annotation.hoverlabel"
|
||||
_valid_props = {"bgcolor", "bordercolor", "font"}
|
||||
|
||||
@property
|
||||
def bgcolor(self):
|
||||
"""
|
||||
Sets the background color of the hover label. By default uses
|
||||
the annotation's `bgcolor` made opaque, or white if it was
|
||||
transparent.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bgcolor"]
|
||||
|
||||
@bgcolor.setter
|
||||
def bgcolor(self, val):
|
||||
self["bgcolor"] = val
|
||||
|
||||
@property
|
||||
def bordercolor(self):
|
||||
"""
|
||||
Sets the border color of the hover label. By default uses
|
||||
either dark grey or white, for maximum contrast with
|
||||
`hoverlabel.bgcolor`.
|
||||
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["bordercolor"]
|
||||
|
||||
@bordercolor.setter
|
||||
def bordercolor(self, val):
|
||||
self["bordercolor"] = val
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the hover label text font. By default uses the global
|
||||
hover font and size, with color from `hoverlabel.bordercolor`.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.annotation.hoverlabel.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
bgcolor
|
||||
Sets the background color of the hover label. By
|
||||
default uses the annotation's `bgcolor` made opaque, or
|
||||
white if it was transparent.
|
||||
bordercolor
|
||||
Sets the border color of the hover label. By default
|
||||
uses either dark grey or white, for maximum contrast
|
||||
with `hoverlabel.bgcolor`.
|
||||
font
|
||||
Sets the hover label text font. By default uses the
|
||||
global hover font and size, with color from
|
||||
`hoverlabel.bordercolor`.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs):
|
||||
"""
|
||||
Construct a new Hoverlabel object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.annotation.Hoverlabel`
|
||||
bgcolor
|
||||
Sets the background color of the hover label. By
|
||||
default uses the annotation's `bgcolor` made opaque, or
|
||||
white if it was transparent.
|
||||
bordercolor
|
||||
Sets the border color of the hover label. By default
|
||||
uses either dark grey or white, for maximum contrast
|
||||
with `hoverlabel.bgcolor`.
|
||||
font
|
||||
Sets the hover label text font. By default uses the
|
||||
global hover font and size, with color from
|
||||
`hoverlabel.bordercolor`.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Hoverlabel
|
||||
"""
|
||||
super().__init__("hoverlabel")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.annotation.Hoverlabel
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("bgcolor", arg, bgcolor)
|
||||
self._set_property("bordercolor", arg, bordercolor)
|
||||
self._set_property("font", arg, font)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
|
||||
@ -0,0 +1,335 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.annotation.hoverlabel"
|
||||
_path_str = "layout.annotation.hoverlabel.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the hover label text font. By default uses the global
|
||||
hover font and size, with color from `hoverlabel.bordercolor`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.annotat
|
||||
ion.hoverlabel.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.annotation.hoverlabel.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,12 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._colorbar import ColorBar
|
||||
from . import colorbar
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [".colorbar"], ["._colorbar.ColorBar"]
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._tickfont import Tickfont
|
||||
from ._tickformatstop import Tickformatstop
|
||||
from ._title import Title
|
||||
from . import title
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".title"],
|
||||
["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"],
|
||||
)
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Tickfont(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.coloraxis.colorbar"
|
||||
_path_str = "layout.coloraxis.colorbar.tickfont"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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.layout.colorax
|
||||
is.colorbar.Tickfont`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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().__init__("tickfont")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.coloraxis.colorbar.Tickfont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,241 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Tickformatstop(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.coloraxis.colorbar"
|
||||
_path_str = "layout.coloraxis.colorbar.tickformatstop"
|
||||
_valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"}
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@dtickrange.setter
|
||||
def dtickrange(self, val):
|
||||
self["dtickrange"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@enabled.setter
|
||||
def enabled(self, val):
|
||||
self["enabled"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@value.setter
|
||||
def value(self, val):
|
||||
self["value"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
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"
|
||||
enabled
|
||||
Determines whether or not this stop is used. If
|
||||
`false`, this stop is ignored even within its
|
||||
`dtickrange`.
|
||||
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`.
|
||||
value
|
||||
string - dtickformat for described zoom level, the same
|
||||
as "tickformat"
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
dtickrange=None,
|
||||
enabled=None,
|
||||
name=None,
|
||||
templateitemname=None,
|
||||
value=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Tickformatstop object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.colorax
|
||||
is.colorbar.Tickformatstop`
|
||||
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"
|
||||
enabled
|
||||
Determines whether or not this stop is used. If
|
||||
`false`, this stop is ignored even within its
|
||||
`dtickrange`.
|
||||
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`.
|
||||
value
|
||||
string - dtickformat for described zoom level, the same
|
||||
as "tickformat"
|
||||
|
||||
Returns
|
||||
-------
|
||||
Tickformatstop
|
||||
"""
|
||||
super().__init__("tickformatstops")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.coloraxis.colorbar.Tickformatstop
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("dtickrange", arg, dtickrange)
|
||||
self._set_property("enabled", arg, enabled)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("value", arg, value)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,136 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Title(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.coloraxis.colorbar"
|
||||
_path_str = "layout.coloraxis.colorbar.title"
|
||||
_valid_props = {"font", "side", "text"}
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets this color bar's title font.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.coloraxis.colorbar.title.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def side(self):
|
||||
"""
|
||||
Determines the location of color bar's title with respect to
|
||||
the color bar. Defaults to "top" when `orientation` if "v" and
|
||||
defaults to "right" when `orientation` if "h".
|
||||
|
||||
The 'side' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['right', 'top', 'bottom']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["side"]
|
||||
|
||||
@side.setter
|
||||
def side(self, val):
|
||||
self["side"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the title of the color bar.
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
font
|
||||
Sets this color bar's title font.
|
||||
side
|
||||
Determines the location of color bar's title with
|
||||
respect to the color bar. Defaults to "top" when
|
||||
`orientation` if "v" and defaults to "right" when
|
||||
`orientation` if "h".
|
||||
text
|
||||
Sets the title of the color bar.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, font=None, side=None, text=None, **kwargs):
|
||||
"""
|
||||
Construct a new Title object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.colorax
|
||||
is.colorbar.Title`
|
||||
font
|
||||
Sets this color bar's title font.
|
||||
side
|
||||
Determines the location of color bar's title with
|
||||
respect to the color bar. Defaults to "top" when
|
||||
`orientation` if "v" and defaults to "right" when
|
||||
`orientation` if "h".
|
||||
text
|
||||
Sets the title of the color bar.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Title
|
||||
"""
|
||||
super().__init__("title")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.coloraxis.colorbar.Title
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("side", arg, side)
|
||||
self._set_property("text", arg, text)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.coloraxis.colorbar.title"
|
||||
_path_str = "layout.coloraxis.colorbar.title.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets this color bar's title font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.colorax
|
||||
is.colorbar.title.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.coloraxis.colorbar.title.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,24 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._center import Center
|
||||
from ._domain import Domain
|
||||
from ._lataxis import Lataxis
|
||||
from ._lonaxis import Lonaxis
|
||||
from ._projection import Projection
|
||||
from . import projection
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".projection"],
|
||||
[
|
||||
"._center.Center",
|
||||
"._domain.Domain",
|
||||
"._lataxis.Lataxis",
|
||||
"._lonaxis.Lonaxis",
|
||||
"._projection.Projection",
|
||||
],
|
||||
)
|
||||
@ -0,0 +1,115 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Center(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.center"
|
||||
_valid_props = {"lat", "lon"}
|
||||
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Sets the latitude of the map's center. For all projection
|
||||
types, the map's latitude center lies at the middle of the
|
||||
latitude range by default.
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Sets the longitude of the map's center. By default, the map's
|
||||
longitude center lies at the middle of the longitude range for
|
||||
scoped projection and above `projection.rotation.lon`
|
||||
otherwise.
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
lat
|
||||
Sets the latitude of the map's center. For all
|
||||
projection types, the map's latitude center lies at the
|
||||
middle of the latitude range by default.
|
||||
lon
|
||||
Sets the longitude of the map's center. By default, the
|
||||
map's longitude center lies at the middle of the
|
||||
longitude range for scoped projection and above
|
||||
`projection.rotation.lon` otherwise.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, **kwargs):
|
||||
"""
|
||||
Construct a new Center object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Center`
|
||||
lat
|
||||
Sets the latitude of the map's center. For all
|
||||
projection types, the map's latitude center lies at the
|
||||
middle of the latitude range by default.
|
||||
lon
|
||||
Sets the longitude of the map's center. By default, the
|
||||
map's longitude center lies at the middle of the
|
||||
longitude range for scoped projection and above
|
||||
`projection.rotation.lon` otherwise.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Center
|
||||
"""
|
||||
super().__init__("center")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.Center
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Center`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("lat", arg, lat)
|
||||
self._set_property("lon", arg, lon)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,204 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Domain(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.domain"
|
||||
_valid_props = {"column", "row", "x", "y"}
|
||||
|
||||
@property
|
||||
def column(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this column in
|
||||
the grid for this geo subplot . Note that geo subplots are
|
||||
constrained by domain. In general, when `projection.scale` is
|
||||
set to 1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
The 'column' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["column"]
|
||||
|
||||
@column.setter
|
||||
def column(self, val):
|
||||
self["column"] = val
|
||||
|
||||
@property
|
||||
def row(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this row in the
|
||||
grid for this geo subplot . Note that geo subplots are
|
||||
constrained by domain. In general, when `projection.scale` is
|
||||
set to 1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
The 'row' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["row"]
|
||||
|
||||
@row.setter
|
||||
def row(self, val):
|
||||
self["row"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by domain. In
|
||||
general, when `projection.scale` is set to 1. a map will fit
|
||||
either its x or y domain, but not both.
|
||||
|
||||
The 'x' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'x[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'x[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by domain. In
|
||||
general, when `projection.scale` is set to 1. a map will fit
|
||||
either its x or y domain, but not both.
|
||||
|
||||
The 'y' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'y[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'y[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
x
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
y
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs):
|
||||
"""
|
||||
Construct a new Domain object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Domain`
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
x
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
y
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Domain
|
||||
"""
|
||||
super().__init__("domain")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.Domain
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Domain`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("column", arg, column)
|
||||
self._set_property("row", arg, row)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("y", arg, y)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,258 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Lataxis(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.lataxis"
|
||||
_valid_props = {
|
||||
"dtick",
|
||||
"gridcolor",
|
||||
"griddash",
|
||||
"gridwidth",
|
||||
"range",
|
||||
"showgrid",
|
||||
"tick0",
|
||||
}
|
||||
|
||||
@property
|
||||
def dtick(self):
|
||||
"""
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
|
||||
The 'dtick' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["dtick"]
|
||||
|
||||
@dtick.setter
|
||||
def dtick(self, val):
|
||||
self["dtick"] = val
|
||||
|
||||
@property
|
||||
def gridcolor(self):
|
||||
"""
|
||||
Sets the graticule's stroke color.
|
||||
|
||||
The 'gridcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["gridcolor"]
|
||||
|
||||
@gridcolor.setter
|
||||
def gridcolor(self, val):
|
||||
self["gridcolor"] = val
|
||||
|
||||
@property
|
||||
def griddash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'griddash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["griddash"]
|
||||
|
||||
@griddash.setter
|
||||
def griddash(self, val):
|
||||
self["griddash"] = val
|
||||
|
||||
@property
|
||||
def gridwidth(self):
|
||||
"""
|
||||
Sets the graticule's stroke width (in px).
|
||||
|
||||
The 'gridwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["gridwidth"]
|
||||
|
||||
@gridwidth.setter
|
||||
def gridwidth(self, val):
|
||||
self["gridwidth"] = val
|
||||
|
||||
@property
|
||||
def range(self):
|
||||
"""
|
||||
Sets the range of this axis (in degrees), sets the map's
|
||||
clipped coordinates.
|
||||
|
||||
The 'range' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'range[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'range[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["range"]
|
||||
|
||||
@range.setter
|
||||
def range(self, val):
|
||||
self["range"] = val
|
||||
|
||||
@property
|
||||
def showgrid(self):
|
||||
"""
|
||||
Sets whether or not graticule are shown on the map.
|
||||
|
||||
The 'showgrid' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showgrid"]
|
||||
|
||||
@showgrid.setter
|
||||
def showgrid(self, val):
|
||||
self["showgrid"] = val
|
||||
|
||||
@property
|
||||
def tick0(self):
|
||||
"""
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
The 'tick0' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tick0"]
|
||||
|
||||
@tick0.setter
|
||||
def tick0(self, val):
|
||||
self["tick0"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
dtick=None,
|
||||
gridcolor=None,
|
||||
griddash=None,
|
||||
gridwidth=None,
|
||||
range=None,
|
||||
showgrid=None,
|
||||
tick0=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Lataxis object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Lataxis`
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Lataxis
|
||||
"""
|
||||
super().__init__("lataxis")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.Lataxis
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("dtick", arg, dtick)
|
||||
self._set_property("gridcolor", arg, gridcolor)
|
||||
self._set_property("griddash", arg, griddash)
|
||||
self._set_property("gridwidth", arg, gridwidth)
|
||||
self._set_property("range", arg, range)
|
||||
self._set_property("showgrid", arg, showgrid)
|
||||
self._set_property("tick0", arg, tick0)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,258 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Lonaxis(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.lonaxis"
|
||||
_valid_props = {
|
||||
"dtick",
|
||||
"gridcolor",
|
||||
"griddash",
|
||||
"gridwidth",
|
||||
"range",
|
||||
"showgrid",
|
||||
"tick0",
|
||||
}
|
||||
|
||||
@property
|
||||
def dtick(self):
|
||||
"""
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
|
||||
The 'dtick' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["dtick"]
|
||||
|
||||
@dtick.setter
|
||||
def dtick(self, val):
|
||||
self["dtick"] = val
|
||||
|
||||
@property
|
||||
def gridcolor(self):
|
||||
"""
|
||||
Sets the graticule's stroke color.
|
||||
|
||||
The 'gridcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["gridcolor"]
|
||||
|
||||
@gridcolor.setter
|
||||
def gridcolor(self, val):
|
||||
self["gridcolor"] = val
|
||||
|
||||
@property
|
||||
def griddash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'griddash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["griddash"]
|
||||
|
||||
@griddash.setter
|
||||
def griddash(self, val):
|
||||
self["griddash"] = val
|
||||
|
||||
@property
|
||||
def gridwidth(self):
|
||||
"""
|
||||
Sets the graticule's stroke width (in px).
|
||||
|
||||
The 'gridwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["gridwidth"]
|
||||
|
||||
@gridwidth.setter
|
||||
def gridwidth(self, val):
|
||||
self["gridwidth"] = val
|
||||
|
||||
@property
|
||||
def range(self):
|
||||
"""
|
||||
Sets the range of this axis (in degrees), sets the map's
|
||||
clipped coordinates.
|
||||
|
||||
The 'range' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'range[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'range[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["range"]
|
||||
|
||||
@range.setter
|
||||
def range(self, val):
|
||||
self["range"] = val
|
||||
|
||||
@property
|
||||
def showgrid(self):
|
||||
"""
|
||||
Sets whether or not graticule are shown on the map.
|
||||
|
||||
The 'showgrid' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showgrid"]
|
||||
|
||||
@showgrid.setter
|
||||
def showgrid(self, val):
|
||||
self["showgrid"] = val
|
||||
|
||||
@property
|
||||
def tick0(self):
|
||||
"""
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
The 'tick0' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tick0"]
|
||||
|
||||
@tick0.setter
|
||||
def tick0(self, val):
|
||||
self["tick0"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
dtick=None,
|
||||
gridcolor=None,
|
||||
griddash=None,
|
||||
gridwidth=None,
|
||||
range=None,
|
||||
showgrid=None,
|
||||
tick0=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Lonaxis object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Lonaxis`
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Lonaxis
|
||||
"""
|
||||
super().__init__("lonaxis")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.Lonaxis
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("dtick", arg, dtick)
|
||||
self._set_property("gridcolor", arg, gridcolor)
|
||||
self._set_property("griddash", arg, griddash)
|
||||
self._set_property("gridwidth", arg, gridwidth)
|
||||
self._set_property("range", arg, range)
|
||||
self._set_property("showgrid", arg, showgrid)
|
||||
self._set_property("tick0", arg, tick0)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,251 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Projection(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.projection"
|
||||
_valid_props = {"distance", "parallels", "rotation", "scale", "tilt", "type"}
|
||||
|
||||
@property
|
||||
def distance(self):
|
||||
"""
|
||||
For satellite projection type only. Sets the distance from the
|
||||
center of the sphere to the point of view as a proportion of
|
||||
the sphere’s radius.
|
||||
|
||||
The 'distance' property is a number and may be specified as:
|
||||
- An int or float in the interval [1.001, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["distance"]
|
||||
|
||||
@distance.setter
|
||||
def distance(self, val):
|
||||
self["distance"] = val
|
||||
|
||||
@property
|
||||
def parallels(self):
|
||||
"""
|
||||
For conic projection types only. Sets the parallels (tangent,
|
||||
secant) where the cone intersects the sphere.
|
||||
|
||||
The 'parallels' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'parallels[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'parallels[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["parallels"]
|
||||
|
||||
@parallels.setter
|
||||
def parallels(self, val):
|
||||
self["parallels"] = val
|
||||
|
||||
@property
|
||||
def rotation(self):
|
||||
"""
|
||||
The 'rotation' property is an instance of Rotation
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Rotation constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.geo.projection.Rotation
|
||||
"""
|
||||
return self["rotation"]
|
||||
|
||||
@rotation.setter
|
||||
def rotation(self, val):
|
||||
self["rotation"] = val
|
||||
|
||||
@property
|
||||
def scale(self):
|
||||
"""
|
||||
Zooms in or out on the map view. A scale of 1 corresponds to
|
||||
the largest zoom level that fits the map's lon and lat ranges.
|
||||
|
||||
The 'scale' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["scale"]
|
||||
|
||||
@scale.setter
|
||||
def scale(self, val):
|
||||
self["scale"] = val
|
||||
|
||||
@property
|
||||
def tilt(self):
|
||||
"""
|
||||
For satellite projection type only. Sets the tilt angle of
|
||||
perspective projection.
|
||||
|
||||
The 'tilt' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tilt"]
|
||||
|
||||
@tilt.setter
|
||||
def tilt(self, val):
|
||||
self["tilt"] = val
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Sets the projection type.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['airy', 'aitoff', 'albers', 'albers usa', 'august',
|
||||
'azimuthal equal area', 'azimuthal equidistant', 'baker',
|
||||
'bertin1953', 'boggs', 'bonne', 'bottomley', 'bromley',
|
||||
'collignon', 'conic conformal', 'conic equal area', 'conic
|
||||
equidistant', 'craig', 'craster', 'cylindrical equal
|
||||
area', 'cylindrical stereographic', 'eckert1', 'eckert2',
|
||||
'eckert3', 'eckert4', 'eckert5', 'eckert6', 'eisenlohr',
|
||||
'equal earth', 'equirectangular', 'fahey', 'foucaut',
|
||||
'foucaut sinusoidal', 'ginzburg4', 'ginzburg5',
|
||||
'ginzburg6', 'ginzburg8', 'ginzburg9', 'gnomonic',
|
||||
'gringorten', 'gringorten quincuncial', 'guyou', 'hammer',
|
||||
'hill', 'homolosine', 'hufnagel', 'hyperelliptical',
|
||||
'kavrayskiy7', 'lagrange', 'larrivee', 'laskowski',
|
||||
'loximuthal', 'mercator', 'miller', 'mollweide', 'mt flat
|
||||
polar parabolic', 'mt flat polar quartic', 'mt flat polar
|
||||
sinusoidal', 'natural earth', 'natural earth1', 'natural
|
||||
earth2', 'nell hammer', 'nicolosi', 'orthographic',
|
||||
'patterson', 'peirce quincuncial', 'polyconic',
|
||||
'rectangular polyconic', 'robinson', 'satellite', 'sinu
|
||||
mollweide', 'sinusoidal', 'stereographic', 'times',
|
||||
'transverse mercator', 'van der grinten', 'van der
|
||||
grinten2', 'van der grinten3', 'van der grinten4',
|
||||
'wagner4', 'wagner6', 'wiechel', 'winkel tripel',
|
||||
'winkel3']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
distance
|
||||
For satellite projection type only. Sets the distance
|
||||
from the center of the sphere to the point of view as a
|
||||
proportion of the sphere’s radius.
|
||||
parallels
|
||||
For conic projection types only. Sets the parallels
|
||||
(tangent, secant) where the cone intersects the sphere.
|
||||
rotation
|
||||
:class:`plotly.graph_objects.layout.geo.projection.Rota
|
||||
tion` instance or dict with compatible properties
|
||||
scale
|
||||
Zooms in or out on the map view. A scale of 1
|
||||
corresponds to the largest zoom level that fits the
|
||||
map's lon and lat ranges.
|
||||
tilt
|
||||
For satellite projection type only. Sets the tilt angle
|
||||
of perspective projection.
|
||||
type
|
||||
Sets the projection type.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
distance=None,
|
||||
parallels=None,
|
||||
rotation=None,
|
||||
scale=None,
|
||||
tilt=None,
|
||||
type=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Projection object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Projection`
|
||||
distance
|
||||
For satellite projection type only. Sets the distance
|
||||
from the center of the sphere to the point of view as a
|
||||
proportion of the sphere’s radius.
|
||||
parallels
|
||||
For conic projection types only. Sets the parallels
|
||||
(tangent, secant) where the cone intersects the sphere.
|
||||
rotation
|
||||
:class:`plotly.graph_objects.layout.geo.projection.Rota
|
||||
tion` instance or dict with compatible properties
|
||||
scale
|
||||
Zooms in or out on the map view. A scale of 1
|
||||
corresponds to the largest zoom level that fits the
|
||||
map's lon and lat ranges.
|
||||
tilt
|
||||
For satellite projection type only. Sets the tilt angle
|
||||
of perspective projection.
|
||||
type
|
||||
Sets the projection type.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Projection
|
||||
"""
|
||||
super().__init__("projection")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.Projection
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Projection`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("distance", arg, distance)
|
||||
self._set_property("parallels", arg, parallels)
|
||||
self._set_property("rotation", arg, rotation)
|
||||
self._set_property("scale", arg, scale)
|
||||
self._set_property("tilt", arg, tilt)
|
||||
self._set_property("type", arg, type)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,11 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._rotation import Rotation
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._rotation.Rotation"]
|
||||
)
|
||||
@ -0,0 +1,129 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Rotation(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.geo.projection"
|
||||
_path_str = "layout.geo.projection.rotation"
|
||||
_valid_props = {"lat", "lon", "roll"}
|
||||
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Rotates the map along meridians (in degrees North).
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Rotates the map along parallels (in degrees East). Defaults to
|
||||
the center of the `lonaxis.range` values.
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
@property
|
||||
def roll(self):
|
||||
"""
|
||||
Roll the map (in degrees) For example, a roll of 180 makes the
|
||||
map appear upside down.
|
||||
|
||||
The 'roll' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["roll"]
|
||||
|
||||
@roll.setter
|
||||
def roll(self, val):
|
||||
self["roll"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
lat
|
||||
Rotates the map along meridians (in degrees North).
|
||||
lon
|
||||
Rotates the map along parallels (in degrees East).
|
||||
Defaults to the center of the `lonaxis.range` values.
|
||||
roll
|
||||
Roll the map (in degrees) For example, a roll of 180
|
||||
makes the map appear upside down.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs):
|
||||
"""
|
||||
Construct a new Rotation object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.pro
|
||||
jection.Rotation`
|
||||
lat
|
||||
Rotates the map along meridians (in degrees North).
|
||||
lon
|
||||
Rotates the map along parallels (in degrees East).
|
||||
Defaults to the center of the `lonaxis.range` values.
|
||||
roll
|
||||
Roll the map (in degrees) For example, a roll of 180
|
||||
makes the map appear upside down.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Rotation
|
||||
"""
|
||||
super().__init__("rotation")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.geo.projection.Rotation
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("lat", arg, lat)
|
||||
self._set_property("lon", arg, lon)
|
||||
self._set_property("roll", arg, roll)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._domain import Domain
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._domain.Domain"])
|
||||
@ -0,0 +1,122 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Domain(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.grid"
|
||||
_path_str = "layout.grid.domain"
|
||||
_valid_props = {"x", "y"}
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the horizontal domain of this grid subplot (in plot
|
||||
fraction). The first and last cells end exactly at the domain
|
||||
edges, with no grout around the edges.
|
||||
|
||||
The 'x' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'x[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'x[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the vertical domain of this grid subplot (in plot
|
||||
fraction). The first and last cells end exactly at the domain
|
||||
edges, with no grout around the edges.
|
||||
|
||||
The 'y' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'y[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'y[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
x
|
||||
Sets the horizontal domain of this grid subplot (in
|
||||
plot fraction). The first and last cells end exactly at
|
||||
the domain edges, with no grout around the edges.
|
||||
y
|
||||
Sets the vertical domain of this grid subplot (in plot
|
||||
fraction). The first and last cells end exactly at the
|
||||
domain edges, with no grout around the edges.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, x=None, y=None, **kwargs):
|
||||
"""
|
||||
Construct a new Domain object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.grid.Domain`
|
||||
x
|
||||
Sets the horizontal domain of this grid subplot (in
|
||||
plot fraction). The first and last cells end exactly at
|
||||
the domain edges, with no grout around the edges.
|
||||
y
|
||||
Sets the vertical domain of this grid subplot (in plot
|
||||
fraction). The first and last cells end exactly at the
|
||||
domain edges, with no grout around the edges.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Domain
|
||||
"""
|
||||
super().__init__("domain")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.grid.Domain
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.grid.Domain`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("y", arg, y)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,12 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
from ._grouptitlefont import Grouptitlefont
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._font.Font", "._grouptitlefont.Grouptitlefont"]
|
||||
)
|
||||
@ -0,0 +1,335 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.hoverlabel"
|
||||
_path_str = "layout.hoverlabel.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the default hover label font used by all traces on the
|
||||
graph.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.hoverlabel.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.hoverlabel.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,335 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Grouptitlefont(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.hoverlabel"
|
||||
_path_str = "layout.hoverlabel.grouptitlefont"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Grouptitlefont object
|
||||
|
||||
Sets the font for group titles in hover (unified modes).
|
||||
Defaults to `hoverlabel.font`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.hoverla
|
||||
bel.Grouptitlefont`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Grouptitlefont
|
||||
"""
|
||||
super().__init__("grouptitlefont")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.hoverlabel.Grouptitlefont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
from ._grouptitlefont import Grouptitlefont
|
||||
from ._title import Title
|
||||
from . import title
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".title"],
|
||||
["._font.Font", "._grouptitlefont.Grouptitlefont", "._title.Title"],
|
||||
)
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.legend"
|
||||
_path_str = "layout.legend.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the font used to text the legend items.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.legend.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.legend.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.legend.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,335 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Grouptitlefont(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.legend"
|
||||
_path_str = "layout.legend.grouptitlefont"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Grouptitlefont object
|
||||
|
||||
Sets the font for group titles in legend. Defaults to
|
||||
`legend.font` with its size increased about 10%.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.legend.Grouptitlefont`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Grouptitlefont
|
||||
"""
|
||||
super().__init__("grouptitlefont")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.legend.Grouptitlefont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.legend.Grouptitlefont`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,145 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Title(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.legend"
|
||||
_path_str = "layout.legend.title"
|
||||
_valid_props = {"font", "side", "text"}
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets this legend's title font. Defaults to `legend.font` with
|
||||
its size increased about 20%.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.legend.title.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.legend.title.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def side(self):
|
||||
"""
|
||||
Determines the location of legend's title with respect to the
|
||||
legend items. Defaulted to "top" with `orientation` is "h".
|
||||
Defaulted to "left" with `orientation` is "v". The *top left*
|
||||
options could be used to expand top center and top right are
|
||||
for horizontal alignment legend area in both x and y sides.
|
||||
|
||||
The 'side' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top', 'left', 'top left', 'top center', 'top right']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["side"]
|
||||
|
||||
@side.setter
|
||||
def side(self, val):
|
||||
self["side"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the title of the legend.
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
font
|
||||
Sets this legend's title font. Defaults to
|
||||
`legend.font` with its size increased about 20%.
|
||||
side
|
||||
Determines the location of legend's title with respect
|
||||
to the legend items. Defaulted to "top" with
|
||||
`orientation` is "h". Defaulted to "left" with
|
||||
`orientation` is "v". The *top left* options could be
|
||||
used to expand top center and top right are for
|
||||
horizontal alignment legend area in both x and y sides.
|
||||
text
|
||||
Sets the title of the legend.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, font=None, side=None, text=None, **kwargs):
|
||||
"""
|
||||
Construct a new Title object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.legend.Title`
|
||||
font
|
||||
Sets this legend's title font. Defaults to
|
||||
`legend.font` with its size increased about 20%.
|
||||
side
|
||||
Determines the location of legend's title with respect
|
||||
to the legend items. Defaulted to "top" with
|
||||
`orientation` is "h". Defaulted to "left" with
|
||||
`orientation` is "v". The *top left* options could be
|
||||
used to expand top center and top right are for
|
||||
horizontal alignment legend area in both x and y sides.
|
||||
text
|
||||
Sets the title of the legend.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Title
|
||||
"""
|
||||
super().__init__("title")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.legend.Title
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.legend.Title`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("side", arg, side)
|
||||
self._set_property("text", arg, text)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
|
||||
@ -0,0 +1,335 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.legend.title"
|
||||
_path_str = "layout.legend.title.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets this legend's title font. Defaults to `legend.font` with
|
||||
its size increased about 20%.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.legend.title.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.legend.title.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.legend.title.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._bounds import Bounds
|
||||
from ._center import Center
|
||||
from ._domain import Domain
|
||||
from ._layer import Layer
|
||||
from . import layer
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".layer"],
|
||||
["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"],
|
||||
)
|
||||
@ -0,0 +1,160 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Bounds(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map"
|
||||
_path_str = "layout.map.bounds"
|
||||
_valid_props = {"east", "north", "south", "west"}
|
||||
|
||||
@property
|
||||
def east(self):
|
||||
"""
|
||||
Sets the maximum longitude of the map (in degrees East) if
|
||||
`west`, `south` and `north` are declared.
|
||||
|
||||
The 'east' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["east"]
|
||||
|
||||
@east.setter
|
||||
def east(self, val):
|
||||
self["east"] = val
|
||||
|
||||
@property
|
||||
def north(self):
|
||||
"""
|
||||
Sets the maximum latitude of the map (in degrees North) if
|
||||
`east`, `west` and `south` are declared.
|
||||
|
||||
The 'north' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["north"]
|
||||
|
||||
@north.setter
|
||||
def north(self, val):
|
||||
self["north"] = val
|
||||
|
||||
@property
|
||||
def south(self):
|
||||
"""
|
||||
Sets the minimum latitude of the map (in degrees North) if
|
||||
`east`, `west` and `north` are declared.
|
||||
|
||||
The 'south' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["south"]
|
||||
|
||||
@south.setter
|
||||
def south(self, val):
|
||||
self["south"] = val
|
||||
|
||||
@property
|
||||
def west(self):
|
||||
"""
|
||||
Sets the minimum longitude of the map (in degrees East) if
|
||||
`east`, `south` and `north` are declared.
|
||||
|
||||
The 'west' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["west"]
|
||||
|
||||
@west.setter
|
||||
def west(self, val):
|
||||
self["west"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
east
|
||||
Sets the maximum longitude of the map (in degrees East)
|
||||
if `west`, `south` and `north` are declared.
|
||||
north
|
||||
Sets the maximum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `south` are declared.
|
||||
south
|
||||
Sets the minimum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `north` are declared.
|
||||
west
|
||||
Sets the minimum longitude of the map (in degrees East)
|
||||
if `east`, `south` and `north` are declared.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, arg=None, east=None, north=None, south=None, west=None, **kwargs
|
||||
):
|
||||
"""
|
||||
Construct a new Bounds object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.Bounds`
|
||||
east
|
||||
Sets the maximum longitude of the map (in degrees East)
|
||||
if `west`, `south` and `north` are declared.
|
||||
north
|
||||
Sets the maximum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `south` are declared.
|
||||
south
|
||||
Sets the minimum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `north` are declared.
|
||||
west
|
||||
Sets the minimum longitude of the map (in degrees East)
|
||||
if `east`, `south` and `north` are declared.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Bounds
|
||||
"""
|
||||
super().__init__("bounds")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.Bounds
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.Bounds`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("east", arg, east)
|
||||
self._set_property("north", arg, north)
|
||||
self._set_property("south", arg, south)
|
||||
self._set_property("west", arg, west)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,104 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Center(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map"
|
||||
_path_str = "layout.map.center"
|
||||
_valid_props = {"lat", "lon"}
|
||||
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Sets the latitude of the center of the map (in degrees North).
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Sets the longitude of the center of the map (in degrees East).
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
lat
|
||||
Sets the latitude of the center of the map (in degrees
|
||||
North).
|
||||
lon
|
||||
Sets the longitude of the center of the map (in degrees
|
||||
East).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, **kwargs):
|
||||
"""
|
||||
Construct a new Center object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.Center`
|
||||
lat
|
||||
Sets the latitude of the center of the map (in degrees
|
||||
North).
|
||||
lon
|
||||
Sets the longitude of the center of the map (in degrees
|
||||
East).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Center
|
||||
"""
|
||||
super().__init__("center")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.Center
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.Center`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("lat", arg, lat)
|
||||
self._set_property("lon", arg, lon)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,170 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Domain(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map"
|
||||
_path_str = "layout.map.domain"
|
||||
_valid_props = {"column", "row", "x", "y"}
|
||||
|
||||
@property
|
||||
def column(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this column in
|
||||
the grid for this map subplot .
|
||||
|
||||
The 'column' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["column"]
|
||||
|
||||
@column.setter
|
||||
def column(self, val):
|
||||
self["column"] = val
|
||||
|
||||
@property
|
||||
def row(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this row in the
|
||||
grid for this map subplot .
|
||||
|
||||
The 'row' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["row"]
|
||||
|
||||
@row.setter
|
||||
def row(self, val):
|
||||
self["row"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the horizontal domain of this map subplot (in plot
|
||||
fraction).
|
||||
|
||||
The 'x' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'x[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'x[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the vertical domain of this map subplot (in plot
|
||||
fraction).
|
||||
|
||||
The 'y' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'y[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'y[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this map subplot .
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this map subplot .
|
||||
x
|
||||
Sets the horizontal domain of this map subplot (in plot
|
||||
fraction).
|
||||
y
|
||||
Sets the vertical domain of this map subplot (in plot
|
||||
fraction).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs):
|
||||
"""
|
||||
Construct a new Domain object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.Domain`
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this map subplot .
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this map subplot .
|
||||
x
|
||||
Sets the horizontal domain of this map subplot (in plot
|
||||
fraction).
|
||||
y
|
||||
Sets the vertical domain of this map subplot (in plot
|
||||
fraction).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Domain
|
||||
"""
|
||||
super().__init__("domain")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.Domain
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.Domain`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("column", arg, column)
|
||||
self._set_property("row", arg, row)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("y", arg, y)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,691 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Layer(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map"
|
||||
_path_str = "layout.map.layer"
|
||||
_valid_props = {
|
||||
"below",
|
||||
"circle",
|
||||
"color",
|
||||
"coordinates",
|
||||
"fill",
|
||||
"line",
|
||||
"maxzoom",
|
||||
"minzoom",
|
||||
"name",
|
||||
"opacity",
|
||||
"source",
|
||||
"sourceattribution",
|
||||
"sourcelayer",
|
||||
"sourcetype",
|
||||
"symbol",
|
||||
"templateitemname",
|
||||
"type",
|
||||
"visible",
|
||||
}
|
||||
|
||||
@property
|
||||
def below(self):
|
||||
"""
|
||||
Determines if the layer will be inserted before the layer with
|
||||
the specified ID. If omitted or set to '', the layer will be
|
||||
inserted above every existing layer.
|
||||
|
||||
The 'below' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["below"]
|
||||
|
||||
@below.setter
|
||||
def below(self, val):
|
||||
self["below"] = val
|
||||
|
||||
@property
|
||||
def circle(self):
|
||||
"""
|
||||
The 'circle' property is an instance of Circle
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.layer.Circle`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Circle constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.layer.Circle
|
||||
"""
|
||||
return self["circle"]
|
||||
|
||||
@circle.setter
|
||||
def circle(self, val):
|
||||
self["circle"] = val
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the primary layer color. If `type` is "circle", color
|
||||
corresponds to the circle color (map.layer.paint.circle-color)
|
||||
If `type` is "line", color corresponds to the line color
|
||||
(map.layer.paint.line-color) If `type` is "fill", color
|
||||
corresponds to the fill color (map.layer.paint.fill-color) If
|
||||
`type` is "symbol", color corresponds to the icon color
|
||||
(map.layer.paint.icon-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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def coordinates(self):
|
||||
"""
|
||||
Sets the coordinates array contains [longitude, latitude] pairs
|
||||
for the image corners listed in clockwise order: top left, top
|
||||
right, bottom right, bottom left. Only has an effect for
|
||||
"image" `sourcetype`.
|
||||
|
||||
The 'coordinates' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["coordinates"]
|
||||
|
||||
@coordinates.setter
|
||||
def coordinates(self, val):
|
||||
self["coordinates"] = val
|
||||
|
||||
@property
|
||||
def fill(self):
|
||||
"""
|
||||
The 'fill' property is an instance of Fill
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.layer.Fill`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Fill constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.layer.Fill
|
||||
"""
|
||||
return self["fill"]
|
||||
|
||||
@fill.setter
|
||||
def fill(self, val):
|
||||
self["fill"] = val
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
"""
|
||||
The 'line' property is an instance of Line
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.layer.Line`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Line constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.layer.Line
|
||||
"""
|
||||
return self["line"]
|
||||
|
||||
@line.setter
|
||||
def line(self, val):
|
||||
self["line"] = val
|
||||
|
||||
@property
|
||||
def maxzoom(self):
|
||||
"""
|
||||
Sets the maximum zoom level (map.layer.maxzoom). At zoom levels
|
||||
equal to or greater than the maxzoom, the layer will be hidden.
|
||||
|
||||
The 'maxzoom' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 24]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["maxzoom"]
|
||||
|
||||
@maxzoom.setter
|
||||
def maxzoom(self, val):
|
||||
self["maxzoom"] = val
|
||||
|
||||
@property
|
||||
def minzoom(self):
|
||||
"""
|
||||
Sets the minimum zoom level (map.layer.minzoom). At zoom levels
|
||||
less than the minzoom, the layer will be hidden.
|
||||
|
||||
The 'minzoom' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 24]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["minzoom"]
|
||||
|
||||
@minzoom.setter
|
||||
def minzoom(self, val):
|
||||
self["minzoom"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the layer. If `type` is "circle", opacity
|
||||
corresponds to the circle opacity (map.layer.paint.circle-
|
||||
opacity) If `type` is "line", opacity corresponds to the line
|
||||
opacity (map.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity (map.layer.paint.fill-
|
||||
opacity) If `type` is "symbol", opacity corresponds to the
|
||||
icon/text opacity (map.layer.paint.text-opacity)
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""
|
||||
Sets the source data for this layer (map.layer.source). When
|
||||
`sourcetype` is set to "geojson", `source` can be a URL to a
|
||||
GeoJSON or a GeoJSON object. When `sourcetype` is set to
|
||||
"vector" or "raster", `source` can be a URL or an array of tile
|
||||
URLs. When `sourcetype` is set to "image", `source` can be a
|
||||
URL to an image.
|
||||
|
||||
The 'source' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["source"]
|
||||
|
||||
@source.setter
|
||||
def source(self, val):
|
||||
self["source"] = val
|
||||
|
||||
@property
|
||||
def sourceattribution(self):
|
||||
"""
|
||||
Sets the attribution for this source.
|
||||
|
||||
The 'sourceattribution' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sourceattribution"]
|
||||
|
||||
@sourceattribution.setter
|
||||
def sourceattribution(self, val):
|
||||
self["sourceattribution"] = val
|
||||
|
||||
@property
|
||||
def sourcelayer(self):
|
||||
"""
|
||||
Specifies the layer to use from a vector tile source
|
||||
(map.layer.source-layer). Required for "vector" source type
|
||||
that supports multiple layers.
|
||||
|
||||
The 'sourcelayer' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sourcelayer"]
|
||||
|
||||
@sourcelayer.setter
|
||||
def sourcelayer(self, val):
|
||||
self["sourcelayer"] = val
|
||||
|
||||
@property
|
||||
def sourcetype(self):
|
||||
"""
|
||||
Sets the source type for this layer, that is the type of the
|
||||
layer data.
|
||||
|
||||
The 'sourcetype' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['geojson', 'vector', 'raster', 'image']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["sourcetype"]
|
||||
|
||||
@sourcetype.setter
|
||||
def sourcetype(self, val):
|
||||
self["sourcetype"] = val
|
||||
|
||||
@property
|
||||
def symbol(self):
|
||||
"""
|
||||
The 'symbol' property is an instance of Symbol
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.layer.Symbol`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Symbol constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.layer.Symbol
|
||||
"""
|
||||
return self["symbol"]
|
||||
|
||||
@symbol.setter
|
||||
def symbol(self, val):
|
||||
self["symbol"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Sets the layer type, that is the how the layer data set in
|
||||
`source` will be rendered With `sourcetype` set to "geojson",
|
||||
the following values are allowed: "circle", "line", "fill" and
|
||||
"symbol". but note that "line" and "fill" are not compatible
|
||||
with Point GeoJSON geometries. With `sourcetype` set to
|
||||
"vector", the following values are allowed: "circle", "line",
|
||||
"fill" and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['circle', 'line', 'fill', 'symbol', 'raster']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether this layer is displayed
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
below
|
||||
Determines if the layer will be inserted before the
|
||||
layer with the specified ID. If omitted or set to '',
|
||||
the layer will be inserted above every existing layer.
|
||||
circle
|
||||
:class:`plotly.graph_objects.layout.map.layer.Circle`
|
||||
instance or dict with compatible properties
|
||||
color
|
||||
Sets the primary layer color. If `type` is "circle",
|
||||
color corresponds to the circle color
|
||||
(map.layer.paint.circle-color) If `type` is "line",
|
||||
color corresponds to the line color
|
||||
(map.layer.paint.line-color) If `type` is "fill", color
|
||||
corresponds to the fill color (map.layer.paint.fill-
|
||||
color) If `type` is "symbol", color corresponds to the
|
||||
icon color (map.layer.paint.icon-color)
|
||||
coordinates
|
||||
Sets the coordinates array contains [longitude,
|
||||
latitude] pairs for the image corners listed in
|
||||
clockwise order: top left, top right, bottom right,
|
||||
bottom left. Only has an effect for "image"
|
||||
`sourcetype`.
|
||||
fill
|
||||
:class:`plotly.graph_objects.layout.map.layer.Fill`
|
||||
instance or dict with compatible properties
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.map.layer.Line`
|
||||
instance or dict with compatible properties
|
||||
maxzoom
|
||||
Sets the maximum zoom level (map.layer.maxzoom). At
|
||||
zoom levels equal to or greater than the maxzoom, the
|
||||
layer will be hidden.
|
||||
minzoom
|
||||
Sets the minimum zoom level (map.layer.minzoom). At
|
||||
zoom levels less than the minzoom, the layer will be
|
||||
hidden.
|
||||
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 layer. If `type` is "circle",
|
||||
opacity corresponds to the circle opacity
|
||||
(map.layer.paint.circle-opacity) If `type` is "line",
|
||||
opacity corresponds to the line opacity
|
||||
(map.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity
|
||||
(map.layer.paint.fill-opacity) If `type` is "symbol",
|
||||
opacity corresponds to the icon/text opacity
|
||||
(map.layer.paint.text-opacity)
|
||||
source
|
||||
Sets the source data for this layer (map.layer.source).
|
||||
When `sourcetype` is set to "geojson", `source` can be
|
||||
a URL to a GeoJSON or a GeoJSON object. When
|
||||
`sourcetype` is set to "vector" or "raster", `source`
|
||||
can be a URL or an array of tile URLs. When
|
||||
`sourcetype` is set to "image", `source` can be a URL
|
||||
to an image.
|
||||
sourceattribution
|
||||
Sets the attribution for this source.
|
||||
sourcelayer
|
||||
Specifies the layer to use from a vector tile source
|
||||
(map.layer.source-layer). Required for "vector" source
|
||||
type that supports multiple layers.
|
||||
sourcetype
|
||||
Sets the source type for this layer, that is the type
|
||||
of the layer data.
|
||||
symbol
|
||||
:class:`plotly.graph_objects.layout.map.layer.Symbol`
|
||||
instance or dict with compatible properties
|
||||
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
|
||||
Sets the layer type, that is the how the layer data set
|
||||
in `source` will be rendered With `sourcetype` set to
|
||||
"geojson", the following values are allowed: "circle",
|
||||
"line", "fill" and "symbol". but note that "line" and
|
||||
"fill" are not compatible with Point GeoJSON
|
||||
geometries. With `sourcetype` set to "vector", the
|
||||
following values are allowed: "circle", "line", "fill"
|
||||
and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
visible
|
||||
Determines whether this layer is displayed
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
below=None,
|
||||
circle=None,
|
||||
color=None,
|
||||
coordinates=None,
|
||||
fill=None,
|
||||
line=None,
|
||||
maxzoom=None,
|
||||
minzoom=None,
|
||||
name=None,
|
||||
opacity=None,
|
||||
source=None,
|
||||
sourceattribution=None,
|
||||
sourcelayer=None,
|
||||
sourcetype=None,
|
||||
symbol=None,
|
||||
templateitemname=None,
|
||||
type=None,
|
||||
visible=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Layer object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.Layer`
|
||||
below
|
||||
Determines if the layer will be inserted before the
|
||||
layer with the specified ID. If omitted or set to '',
|
||||
the layer will be inserted above every existing layer.
|
||||
circle
|
||||
:class:`plotly.graph_objects.layout.map.layer.Circle`
|
||||
instance or dict with compatible properties
|
||||
color
|
||||
Sets the primary layer color. If `type` is "circle",
|
||||
color corresponds to the circle color
|
||||
(map.layer.paint.circle-color) If `type` is "line",
|
||||
color corresponds to the line color
|
||||
(map.layer.paint.line-color) If `type` is "fill", color
|
||||
corresponds to the fill color (map.layer.paint.fill-
|
||||
color) If `type` is "symbol", color corresponds to the
|
||||
icon color (map.layer.paint.icon-color)
|
||||
coordinates
|
||||
Sets the coordinates array contains [longitude,
|
||||
latitude] pairs for the image corners listed in
|
||||
clockwise order: top left, top right, bottom right,
|
||||
bottom left. Only has an effect for "image"
|
||||
`sourcetype`.
|
||||
fill
|
||||
:class:`plotly.graph_objects.layout.map.layer.Fill`
|
||||
instance or dict with compatible properties
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.map.layer.Line`
|
||||
instance or dict with compatible properties
|
||||
maxzoom
|
||||
Sets the maximum zoom level (map.layer.maxzoom). At
|
||||
zoom levels equal to or greater than the maxzoom, the
|
||||
layer will be hidden.
|
||||
minzoom
|
||||
Sets the minimum zoom level (map.layer.minzoom). At
|
||||
zoom levels less than the minzoom, the layer will be
|
||||
hidden.
|
||||
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 layer. If `type` is "circle",
|
||||
opacity corresponds to the circle opacity
|
||||
(map.layer.paint.circle-opacity) If `type` is "line",
|
||||
opacity corresponds to the line opacity
|
||||
(map.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity
|
||||
(map.layer.paint.fill-opacity) If `type` is "symbol",
|
||||
opacity corresponds to the icon/text opacity
|
||||
(map.layer.paint.text-opacity)
|
||||
source
|
||||
Sets the source data for this layer (map.layer.source).
|
||||
When `sourcetype` is set to "geojson", `source` can be
|
||||
a URL to a GeoJSON or a GeoJSON object. When
|
||||
`sourcetype` is set to "vector" or "raster", `source`
|
||||
can be a URL or an array of tile URLs. When
|
||||
`sourcetype` is set to "image", `source` can be a URL
|
||||
to an image.
|
||||
sourceattribution
|
||||
Sets the attribution for this source.
|
||||
sourcelayer
|
||||
Specifies the layer to use from a vector tile source
|
||||
(map.layer.source-layer). Required for "vector" source
|
||||
type that supports multiple layers.
|
||||
sourcetype
|
||||
Sets the source type for this layer, that is the type
|
||||
of the layer data.
|
||||
symbol
|
||||
:class:`plotly.graph_objects.layout.map.layer.Symbol`
|
||||
instance or dict with compatible properties
|
||||
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
|
||||
Sets the layer type, that is the how the layer data set
|
||||
in `source` will be rendered With `sourcetype` set to
|
||||
"geojson", the following values are allowed: "circle",
|
||||
"line", "fill" and "symbol". but note that "line" and
|
||||
"fill" are not compatible with Point GeoJSON
|
||||
geometries. With `sourcetype` set to "vector", the
|
||||
following values are allowed: "circle", "line", "fill"
|
||||
and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
visible
|
||||
Determines whether this layer is displayed
|
||||
|
||||
Returns
|
||||
-------
|
||||
Layer
|
||||
"""
|
||||
super().__init__("layers")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.Layer
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.Layer`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("below", arg, below)
|
||||
self._set_property("circle", arg, circle)
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("coordinates", arg, coordinates)
|
||||
self._set_property("fill", arg, fill)
|
||||
self._set_property("line", arg, line)
|
||||
self._set_property("maxzoom", arg, maxzoom)
|
||||
self._set_property("minzoom", arg, minzoom)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._set_property("source", arg, source)
|
||||
self._set_property("sourceattribution", arg, sourceattribution)
|
||||
self._set_property("sourcelayer", arg, sourcelayer)
|
||||
self._set_property("sourcetype", arg, sourcetype)
|
||||
self._set_property("symbol", arg, symbol)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("type", arg, type)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._circle import Circle
|
||||
from ._fill import Fill
|
||||
from ._line import Line
|
||||
from ._symbol import Symbol
|
||||
from . import symbol
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".symbol"],
|
||||
["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"],
|
||||
)
|
||||
@ -0,0 +1,80 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Circle(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map.layer"
|
||||
_path_str = "layout.map.layer.circle"
|
||||
_valid_props = {"radius"}
|
||||
|
||||
@property
|
||||
def radius(self):
|
||||
"""
|
||||
Sets the circle radius (map.layer.paint.circle-radius). Has an
|
||||
effect only when `type` is set to "circle".
|
||||
|
||||
The 'radius' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["radius"]
|
||||
|
||||
@radius.setter
|
||||
def radius(self, val):
|
||||
self["radius"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
radius
|
||||
Sets the circle radius (map.layer.paint.circle-radius).
|
||||
Has an effect only when `type` is set to "circle".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, radius=None, **kwargs):
|
||||
"""
|
||||
Construct a new Circle object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.layer.Circle`
|
||||
radius
|
||||
Sets the circle radius (map.layer.paint.circle-radius).
|
||||
Has an effect only when `type` is set to "circle".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Circle
|
||||
"""
|
||||
super().__init__("circle")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.layer.Circle
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.layer.Circle`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("radius", arg, radius)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,86 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Fill(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map.layer"
|
||||
_path_str = "layout.map.layer.fill"
|
||||
_valid_props = {"outlinecolor"}
|
||||
|
||||
@property
|
||||
def outlinecolor(self):
|
||||
"""
|
||||
Sets the fill outline color (map.layer.paint.fill-outline-
|
||||
color). Has an effect only when `type` is set to "fill".
|
||||
|
||||
The 'outlinecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["outlinecolor"]
|
||||
|
||||
@outlinecolor.setter
|
||||
def outlinecolor(self, val):
|
||||
self["outlinecolor"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
outlinecolor
|
||||
Sets the fill outline color (map.layer.paint.fill-
|
||||
outline-color). Has an effect only when `type` is set
|
||||
to "fill".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, outlinecolor=None, **kwargs):
|
||||
"""
|
||||
Construct a new Fill object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.layer.Fill`
|
||||
outlinecolor
|
||||
Sets the fill outline color (map.layer.paint.fill-
|
||||
outline-color). Has an effect only when `type` is set
|
||||
to "fill".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Fill
|
||||
"""
|
||||
super().__init__("fill")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.layer.Fill
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.layer.Fill`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("outlinecolor", arg, outlinecolor)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,133 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Line(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map.layer"
|
||||
_path_str = "layout.map.layer.line"
|
||||
_valid_props = {"dash", "dashsrc", "width"}
|
||||
|
||||
@property
|
||||
def dash(self):
|
||||
"""
|
||||
Sets the length of dashes and gaps (map.layer.paint.line-
|
||||
dasharray). Has an effect only when `type` is set to "line".
|
||||
|
||||
The 'dash' property is an array that may be specified as a tuple,
|
||||
list, numpy array, or pandas Series
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray
|
||||
"""
|
||||
return self["dash"]
|
||||
|
||||
@dash.setter
|
||||
def dash(self, val):
|
||||
self["dash"] = val
|
||||
|
||||
@property
|
||||
def dashsrc(self):
|
||||
"""
|
||||
Sets the source reference on Chart Studio Cloud for `dash`.
|
||||
|
||||
The 'dashsrc' property must be specified as a string or
|
||||
as a plotly.grid_objs.Column object
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["dashsrc"]
|
||||
|
||||
@dashsrc.setter
|
||||
def dashsrc(self, val):
|
||||
self["dashsrc"] = val
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Sets the line width (map.layer.paint.line-width). Has an effect
|
||||
only when `type` is set to "line".
|
||||
|
||||
The 'width' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["width"]
|
||||
|
||||
@width.setter
|
||||
def width(self, val):
|
||||
self["width"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dash
|
||||
Sets the length of dashes and gaps
|
||||
(map.layer.paint.line-dasharray). Has an effect only
|
||||
when `type` is set to "line".
|
||||
dashsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`dash`.
|
||||
width
|
||||
Sets the line width (map.layer.paint.line-width). Has
|
||||
an effect only when `type` is set to "line".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs):
|
||||
"""
|
||||
Construct a new Line object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.layer.Line`
|
||||
dash
|
||||
Sets the length of dashes and gaps
|
||||
(map.layer.paint.line-dasharray). Has an effect only
|
||||
when `type` is set to "line".
|
||||
dashsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`dash`.
|
||||
width
|
||||
Sets the line width (map.layer.paint.line-width). Has
|
||||
an effect only when `type` is set to "line".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Line
|
||||
"""
|
||||
super().__init__("line")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.layer.Line
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.layer.Line`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("dash", arg, dash)
|
||||
self._set_property("dashsrc", arg, dashsrc)
|
||||
self._set_property("width", arg, width)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,243 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Symbol(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map.layer"
|
||||
_path_str = "layout.map.layer.symbol"
|
||||
_valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"}
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""
|
||||
Sets the symbol icon image (map.layer.layout.icon-image). Full
|
||||
list: https://www.mapbox.com/maki-icons/
|
||||
|
||||
The 'icon' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["icon"]
|
||||
|
||||
@icon.setter
|
||||
def icon(self, val):
|
||||
self["icon"] = val
|
||||
|
||||
@property
|
||||
def iconsize(self):
|
||||
"""
|
||||
Sets the symbol icon size (map.layer.layout.icon-size). Has an
|
||||
effect only when `type` is set to "symbol".
|
||||
|
||||
The 'iconsize' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["iconsize"]
|
||||
|
||||
@iconsize.setter
|
||||
def iconsize(self, val):
|
||||
self["iconsize"] = val
|
||||
|
||||
@property
|
||||
def placement(self):
|
||||
"""
|
||||
Sets the symbol and/or text placement (map.layer.layout.symbol-
|
||||
placement). If `placement` is "point", the label is placed
|
||||
where the geometry is located If `placement` is "line", the
|
||||
label is placed along the line of the geometry If `placement`
|
||||
is "line-center", the label is placed on the center of the
|
||||
geometry
|
||||
|
||||
The 'placement' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['point', 'line', 'line-center']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["placement"]
|
||||
|
||||
@placement.setter
|
||||
def placement(self, val):
|
||||
self["placement"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the symbol text (map.layer.layout.text-field).
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def textfont(self):
|
||||
"""
|
||||
Sets the icon text font (color=map.layer.paint.text-color,
|
||||
size=map.layer.layout.text-size). Has an effect only when
|
||||
`type` is set to "symbol".
|
||||
|
||||
The 'textfont' property is an instance of Textfont
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.map.layer.symbol.Textfont`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Textfont constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.map.layer.symbol.Textfont
|
||||
"""
|
||||
return self["textfont"]
|
||||
|
||||
@textfont.setter
|
||||
def textfont(self, val):
|
||||
self["textfont"] = val
|
||||
|
||||
@property
|
||||
def textposition(self):
|
||||
"""
|
||||
Sets the positions of the `text` elements with respects to the
|
||||
(x,y) coordinates.
|
||||
|
||||
The 'textposition' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top left', 'top center', 'top right', 'middle left',
|
||||
'middle center', 'middle right', 'bottom left', 'bottom
|
||||
center', 'bottom right']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["textposition"]
|
||||
|
||||
@textposition.setter
|
||||
def textposition(self, val):
|
||||
self["textposition"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
icon
|
||||
Sets the symbol icon image (map.layer.layout.icon-
|
||||
image). Full list: https://www.mapbox.com/maki-icons/
|
||||
iconsize
|
||||
Sets the symbol icon size (map.layer.layout.icon-size).
|
||||
Has an effect only when `type` is set to "symbol".
|
||||
placement
|
||||
Sets the symbol and/or text placement
|
||||
(map.layer.layout.symbol-placement). If `placement` is
|
||||
"point", the label is placed where the geometry is
|
||||
located If `placement` is "line", the label is placed
|
||||
along the line of the geometry If `placement` is "line-
|
||||
center", the label is placed on the center of the
|
||||
geometry
|
||||
text
|
||||
Sets the symbol text (map.layer.layout.text-field).
|
||||
textfont
|
||||
Sets the icon text font (color=map.layer.paint.text-
|
||||
color, size=map.layer.layout.text-size). Has an effect
|
||||
only when `type` is set to "symbol".
|
||||
textposition
|
||||
Sets the positions of the `text` elements with respects
|
||||
to the (x,y) coordinates.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
icon=None,
|
||||
iconsize=None,
|
||||
placement=None,
|
||||
text=None,
|
||||
textfont=None,
|
||||
textposition=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Symbol object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.map.layer.Symbol`
|
||||
icon
|
||||
Sets the symbol icon image (map.layer.layout.icon-
|
||||
image). Full list: https://www.mapbox.com/maki-icons/
|
||||
iconsize
|
||||
Sets the symbol icon size (map.layer.layout.icon-size).
|
||||
Has an effect only when `type` is set to "symbol".
|
||||
placement
|
||||
Sets the symbol and/or text placement
|
||||
(map.layer.layout.symbol-placement). If `placement` is
|
||||
"point", the label is placed where the geometry is
|
||||
located If `placement` is "line", the label is placed
|
||||
along the line of the geometry If `placement` is "line-
|
||||
center", the label is placed on the center of the
|
||||
geometry
|
||||
text
|
||||
Sets the symbol text (map.layer.layout.text-field).
|
||||
textfont
|
||||
Sets the icon text font (color=map.layer.paint.text-
|
||||
color, size=map.layer.layout.text-size). Has an effect
|
||||
only when `type` is set to "symbol".
|
||||
textposition
|
||||
Sets the positions of the `text` elements with respects
|
||||
to the (x,y) coordinates.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Symbol
|
||||
"""
|
||||
super().__init__("symbol")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.layer.Symbol
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.layer.Symbol`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("icon", arg, icon)
|
||||
self._set_property("iconsize", arg, iconsize)
|
||||
self._set_property("placement", arg, placement)
|
||||
self._set_property("text", arg, text)
|
||||
self._set_property("textfont", arg, textfont)
|
||||
self._set_property("textposition", arg, textposition)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,11 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._textfont import Textfont
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._textfont.Textfont"]
|
||||
)
|
||||
@ -0,0 +1,202 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Textfont(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.map.layer.symbol"
|
||||
_path_str = "layout.map.layer.symbol.textfont"
|
||||
_valid_props = {"color", "family", "size", "style", "weight"}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
size
|
||||
|
||||
style
|
||||
Sets whether a font should be styled with a normal or
|
||||
italic face from its family.
|
||||
weight
|
||||
Sets the weight (or boldness) of the font.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
color=None,
|
||||
family=None,
|
||||
size=None,
|
||||
style=None,
|
||||
weight=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Textfont object
|
||||
|
||||
Sets the icon text font (color=map.layer.paint.text-color,
|
||||
size=map.layer.layout.text-size). Has an effect only when
|
||||
`type` is set to "symbol".
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.lay
|
||||
er.symbol.Textfont`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
size
|
||||
|
||||
style
|
||||
Sets whether a font should be styled with a normal or
|
||||
italic face from its family.
|
||||
weight
|
||||
Sets the weight (or boldness) of the font.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Textfont
|
||||
"""
|
||||
super().__init__("textfont")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.map.layer.symbol.Textfont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.map.layer.symbol.Textfont`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._bounds import Bounds
|
||||
from ._center import Center
|
||||
from ._domain import Domain
|
||||
from ._layer import Layer
|
||||
from . import layer
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".layer"],
|
||||
["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"],
|
||||
)
|
||||
@ -0,0 +1,160 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Bounds(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox"
|
||||
_path_str = "layout.mapbox.bounds"
|
||||
_valid_props = {"east", "north", "south", "west"}
|
||||
|
||||
@property
|
||||
def east(self):
|
||||
"""
|
||||
Sets the maximum longitude of the map (in degrees East) if
|
||||
`west`, `south` and `north` are declared.
|
||||
|
||||
The 'east' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["east"]
|
||||
|
||||
@east.setter
|
||||
def east(self, val):
|
||||
self["east"] = val
|
||||
|
||||
@property
|
||||
def north(self):
|
||||
"""
|
||||
Sets the maximum latitude of the map (in degrees North) if
|
||||
`east`, `west` and `south` are declared.
|
||||
|
||||
The 'north' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["north"]
|
||||
|
||||
@north.setter
|
||||
def north(self, val):
|
||||
self["north"] = val
|
||||
|
||||
@property
|
||||
def south(self):
|
||||
"""
|
||||
Sets the minimum latitude of the map (in degrees North) if
|
||||
`east`, `west` and `north` are declared.
|
||||
|
||||
The 'south' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["south"]
|
||||
|
||||
@south.setter
|
||||
def south(self, val):
|
||||
self["south"] = val
|
||||
|
||||
@property
|
||||
def west(self):
|
||||
"""
|
||||
Sets the minimum longitude of the map (in degrees East) if
|
||||
`east`, `south` and `north` are declared.
|
||||
|
||||
The 'west' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["west"]
|
||||
|
||||
@west.setter
|
||||
def west(self, val):
|
||||
self["west"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
east
|
||||
Sets the maximum longitude of the map (in degrees East)
|
||||
if `west`, `south` and `north` are declared.
|
||||
north
|
||||
Sets the maximum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `south` are declared.
|
||||
south
|
||||
Sets the minimum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `north` are declared.
|
||||
west
|
||||
Sets the minimum longitude of the map (in degrees East)
|
||||
if `east`, `south` and `north` are declared.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, arg=None, east=None, north=None, south=None, west=None, **kwargs
|
||||
):
|
||||
"""
|
||||
Construct a new Bounds object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.Bounds`
|
||||
east
|
||||
Sets the maximum longitude of the map (in degrees East)
|
||||
if `west`, `south` and `north` are declared.
|
||||
north
|
||||
Sets the maximum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `south` are declared.
|
||||
south
|
||||
Sets the minimum latitude of the map (in degrees North)
|
||||
if `east`, `west` and `north` are declared.
|
||||
west
|
||||
Sets the minimum longitude of the map (in degrees East)
|
||||
if `east`, `south` and `north` are declared.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Bounds
|
||||
"""
|
||||
super().__init__("bounds")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.Bounds
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.Bounds`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("east", arg, east)
|
||||
self._set_property("north", arg, north)
|
||||
self._set_property("south", arg, south)
|
||||
self._set_property("west", arg, west)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,104 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Center(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox"
|
||||
_path_str = "layout.mapbox.center"
|
||||
_valid_props = {"lat", "lon"}
|
||||
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Sets the latitude of the center of the map (in degrees North).
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Sets the longitude of the center of the map (in degrees East).
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
lat
|
||||
Sets the latitude of the center of the map (in degrees
|
||||
North).
|
||||
lon
|
||||
Sets the longitude of the center of the map (in degrees
|
||||
East).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, **kwargs):
|
||||
"""
|
||||
Construct a new Center object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.Center`
|
||||
lat
|
||||
Sets the latitude of the center of the map (in degrees
|
||||
North).
|
||||
lon
|
||||
Sets the longitude of the center of the map (in degrees
|
||||
East).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Center
|
||||
"""
|
||||
super().__init__("center")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.Center
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.Center`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("lat", arg, lat)
|
||||
self._set_property("lon", arg, lon)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,170 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Domain(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox"
|
||||
_path_str = "layout.mapbox.domain"
|
||||
_valid_props = {"column", "row", "x", "y"}
|
||||
|
||||
@property
|
||||
def column(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this column in
|
||||
the grid for this mapbox subplot .
|
||||
|
||||
The 'column' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["column"]
|
||||
|
||||
@column.setter
|
||||
def column(self, val):
|
||||
self["column"] = val
|
||||
|
||||
@property
|
||||
def row(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this row in the
|
||||
grid for this mapbox subplot .
|
||||
|
||||
The 'row' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["row"]
|
||||
|
||||
@row.setter
|
||||
def row(self, val):
|
||||
self["row"] = val
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the horizontal domain of this mapbox subplot (in plot
|
||||
fraction).
|
||||
|
||||
The 'x' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'x[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'x[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the vertical domain of this mapbox subplot (in plot
|
||||
fraction).
|
||||
|
||||
The 'y' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'y[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'y[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this mapbox subplot .
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this mapbox subplot .
|
||||
x
|
||||
Sets the horizontal domain of this mapbox subplot (in
|
||||
plot fraction).
|
||||
y
|
||||
Sets the vertical domain of this mapbox subplot (in
|
||||
plot fraction).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs):
|
||||
"""
|
||||
Construct a new Domain object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.Domain`
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this mapbox subplot .
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this mapbox subplot .
|
||||
x
|
||||
Sets the horizontal domain of this mapbox subplot (in
|
||||
plot fraction).
|
||||
y
|
||||
Sets the vertical domain of this mapbox subplot (in
|
||||
plot fraction).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Domain
|
||||
"""
|
||||
super().__init__("domain")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.Domain
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.Domain`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("column", arg, column)
|
||||
self._set_property("row", arg, row)
|
||||
self._set_property("x", arg, x)
|
||||
self._set_property("y", arg, y)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,695 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Layer(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox"
|
||||
_path_str = "layout.mapbox.layer"
|
||||
_valid_props = {
|
||||
"below",
|
||||
"circle",
|
||||
"color",
|
||||
"coordinates",
|
||||
"fill",
|
||||
"line",
|
||||
"maxzoom",
|
||||
"minzoom",
|
||||
"name",
|
||||
"opacity",
|
||||
"source",
|
||||
"sourceattribution",
|
||||
"sourcelayer",
|
||||
"sourcetype",
|
||||
"symbol",
|
||||
"templateitemname",
|
||||
"type",
|
||||
"visible",
|
||||
}
|
||||
|
||||
@property
|
||||
def below(self):
|
||||
"""
|
||||
Determines if the layer will be inserted before the layer with
|
||||
the specified ID. If omitted or set to '', the layer will be
|
||||
inserted above every existing layer.
|
||||
|
||||
The 'below' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["below"]
|
||||
|
||||
@below.setter
|
||||
def below(self, val):
|
||||
self["below"] = val
|
||||
|
||||
@property
|
||||
def circle(self):
|
||||
"""
|
||||
The 'circle' property is an instance of Circle
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Circle constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.layer.Circle
|
||||
"""
|
||||
return self["circle"]
|
||||
|
||||
@circle.setter
|
||||
def circle(self, val):
|
||||
self["circle"] = val
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the primary layer color. If `type` is "circle", color
|
||||
corresponds to the circle color (mapbox.layer.paint.circle-
|
||||
color) If `type` is "line", color corresponds to the line color
|
||||
(mapbox.layer.paint.line-color) If `type` is "fill", color
|
||||
corresponds to the fill color (mapbox.layer.paint.fill-color)
|
||||
If `type` is "symbol", color corresponds to the icon color
|
||||
(mapbox.layer.paint.icon-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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def coordinates(self):
|
||||
"""
|
||||
Sets the coordinates array contains [longitude, latitude] pairs
|
||||
for the image corners listed in clockwise order: top left, top
|
||||
right, bottom right, bottom left. Only has an effect for
|
||||
"image" `sourcetype`.
|
||||
|
||||
The 'coordinates' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["coordinates"]
|
||||
|
||||
@coordinates.setter
|
||||
def coordinates(self, val):
|
||||
self["coordinates"] = val
|
||||
|
||||
@property
|
||||
def fill(self):
|
||||
"""
|
||||
The 'fill' property is an instance of Fill
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Fill constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.layer.Fill
|
||||
"""
|
||||
return self["fill"]
|
||||
|
||||
@fill.setter
|
||||
def fill(self, val):
|
||||
self["fill"] = val
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
"""
|
||||
The 'line' property is an instance of Line
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Line constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.layer.Line
|
||||
"""
|
||||
return self["line"]
|
||||
|
||||
@line.setter
|
||||
def line(self, val):
|
||||
self["line"] = val
|
||||
|
||||
@property
|
||||
def maxzoom(self):
|
||||
"""
|
||||
Sets the maximum zoom level (mapbox.layer.maxzoom). At zoom
|
||||
levels equal to or greater than the maxzoom, the layer will be
|
||||
hidden.
|
||||
|
||||
The 'maxzoom' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 24]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["maxzoom"]
|
||||
|
||||
@maxzoom.setter
|
||||
def maxzoom(self, val):
|
||||
self["maxzoom"] = val
|
||||
|
||||
@property
|
||||
def minzoom(self):
|
||||
"""
|
||||
Sets the minimum zoom level (mapbox.layer.minzoom). At zoom
|
||||
levels less than the minzoom, the layer will be hidden.
|
||||
|
||||
The 'minzoom' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 24]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["minzoom"]
|
||||
|
||||
@minzoom.setter
|
||||
def minzoom(self, val):
|
||||
self["minzoom"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@name.setter
|
||||
def name(self, val):
|
||||
self["name"] = val
|
||||
|
||||
@property
|
||||
def opacity(self):
|
||||
"""
|
||||
Sets the opacity of the layer. If `type` is "circle", opacity
|
||||
corresponds to the circle opacity (mapbox.layer.paint.circle-
|
||||
opacity) If `type` is "line", opacity corresponds to the line
|
||||
opacity (mapbox.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity
|
||||
(mapbox.layer.paint.fill-opacity) If `type` is "symbol",
|
||||
opacity corresponds to the icon/text opacity
|
||||
(mapbox.layer.paint.text-opacity)
|
||||
|
||||
The 'opacity' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["opacity"]
|
||||
|
||||
@opacity.setter
|
||||
def opacity(self, val):
|
||||
self["opacity"] = val
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""
|
||||
Sets the source data for this layer (mapbox.layer.source). When
|
||||
`sourcetype` is set to "geojson", `source` can be a URL to a
|
||||
GeoJSON or a GeoJSON object. When `sourcetype` is set to
|
||||
"vector" or "raster", `source` can be a URL or an array of tile
|
||||
URLs. When `sourcetype` is set to "image", `source` can be a
|
||||
URL to an image.
|
||||
|
||||
The 'source' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["source"]
|
||||
|
||||
@source.setter
|
||||
def source(self, val):
|
||||
self["source"] = val
|
||||
|
||||
@property
|
||||
def sourceattribution(self):
|
||||
"""
|
||||
Sets the attribution for this source.
|
||||
|
||||
The 'sourceattribution' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sourceattribution"]
|
||||
|
||||
@sourceattribution.setter
|
||||
def sourceattribution(self, val):
|
||||
self["sourceattribution"] = val
|
||||
|
||||
@property
|
||||
def sourcelayer(self):
|
||||
"""
|
||||
Specifies the layer to use from a vector tile source
|
||||
(mapbox.layer.source-layer). Required for "vector" source type
|
||||
that supports multiple layers.
|
||||
|
||||
The 'sourcelayer' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["sourcelayer"]
|
||||
|
||||
@sourcelayer.setter
|
||||
def sourcelayer(self, val):
|
||||
self["sourcelayer"] = val
|
||||
|
||||
@property
|
||||
def sourcetype(self):
|
||||
"""
|
||||
Sets the source type for this layer, that is the type of the
|
||||
layer data.
|
||||
|
||||
The 'sourcetype' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['geojson', 'vector', 'raster', 'image']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["sourcetype"]
|
||||
|
||||
@sourcetype.setter
|
||||
def sourcetype(self, val):
|
||||
self["sourcetype"] = val
|
||||
|
||||
@property
|
||||
def symbol(self):
|
||||
"""
|
||||
The 'symbol' property is an instance of Symbol
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Symbol constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.layer.Symbol
|
||||
"""
|
||||
return self["symbol"]
|
||||
|
||||
@symbol.setter
|
||||
def symbol(self, val):
|
||||
self["symbol"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@templateitemname.setter
|
||||
def templateitemname(self, val):
|
||||
self["templateitemname"] = val
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Sets the layer type, that is the how the layer data set in
|
||||
`source` will be rendered With `sourcetype` set to "geojson",
|
||||
the following values are allowed: "circle", "line", "fill" and
|
||||
"symbol". but note that "line" and "fill" are not compatible
|
||||
with Point GeoJSON geometries. With `sourcetype` set to
|
||||
"vector", the following values are allowed: "circle", "line",
|
||||
"fill" and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['circle', 'line', 'fill', 'symbol', 'raster']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
"""
|
||||
Determines whether this layer is displayed
|
||||
|
||||
The 'visible' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["visible"]
|
||||
|
||||
@visible.setter
|
||||
def visible(self, val):
|
||||
self["visible"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
below
|
||||
Determines if the layer will be inserted before the
|
||||
layer with the specified ID. If omitted or set to '',
|
||||
the layer will be inserted above every existing layer.
|
||||
circle
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Circle
|
||||
` instance or dict with compatible properties
|
||||
color
|
||||
Sets the primary layer color. If `type` is "circle",
|
||||
color corresponds to the circle color
|
||||
(mapbox.layer.paint.circle-color) If `type` is "line",
|
||||
color corresponds to the line color
|
||||
(mapbox.layer.paint.line-color) If `type` is "fill",
|
||||
color corresponds to the fill color
|
||||
(mapbox.layer.paint.fill-color) If `type` is "symbol",
|
||||
color corresponds to the icon color
|
||||
(mapbox.layer.paint.icon-color)
|
||||
coordinates
|
||||
Sets the coordinates array contains [longitude,
|
||||
latitude] pairs for the image corners listed in
|
||||
clockwise order: top left, top right, bottom right,
|
||||
bottom left. Only has an effect for "image"
|
||||
`sourcetype`.
|
||||
fill
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Fill`
|
||||
instance or dict with compatible properties
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Line`
|
||||
instance or dict with compatible properties
|
||||
maxzoom
|
||||
Sets the maximum zoom level (mapbox.layer.maxzoom). At
|
||||
zoom levels equal to or greater than the maxzoom, the
|
||||
layer will be hidden.
|
||||
minzoom
|
||||
Sets the minimum zoom level (mapbox.layer.minzoom). At
|
||||
zoom levels less than the minzoom, the layer will be
|
||||
hidden.
|
||||
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 layer. If `type` is "circle",
|
||||
opacity corresponds to the circle opacity
|
||||
(mapbox.layer.paint.circle-opacity) If `type` is
|
||||
"line", opacity corresponds to the line opacity
|
||||
(mapbox.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity
|
||||
(mapbox.layer.paint.fill-opacity) If `type` is
|
||||
"symbol", opacity corresponds to the icon/text opacity
|
||||
(mapbox.layer.paint.text-opacity)
|
||||
source
|
||||
Sets the source data for this layer
|
||||
(mapbox.layer.source). When `sourcetype` is set to
|
||||
"geojson", `source` can be a URL to a GeoJSON or a
|
||||
GeoJSON object. When `sourcetype` is set to "vector" or
|
||||
"raster", `source` can be a URL or an array of tile
|
||||
URLs. When `sourcetype` is set to "image", `source` can
|
||||
be a URL to an image.
|
||||
sourceattribution
|
||||
Sets the attribution for this source.
|
||||
sourcelayer
|
||||
Specifies the layer to use from a vector tile source
|
||||
(mapbox.layer.source-layer). Required for "vector"
|
||||
source type that supports multiple layers.
|
||||
sourcetype
|
||||
Sets the source type for this layer, that is the type
|
||||
of the layer data.
|
||||
symbol
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Symbol
|
||||
` instance or dict with compatible properties
|
||||
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
|
||||
Sets the layer type, that is the how the layer data set
|
||||
in `source` will be rendered With `sourcetype` set to
|
||||
"geojson", the following values are allowed: "circle",
|
||||
"line", "fill" and "symbol". but note that "line" and
|
||||
"fill" are not compatible with Point GeoJSON
|
||||
geometries. With `sourcetype` set to "vector", the
|
||||
following values are allowed: "circle", "line", "fill"
|
||||
and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
visible
|
||||
Determines whether this layer is displayed
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
below=None,
|
||||
circle=None,
|
||||
color=None,
|
||||
coordinates=None,
|
||||
fill=None,
|
||||
line=None,
|
||||
maxzoom=None,
|
||||
minzoom=None,
|
||||
name=None,
|
||||
opacity=None,
|
||||
source=None,
|
||||
sourceattribution=None,
|
||||
sourcelayer=None,
|
||||
sourcetype=None,
|
||||
symbol=None,
|
||||
templateitemname=None,
|
||||
type=None,
|
||||
visible=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Layer object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.Layer`
|
||||
below
|
||||
Determines if the layer will be inserted before the
|
||||
layer with the specified ID. If omitted or set to '',
|
||||
the layer will be inserted above every existing layer.
|
||||
circle
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Circle
|
||||
` instance or dict with compatible properties
|
||||
color
|
||||
Sets the primary layer color. If `type` is "circle",
|
||||
color corresponds to the circle color
|
||||
(mapbox.layer.paint.circle-color) If `type` is "line",
|
||||
color corresponds to the line color
|
||||
(mapbox.layer.paint.line-color) If `type` is "fill",
|
||||
color corresponds to the fill color
|
||||
(mapbox.layer.paint.fill-color) If `type` is "symbol",
|
||||
color corresponds to the icon color
|
||||
(mapbox.layer.paint.icon-color)
|
||||
coordinates
|
||||
Sets the coordinates array contains [longitude,
|
||||
latitude] pairs for the image corners listed in
|
||||
clockwise order: top left, top right, bottom right,
|
||||
bottom left. Only has an effect for "image"
|
||||
`sourcetype`.
|
||||
fill
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Fill`
|
||||
instance or dict with compatible properties
|
||||
line
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Line`
|
||||
instance or dict with compatible properties
|
||||
maxzoom
|
||||
Sets the maximum zoom level (mapbox.layer.maxzoom). At
|
||||
zoom levels equal to or greater than the maxzoom, the
|
||||
layer will be hidden.
|
||||
minzoom
|
||||
Sets the minimum zoom level (mapbox.layer.minzoom). At
|
||||
zoom levels less than the minzoom, the layer will be
|
||||
hidden.
|
||||
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 layer. If `type` is "circle",
|
||||
opacity corresponds to the circle opacity
|
||||
(mapbox.layer.paint.circle-opacity) If `type` is
|
||||
"line", opacity corresponds to the line opacity
|
||||
(mapbox.layer.paint.line-opacity) If `type` is "fill",
|
||||
opacity corresponds to the fill opacity
|
||||
(mapbox.layer.paint.fill-opacity) If `type` is
|
||||
"symbol", opacity corresponds to the icon/text opacity
|
||||
(mapbox.layer.paint.text-opacity)
|
||||
source
|
||||
Sets the source data for this layer
|
||||
(mapbox.layer.source). When `sourcetype` is set to
|
||||
"geojson", `source` can be a URL to a GeoJSON or a
|
||||
GeoJSON object. When `sourcetype` is set to "vector" or
|
||||
"raster", `source` can be a URL or an array of tile
|
||||
URLs. When `sourcetype` is set to "image", `source` can
|
||||
be a URL to an image.
|
||||
sourceattribution
|
||||
Sets the attribution for this source.
|
||||
sourcelayer
|
||||
Specifies the layer to use from a vector tile source
|
||||
(mapbox.layer.source-layer). Required for "vector"
|
||||
source type that supports multiple layers.
|
||||
sourcetype
|
||||
Sets the source type for this layer, that is the type
|
||||
of the layer data.
|
||||
symbol
|
||||
:class:`plotly.graph_objects.layout.mapbox.layer.Symbol
|
||||
` instance or dict with compatible properties
|
||||
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
|
||||
Sets the layer type, that is the how the layer data set
|
||||
in `source` will be rendered With `sourcetype` set to
|
||||
"geojson", the following values are allowed: "circle",
|
||||
"line", "fill" and "symbol". but note that "line" and
|
||||
"fill" are not compatible with Point GeoJSON
|
||||
geometries. With `sourcetype` set to "vector", the
|
||||
following values are allowed: "circle", "line", "fill"
|
||||
and "symbol". With `sourcetype` set to "raster" or
|
||||
`*image*`, only the "raster" value is allowed.
|
||||
visible
|
||||
Determines whether this layer is displayed
|
||||
|
||||
Returns
|
||||
-------
|
||||
Layer
|
||||
"""
|
||||
super().__init__("layers")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.Layer
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.Layer`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("below", arg, below)
|
||||
self._set_property("circle", arg, circle)
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("coordinates", arg, coordinates)
|
||||
self._set_property("fill", arg, fill)
|
||||
self._set_property("line", arg, line)
|
||||
self._set_property("maxzoom", arg, maxzoom)
|
||||
self._set_property("minzoom", arg, minzoom)
|
||||
self._set_property("name", arg, name)
|
||||
self._set_property("opacity", arg, opacity)
|
||||
self._set_property("source", arg, source)
|
||||
self._set_property("sourceattribution", arg, sourceattribution)
|
||||
self._set_property("sourcelayer", arg, sourcelayer)
|
||||
self._set_property("sourcetype", arg, sourcetype)
|
||||
self._set_property("symbol", arg, symbol)
|
||||
self._set_property("templateitemname", arg, templateitemname)
|
||||
self._set_property("type", arg, type)
|
||||
self._set_property("visible", arg, visible)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._circle import Circle
|
||||
from ._fill import Fill
|
||||
from ._line import Line
|
||||
from ._symbol import Symbol
|
||||
from . import symbol
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".symbol"],
|
||||
["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"],
|
||||
)
|
||||
@ -0,0 +1,82 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Circle(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox.layer"
|
||||
_path_str = "layout.mapbox.layer.circle"
|
||||
_valid_props = {"radius"}
|
||||
|
||||
@property
|
||||
def radius(self):
|
||||
"""
|
||||
Sets the circle radius (mapbox.layer.paint.circle-radius). Has
|
||||
an effect only when `type` is set to "circle".
|
||||
|
||||
The 'radius' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["radius"]
|
||||
|
||||
@radius.setter
|
||||
def radius(self, val):
|
||||
self["radius"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
radius
|
||||
Sets the circle radius (mapbox.layer.paint.circle-
|
||||
radius). Has an effect only when `type` is set to
|
||||
"circle".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, radius=None, **kwargs):
|
||||
"""
|
||||
Construct a new Circle object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.layer.Circle`
|
||||
radius
|
||||
Sets the circle radius (mapbox.layer.paint.circle-
|
||||
radius). Has an effect only when `type` is set to
|
||||
"circle".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Circle
|
||||
"""
|
||||
super().__init__("circle")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.layer.Circle
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("radius", arg, radius)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,86 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Fill(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox.layer"
|
||||
_path_str = "layout.mapbox.layer.fill"
|
||||
_valid_props = {"outlinecolor"}
|
||||
|
||||
@property
|
||||
def outlinecolor(self):
|
||||
"""
|
||||
Sets the fill outline color (mapbox.layer.paint.fill-outline-
|
||||
color). Has an effect only when `type` is set to "fill".
|
||||
|
||||
The 'outlinecolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["outlinecolor"]
|
||||
|
||||
@outlinecolor.setter
|
||||
def outlinecolor(self, val):
|
||||
self["outlinecolor"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
outlinecolor
|
||||
Sets the fill outline color (mapbox.layer.paint.fill-
|
||||
outline-color). Has an effect only when `type` is set
|
||||
to "fill".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, outlinecolor=None, **kwargs):
|
||||
"""
|
||||
Construct a new Fill object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.layer.Fill`
|
||||
outlinecolor
|
||||
Sets the fill outline color (mapbox.layer.paint.fill-
|
||||
outline-color). Has an effect only when `type` is set
|
||||
to "fill".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Fill
|
||||
"""
|
||||
super().__init__("fill")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.layer.Fill
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("outlinecolor", arg, outlinecolor)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,133 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Line(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox.layer"
|
||||
_path_str = "layout.mapbox.layer.line"
|
||||
_valid_props = {"dash", "dashsrc", "width"}
|
||||
|
||||
@property
|
||||
def dash(self):
|
||||
"""
|
||||
Sets the length of dashes and gaps (mapbox.layer.paint.line-
|
||||
dasharray). Has an effect only when `type` is set to "line".
|
||||
|
||||
The 'dash' property is an array that may be specified as a tuple,
|
||||
list, numpy array, or pandas Series
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray
|
||||
"""
|
||||
return self["dash"]
|
||||
|
||||
@dash.setter
|
||||
def dash(self, val):
|
||||
self["dash"] = val
|
||||
|
||||
@property
|
||||
def dashsrc(self):
|
||||
"""
|
||||
Sets the source reference on Chart Studio Cloud for `dash`.
|
||||
|
||||
The 'dashsrc' property must be specified as a string or
|
||||
as a plotly.grid_objs.Column object
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["dashsrc"]
|
||||
|
||||
@dashsrc.setter
|
||||
def dashsrc(self, val):
|
||||
self["dashsrc"] = val
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Sets the line width (mapbox.layer.paint.line-width). Has an
|
||||
effect only when `type` is set to "line".
|
||||
|
||||
The 'width' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["width"]
|
||||
|
||||
@width.setter
|
||||
def width(self, val):
|
||||
self["width"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dash
|
||||
Sets the length of dashes and gaps
|
||||
(mapbox.layer.paint.line-dasharray). Has an effect only
|
||||
when `type` is set to "line".
|
||||
dashsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`dash`.
|
||||
width
|
||||
Sets the line width (mapbox.layer.paint.line-width).
|
||||
Has an effect only when `type` is set to "line".
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs):
|
||||
"""
|
||||
Construct a new Line object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.layer.Line`
|
||||
dash
|
||||
Sets the length of dashes and gaps
|
||||
(mapbox.layer.paint.line-dasharray). Has an effect only
|
||||
when `type` is set to "line".
|
||||
dashsrc
|
||||
Sets the source reference on Chart Studio Cloud for
|
||||
`dash`.
|
||||
width
|
||||
Sets the line width (mapbox.layer.paint.line-width).
|
||||
Has an effect only when `type` is set to "line".
|
||||
|
||||
Returns
|
||||
-------
|
||||
Line
|
||||
"""
|
||||
super().__init__("line")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.layer.Line
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("dash", arg, dash)
|
||||
self._set_property("dashsrc", arg, dashsrc)
|
||||
self._set_property("width", arg, width)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,245 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Symbol(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox.layer"
|
||||
_path_str = "layout.mapbox.layer.symbol"
|
||||
_valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"}
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
"""
|
||||
Sets the symbol icon image (mapbox.layer.layout.icon-image).
|
||||
Full list: https://www.mapbox.com/maki-icons/
|
||||
|
||||
The 'icon' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["icon"]
|
||||
|
||||
@icon.setter
|
||||
def icon(self, val):
|
||||
self["icon"] = val
|
||||
|
||||
@property
|
||||
def iconsize(self):
|
||||
"""
|
||||
Sets the symbol icon size (mapbox.layer.layout.icon-size). Has
|
||||
an effect only when `type` is set to "symbol".
|
||||
|
||||
The 'iconsize' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["iconsize"]
|
||||
|
||||
@iconsize.setter
|
||||
def iconsize(self, val):
|
||||
self["iconsize"] = val
|
||||
|
||||
@property
|
||||
def placement(self):
|
||||
"""
|
||||
Sets the symbol and/or text placement
|
||||
(mapbox.layer.layout.symbol-placement). If `placement` is
|
||||
"point", the label is placed where the geometry is located If
|
||||
`placement` is "line", the label is placed along the line of
|
||||
the geometry If `placement` is "line-center", the label is
|
||||
placed on the center of the geometry
|
||||
|
||||
The 'placement' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['point', 'line', 'line-center']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["placement"]
|
||||
|
||||
@placement.setter
|
||||
def placement(self, val):
|
||||
self["placement"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the symbol text (mapbox.layer.layout.text-field).
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def textfont(self):
|
||||
"""
|
||||
Sets the icon text font (color=mapbox.layer.paint.text-color,
|
||||
size=mapbox.layer.layout.text-size). Has an effect only when
|
||||
`type` is set to "symbol".
|
||||
|
||||
The 'textfont' property is an instance of Textfont
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Textfont constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.mapbox.layer.symbol.Textfont
|
||||
"""
|
||||
return self["textfont"]
|
||||
|
||||
@textfont.setter
|
||||
def textfont(self, val):
|
||||
self["textfont"] = val
|
||||
|
||||
@property
|
||||
def textposition(self):
|
||||
"""
|
||||
Sets the positions of the `text` elements with respects to the
|
||||
(x,y) coordinates.
|
||||
|
||||
The 'textposition' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top left', 'top center', 'top right', 'middle left',
|
||||
'middle center', 'middle right', 'bottom left', 'bottom
|
||||
center', 'bottom right']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["textposition"]
|
||||
|
||||
@textposition.setter
|
||||
def textposition(self, val):
|
||||
self["textposition"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
icon
|
||||
Sets the symbol icon image (mapbox.layer.layout.icon-
|
||||
image). Full list: https://www.mapbox.com/maki-icons/
|
||||
iconsize
|
||||
Sets the symbol icon size (mapbox.layer.layout.icon-
|
||||
size). Has an effect only when `type` is set to
|
||||
"symbol".
|
||||
placement
|
||||
Sets the symbol and/or text placement
|
||||
(mapbox.layer.layout.symbol-placement). If `placement`
|
||||
is "point", the label is placed where the geometry is
|
||||
located If `placement` is "line", the label is placed
|
||||
along the line of the geometry If `placement` is "line-
|
||||
center", the label is placed on the center of the
|
||||
geometry
|
||||
text
|
||||
Sets the symbol text (mapbox.layer.layout.text-field).
|
||||
textfont
|
||||
Sets the icon text font (color=mapbox.layer.paint.text-
|
||||
color, size=mapbox.layer.layout.text-size). Has an
|
||||
effect only when `type` is set to "symbol".
|
||||
textposition
|
||||
Sets the positions of the `text` elements with respects
|
||||
to the (x,y) coordinates.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
icon=None,
|
||||
iconsize=None,
|
||||
placement=None,
|
||||
text=None,
|
||||
textfont=None,
|
||||
textposition=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Symbol object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.mapbox.layer.Symbol`
|
||||
icon
|
||||
Sets the symbol icon image (mapbox.layer.layout.icon-
|
||||
image). Full list: https://www.mapbox.com/maki-icons/
|
||||
iconsize
|
||||
Sets the symbol icon size (mapbox.layer.layout.icon-
|
||||
size). Has an effect only when `type` is set to
|
||||
"symbol".
|
||||
placement
|
||||
Sets the symbol and/or text placement
|
||||
(mapbox.layer.layout.symbol-placement). If `placement`
|
||||
is "point", the label is placed where the geometry is
|
||||
located If `placement` is "line", the label is placed
|
||||
along the line of the geometry If `placement` is "line-
|
||||
center", the label is placed on the center of the
|
||||
geometry
|
||||
text
|
||||
Sets the symbol text (mapbox.layer.layout.text-field).
|
||||
textfont
|
||||
Sets the icon text font (color=mapbox.layer.paint.text-
|
||||
color, size=mapbox.layer.layout.text-size). Has an
|
||||
effect only when `type` is set to "symbol".
|
||||
textposition
|
||||
Sets the positions of the `text` elements with respects
|
||||
to the (x,y) coordinates.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Symbol
|
||||
"""
|
||||
super().__init__("symbol")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.layer.Symbol
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("icon", arg, icon)
|
||||
self._set_property("iconsize", arg, iconsize)
|
||||
self._set_property("placement", arg, placement)
|
||||
self._set_property("text", arg, text)
|
||||
self._set_property("textfont", arg, textfont)
|
||||
self._set_property("textposition", arg, textposition)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,11 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._textfont import Textfont
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._textfont.Textfont"]
|
||||
)
|
||||
@ -0,0 +1,202 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Textfont(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.mapbox.layer.symbol"
|
||||
_path_str = "layout.mapbox.layer.symbol.textfont"
|
||||
_valid_props = {"color", "family", "size", "style", "weight"}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
size
|
||||
|
||||
style
|
||||
Sets whether a font should be styled with a normal or
|
||||
italic face from its family.
|
||||
weight
|
||||
Sets the weight (or boldness) of the font.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
color=None,
|
||||
family=None,
|
||||
size=None,
|
||||
style=None,
|
||||
weight=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Textfont object
|
||||
|
||||
Sets the icon text font (color=mapbox.layer.paint.text-color,
|
||||
size=mapbox.layer.layout.text-size). Has an effect only when
|
||||
`type` is set to "symbol".
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.
|
||||
layer.symbol.Textfont`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
size
|
||||
|
||||
style
|
||||
Sets whether a font should be styled with a normal or
|
||||
italic face from its family.
|
||||
weight
|
||||
Sets the weight (or boldness) of the font.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Textfont
|
||||
"""
|
||||
super().__init__("textfont")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.mapbox.layer.symbol.Textfont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._line import Line
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"])
|
||||
@ -0,0 +1,142 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Line(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newselection"
|
||||
_path_str = "layout.newselection.line"
|
||||
_valid_props = {"color", "dash", "width"}
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the line color. By default uses either dark grey or white
|
||||
to increase contrast with background 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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def dash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'dash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["dash"]
|
||||
|
||||
@dash.setter
|
||||
def dash(self, val):
|
||||
self["dash"] = val
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Sets the line width (in px).
|
||||
|
||||
The 'width' property is a number and may be specified as:
|
||||
- An int or float in the interval [1, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["width"]
|
||||
|
||||
@width.setter
|
||||
def width(self, val):
|
||||
self["width"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
Sets the line color. By default uses either dark grey
|
||||
or white to increase contrast with background color.
|
||||
dash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
width
|
||||
Sets the line width (in px).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs):
|
||||
"""
|
||||
Construct a new Line object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.newselection.Line`
|
||||
color
|
||||
Sets the line color. By default uses either dark grey
|
||||
or white to increase contrast with background color.
|
||||
dash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
width
|
||||
Sets the line width (in px).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Line
|
||||
"""
|
||||
super().__init__("line")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newselection.Line
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newselection.Line`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("dash", arg, dash)
|
||||
self._set_property("width", arg, width)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._label import Label
|
||||
from ._legendgrouptitle import Legendgrouptitle
|
||||
from ._line import Line
|
||||
from . import label
|
||||
from . import legendgrouptitle
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".label", ".legendgrouptitle"],
|
||||
["._label.Label", "._legendgrouptitle.Legendgrouptitle", "._line.Line"],
|
||||
)
|
||||
@ -0,0 +1,397 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Label(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newshape"
|
||||
_path_str = "layout.newshape.label"
|
||||
_valid_props = {
|
||||
"font",
|
||||
"padding",
|
||||
"text",
|
||||
"textangle",
|
||||
"textposition",
|
||||
"texttemplate",
|
||||
"xanchor",
|
||||
"yanchor",
|
||||
}
|
||||
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets the new shape label text font.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.layout.newshape.label.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newshape.label.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
def padding(self):
|
||||
"""
|
||||
Sets padding (in px) between edge of label and edge of new
|
||||
shape.
|
||||
|
||||
The 'padding' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["padding"]
|
||||
|
||||
@padding.setter
|
||||
def padding(self, val):
|
||||
self["padding"] = val
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the text to display with the new shape. It is also used
|
||||
for legend item if `name` is not provided.
|
||||
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def textangle(self):
|
||||
"""
|
||||
Sets the angle at which the label text is drawn with respect to
|
||||
the horizontal. For lines, angle "auto" is the same angle as
|
||||
the line. For all other shapes, angle "auto" is horizontal.
|
||||
|
||||
The 'textangle' property is a angle (in degrees) that may be
|
||||
specified as a number between -180 and 180.
|
||||
Numeric values outside this range are converted to the equivalent value
|
||||
(e.g. 270 is converted to -90).
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["textangle"]
|
||||
|
||||
@textangle.setter
|
||||
def textangle(self, val):
|
||||
self["textangle"] = val
|
||||
|
||||
@property
|
||||
def textposition(self):
|
||||
"""
|
||||
Sets the position of the label text relative to the new shape.
|
||||
Supported values for rectangles, circles and paths are *top
|
||||
left*, *top center*, *top right*, *middle left*, *middle
|
||||
center*, *middle right*, *bottom left*, *bottom center*, and
|
||||
*bottom right*. Supported values for lines are "start",
|
||||
"middle", and "end". Default: *middle center* for rectangles,
|
||||
circles, and paths; "middle" for lines.
|
||||
|
||||
The 'textposition' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top left', 'top center', 'top right', 'middle left',
|
||||
'middle center', 'middle right', 'bottom left', 'bottom
|
||||
center', 'bottom right', 'start', 'middle', 'end']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["textposition"]
|
||||
|
||||
@textposition.setter
|
||||
def textposition(self, val):
|
||||
self["textposition"] = val
|
||||
|
||||
@property
|
||||
def texttemplate(self):
|
||||
"""
|
||||
Template string used for rendering the new shape's label. Note
|
||||
that this will override `text`. Variables are inserted using
|
||||
%{variable}, for example "x0: %{x0}". Numbers are formatted
|
||||
using d3-format's syntax %{variable:d3-format}, for example
|
||||
"Price: %{x0:$.2f}". See
|
||||
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: %{x0|%m %b %Y}". See https://github.com/d3/d3-time-
|
||||
format/tree/v2.2.3#locale_format for details on the date
|
||||
formatting syntax. A single multiplication or division
|
||||
operation may be applied to numeric variables, and combined
|
||||
with d3 number formatting, for example "Length in cm:
|
||||
%{x0*2.54}", "%{slope*60:.1f} meters per second." For log axes,
|
||||
variable values are given in log units. For date axes, x/y
|
||||
coordinate variables and center variables use datetimes, while
|
||||
all other variable values use values in ms. Finally, the
|
||||
template string has access to variables `x0`, `x1`, `y0`, `y1`,
|
||||
`slope`, `dx`, `dy`, `width`, `height`, `length`, `xcenter` and
|
||||
`ycenter`.
|
||||
|
||||
The 'texttemplate' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["texttemplate"]
|
||||
|
||||
@texttemplate.setter
|
||||
def texttemplate(self, val):
|
||||
self["texttemplate"] = val
|
||||
|
||||
@property
|
||||
def xanchor(self):
|
||||
"""
|
||||
Sets the label's horizontal position anchor This anchor binds
|
||||
the specified `textposition` to the "left", "center" or "right"
|
||||
of the label text. For example, if `textposition` is set to
|
||||
*top right* and `xanchor` to "right" then the right-most
|
||||
portion of the label text lines up with the right-most edge of
|
||||
the new shape.
|
||||
|
||||
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"]
|
||||
|
||||
@xanchor.setter
|
||||
def xanchor(self, val):
|
||||
self["xanchor"] = val
|
||||
|
||||
@property
|
||||
def yanchor(self):
|
||||
"""
|
||||
Sets the label's vertical position anchor This anchor binds the
|
||||
specified `textposition` to the "top", "middle" or "bottom" of
|
||||
the label text. For example, if `textposition` is set to *top
|
||||
right* and `yanchor` to "top" then the top-most portion of the
|
||||
label text lines up with the top-most edge of the new shape.
|
||||
|
||||
The 'yanchor' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['top', 'middle', 'bottom']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["yanchor"]
|
||||
|
||||
@yanchor.setter
|
||||
def yanchor(self, val):
|
||||
self["yanchor"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
font
|
||||
Sets the new shape label text font.
|
||||
padding
|
||||
Sets padding (in px) between edge of label and edge of
|
||||
new shape.
|
||||
text
|
||||
Sets the text to display with the new shape. It is also
|
||||
used for legend item if `name` is not provided.
|
||||
textangle
|
||||
Sets the angle at which the label text is drawn with
|
||||
respect to the horizontal. For lines, angle "auto" is
|
||||
the same angle as the line. For all other shapes, angle
|
||||
"auto" is horizontal.
|
||||
textposition
|
||||
Sets the position of the label text relative to the new
|
||||
shape. Supported values for rectangles, circles and
|
||||
paths are *top left*, *top center*, *top right*,
|
||||
*middle left*, *middle center*, *middle right*, *bottom
|
||||
left*, *bottom center*, and *bottom right*. Supported
|
||||
values for lines are "start", "middle", and "end".
|
||||
Default: *middle center* for rectangles, circles, and
|
||||
paths; "middle" for lines.
|
||||
texttemplate
|
||||
Template string used for rendering the new shape's
|
||||
label. Note that this will override `text`. Variables
|
||||
are inserted using %{variable}, for example "x0:
|
||||
%{x0}". Numbers are formatted using d3-format's syntax
|
||||
%{variable:d3-format}, for example "Price: %{x0:$.2f}".
|
||||
See
|
||||
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: %{x0|%m
|
||||
%b %Y}". See https://github.com/d3/d3-time-
|
||||
format/tree/v2.2.3#locale_format for details on the
|
||||
date formatting syntax. A single multiplication or
|
||||
division operation may be applied to numeric variables,
|
||||
and combined with d3 number formatting, for example
|
||||
"Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per
|
||||
second." For log axes, variable values are given in log
|
||||
units. For date axes, x/y coordinate variables and
|
||||
center variables use datetimes, while all other
|
||||
variable values use values in ms. Finally, the template
|
||||
string has access to variables `x0`, `x1`, `y0`, `y1`,
|
||||
`slope`, `dx`, `dy`, `width`, `height`, `length`,
|
||||
`xcenter` and `ycenter`.
|
||||
xanchor
|
||||
Sets the label's horizontal position anchor This anchor
|
||||
binds the specified `textposition` to the "left",
|
||||
"center" or "right" of the label text. For example, if
|
||||
`textposition` is set to *top right* and `xanchor` to
|
||||
"right" then the right-most portion of the label text
|
||||
lines up with the right-most edge of the new shape.
|
||||
yanchor
|
||||
Sets the label's vertical position anchor This anchor
|
||||
binds the specified `textposition` to the "top",
|
||||
"middle" or "bottom" of the label text. For example, if
|
||||
`textposition` is set to *top right* and `yanchor` to
|
||||
"top" then the top-most portion of the label text lines
|
||||
up with the top-most edge of the new shape.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
font=None,
|
||||
padding=None,
|
||||
text=None,
|
||||
textangle=None,
|
||||
textposition=None,
|
||||
texttemplate=None,
|
||||
xanchor=None,
|
||||
yanchor=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Label object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.newshape.Label`
|
||||
font
|
||||
Sets the new shape label text font.
|
||||
padding
|
||||
Sets padding (in px) between edge of label and edge of
|
||||
new shape.
|
||||
text
|
||||
Sets the text to display with the new shape. It is also
|
||||
used for legend item if `name` is not provided.
|
||||
textangle
|
||||
Sets the angle at which the label text is drawn with
|
||||
respect to the horizontal. For lines, angle "auto" is
|
||||
the same angle as the line. For all other shapes, angle
|
||||
"auto" is horizontal.
|
||||
textposition
|
||||
Sets the position of the label text relative to the new
|
||||
shape. Supported values for rectangles, circles and
|
||||
paths are *top left*, *top center*, *top right*,
|
||||
*middle left*, *middle center*, *middle right*, *bottom
|
||||
left*, *bottom center*, and *bottom right*. Supported
|
||||
values for lines are "start", "middle", and "end".
|
||||
Default: *middle center* for rectangles, circles, and
|
||||
paths; "middle" for lines.
|
||||
texttemplate
|
||||
Template string used for rendering the new shape's
|
||||
label. Note that this will override `text`. Variables
|
||||
are inserted using %{variable}, for example "x0:
|
||||
%{x0}". Numbers are formatted using d3-format's syntax
|
||||
%{variable:d3-format}, for example "Price: %{x0:$.2f}".
|
||||
See
|
||||
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: %{x0|%m
|
||||
%b %Y}". See https://github.com/d3/d3-time-
|
||||
format/tree/v2.2.3#locale_format for details on the
|
||||
date formatting syntax. A single multiplication or
|
||||
division operation may be applied to numeric variables,
|
||||
and combined with d3 number formatting, for example
|
||||
"Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per
|
||||
second." For log axes, variable values are given in log
|
||||
units. For date axes, x/y coordinate variables and
|
||||
center variables use datetimes, while all other
|
||||
variable values use values in ms. Finally, the template
|
||||
string has access to variables `x0`, `x1`, `y0`, `y1`,
|
||||
`slope`, `dx`, `dy`, `width`, `height`, `length`,
|
||||
`xcenter` and `ycenter`.
|
||||
xanchor
|
||||
Sets the label's horizontal position anchor This anchor
|
||||
binds the specified `textposition` to the "left",
|
||||
"center" or "right" of the label text. For example, if
|
||||
`textposition` is set to *top right* and `xanchor` to
|
||||
"right" then the right-most portion of the label text
|
||||
lines up with the right-most edge of the new shape.
|
||||
yanchor
|
||||
Sets the label's vertical position anchor This anchor
|
||||
binds the specified `textposition` to the "top",
|
||||
"middle" or "bottom" of the label text. For example, if
|
||||
`textposition` is set to *top right* and `yanchor` to
|
||||
"top" then the top-most portion of the label text lines
|
||||
up with the top-most edge of the new shape.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Label
|
||||
"""
|
||||
super().__init__("label")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newshape.Label
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshape.Label`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("padding", arg, padding)
|
||||
self._set_property("text", arg, text)
|
||||
self._set_property("textangle", arg, textangle)
|
||||
self._set_property("textposition", arg, textposition)
|
||||
self._set_property("texttemplate", arg, texttemplate)
|
||||
self._set_property("xanchor", arg, xanchor)
|
||||
self._set_property("yanchor", arg, yanchor)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,104 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Legendgrouptitle(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newshape"
|
||||
_path_str = "layout.newshape.legendgrouptitle"
|
||||
_valid_props = {"font", "text"}
|
||||
|
||||
@property
|
||||
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.layout.newshape.legendgrouptitle.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.layout.newshape.legendgrouptitle.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
font
|
||||
Sets this legend group's title font.
|
||||
text
|
||||
Sets the title of the legend group.
|
||||
"""
|
||||
|
||||
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.layout.newshap
|
||||
e.Legendgrouptitle`
|
||||
font
|
||||
Sets this legend group's title font.
|
||||
text
|
||||
Sets the title of the legend group.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Legendgrouptitle
|
||||
"""
|
||||
super().__init__("legendgrouptitle")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newshape.Legendgrouptitle
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshape.Legendgrouptitle`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("font", arg, font)
|
||||
self._set_property("text", arg, text)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,142 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Line(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newshape"
|
||||
_path_str = "layout.newshape.line"
|
||||
_valid_props = {"color", "dash", "width"}
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the line color. By default uses either dark grey or white
|
||||
to increase contrast with background 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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def dash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'dash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["dash"]
|
||||
|
||||
@dash.setter
|
||||
def dash(self, val):
|
||||
self["dash"] = val
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Sets the line width (in px).
|
||||
|
||||
The 'width' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["width"]
|
||||
|
||||
@width.setter
|
||||
def width(self, val):
|
||||
self["width"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
Sets the line color. By default uses either dark grey
|
||||
or white to increase contrast with background color.
|
||||
dash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
width
|
||||
Sets the line width (in px).
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs):
|
||||
"""
|
||||
Construct a new Line object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.newshape.Line`
|
||||
color
|
||||
Sets the line color. By default uses either dark grey
|
||||
or white to increase contrast with background color.
|
||||
dash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
width
|
||||
Sets the line width (in px).
|
||||
|
||||
Returns
|
||||
-------
|
||||
Line
|
||||
"""
|
||||
super().__init__("line")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newshape.Line
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshape.Line`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("dash", arg, dash)
|
||||
self._set_property("width", arg, width)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newshape.label"
|
||||
_path_str = "layout.newshape.label.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets the new shape label text font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.newshape.label.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newshape.label.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshape.label.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,9 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._font import Font
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])
|
||||
@ -0,0 +1,334 @@
|
||||
# --- THIS FILE IS AUTO-GENERATED ---
|
||||
# Modifications will be overwitten the next time code generation run.
|
||||
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseLayoutHierarchyType):
|
||||
_parent_path_str = "layout.newshape.legendgrouptitle"
|
||||
_path_str = "layout.newshape.legendgrouptitle.font"
|
||||
_valid_props = {
|
||||
"color",
|
||||
"family",
|
||||
"lineposition",
|
||||
"shadow",
|
||||
"size",
|
||||
"style",
|
||||
"textcase",
|
||||
"variant",
|
||||
"weight",
|
||||
}
|
||||
|
||||
@property
|
||||
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: see https://plotly.com/python/css-colors/ for a list
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["color"]
|
||||
|
||||
@color.setter
|
||||
def color(self, val):
|
||||
self["color"] = val
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
"""
|
||||
HTML font family - the typeface that will be applied by the web
|
||||
browser. The web browser can only apply a font if it is
|
||||
available on the system where it runs. Provide multiple font
|
||||
families, separated by commas, to indicate the order in which
|
||||
to apply fonts if they aren't available.
|
||||
|
||||
The 'family' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["family"]
|
||||
|
||||
@family.setter
|
||||
def family(self, val):
|
||||
self["family"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@lineposition.setter
|
||||
def lineposition(self, val):
|
||||
self["lineposition"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@shadow.setter
|
||||
def shadow(self, val):
|
||||
self["shadow"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@style.setter
|
||||
def style(self, val):
|
||||
self["style"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@textcase.setter
|
||||
def textcase(self, val):
|
||||
self["textcase"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@variant.setter
|
||||
def variant(self, val):
|
||||
self["variant"] = val
|
||||
|
||||
@property
|
||||
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"]
|
||||
|
||||
@weight.setter
|
||||
def weight(self, val):
|
||||
self["weight"] = val
|
||||
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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.
|
||||
"""
|
||||
|
||||
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 Font object
|
||||
|
||||
Sets this legend group's title font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshap
|
||||
e.legendgrouptitle.Font`
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be applied by
|
||||
the web browser. The web browser can only apply a font
|
||||
if it is available on the system where it runs. Provide
|
||||
multiple font families, separated by commas, to
|
||||
indicate the order in which to apply fonts if they
|
||||
aren't available.
|
||||
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
|
||||
-------
|
||||
Font
|
||||
"""
|
||||
super().__init__("font")
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
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.newshape.legendgrouptitle.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.newshape.legendgrouptitle.Font`""")
|
||||
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
self._set_property("color", arg, color)
|
||||
self._set_property("family", arg, family)
|
||||
self._set_property("lineposition", arg, lineposition)
|
||||
self._set_property("shadow", arg, shadow)
|
||||
self._set_property("size", arg, size)
|
||||
self._set_property("style", arg, style)
|
||||
self._set_property("textcase", arg, textcase)
|
||||
self._set_property("variant", arg, variant)
|
||||
self._set_property("weight", arg, weight)
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
self._skip_invalid = False
|
||||
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ._angularaxis import AngularAxis
|
||||
from ._domain import Domain
|
||||
from ._radialaxis import RadialAxis
|
||||
from . import angularaxis
|
||||
from . import radialaxis
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".angularaxis", ".radialaxis"],
|
||||
["._angularaxis.AngularAxis", "._domain.Domain", "._radialaxis.RadialAxis"],
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user