first commit

This commit is contained in:
Ayxan
2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 changed files with 4428337 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
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 ._mapbox import Mapbox
from ._margin import Margin
from ._modebar import Modebar
from ._newshape import Newshape
from ._polar import Polar
from ._scene import Scene
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 mapbox
from . import newshape
from . import polar
from . import scene
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",
".mapbox",
".newshape",
".polar",
".scene",
".shape",
".slider",
".smith",
".template",
".ternary",
".title",
".updatemenu",
".xaxis",
".yaxis",
],
[
"._activeshape.Activeshape",
"._annotation.Annotation",
"._coloraxis.Coloraxis",
"._colorscale.Colorscale",
"._font.Font",
"._geo.Geo",
"._grid.Grid",
"._hoverlabel.Hoverlabel",
"._image.Image",
"._legend.Legend",
"._mapbox.Mapbox",
"._margin.Margin",
"._modebar.Modebar",
"._newshape.Newshape",
"._polar.Polar",
"._scene.Scene",
"._shape.Shape",
"._slider.Slider",
"._smith.Smith",
"._template.Template",
"._ternary.Ternary",
"._title.Title",
"._transition.Transition",
"._uniformtext.Uniformtext",
"._updatemenu.Updatemenu",
"._xaxis.XAxis",
"._yaxis.YAxis",
],
)

View File

@@ -0,0 +1,166 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Activeshape(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.activeshape"
_valid_props = {"fillcolor", "opacity"}
# fillcolor
# ---------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["fillcolor"]
@fillcolor.setter
def fillcolor(self, val):
self["fillcolor"] = val
# opacity
# -------
@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
# Self properties description
# ---------------------------
@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(Activeshape, self).__init__("activeshape")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Activeshape
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Activeshape`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("fillcolor", None)
_v = fillcolor if fillcolor is not None else _v
if _v is not None:
self["fillcolor"] = _v
_v = arg.pop("opacity", None)
_v = opacity if opacity is not None else _v
if _v is not None:
self["opacity"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,707 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Coloraxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.coloraxis"
_valid_props = {
"autocolorscale",
"cauto",
"cmax",
"cmid",
"cmin",
"colorbar",
"colorscale",
"reversescale",
"showscale",
}
# autocolorscale
# --------------
@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
# cauto
# -----
@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
# cmax
# ----
@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
# cmid
# ----
@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
# cmin
# ----
@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
# colorbar
# --------
@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
Supported dict properties:
bgcolor
Sets the color of padded area.
bordercolor
Sets the axis line color.
borderwidth
Sets the width (in px) or the border enclosing
this color bar.
dtick
Sets the step in-between ticks on this axis.
Use with `tick0`. Must be a positive number, or
special strings available to "log" and "date"
axes. If the axis `type` is "log", then ticks
are set every 10^(n*dtick) where n is the tick
number. For example, to set a tick mark at 1,
10, 100, 1000, ... set dtick to 1. To set tick
marks at 1, 100, 10000, ... set dtick to 2. To
set tick marks at 1, 5, 25, 125, 625, 3125, ...
set dtick to log_10(5), or 0.69897000433. "log"
has several special values; "L<f>", where `f`
is a positive number, gives ticks linearly
spaced in value (but not position). For example
`tick0` = 0.1, `dtick` = "L0.5" will put ticks
at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10
plus small digits between, use "D1" (all
digits) or "D2" (only 2 and 5). `tick0` is
ignored for "D1" and "D2". If the axis `type`
is "date", then you must convert the time to
milliseconds. For example, to set the interval
between ticks to one day, set `dtick` to
86400000.0. "date" also has special values
"M<n>" gives ticks spaced by a number of
months. `n` must be a positive integer. To set
ticks on the 15th of every third month, set
`tick0` to "2000-01-15" and `dtick` to "M3". To
set ticks every 4 years, set `dtick` to "M48"
exponentformat
Determines a formatting rule for the tick
exponents. For example, consider the number
1,000,000,000. If "none", it appears as
1,000,000,000. If "e", 1e+9. If "E", 1E+9. If
"power", 1x10^9 (with 9 in a super script). If
"SI", 1G. If "B", 1B.
len
Sets the length of the color bar This measure
excludes the padding of both ends. That is, the
color bar length is this length minus the
padding on both ends.
lenmode
Determines whether this color bar's length
(i.e. the measure in the color variation
direction) is set in units of plot "fraction"
or in *pixels. Use `len` to set the value.
minexponent
Hide SI prefix for 10^n if |n| is below this
number. This only has an effect when
`tickformat` is "SI" or "B".
nticks
Specifies the maximum number of ticks for the
particular axis. The actual number of ticks
will be chosen automatically to be less than or
equal to `nticks`. Has an effect only if
`tickmode` is set to "auto".
orientation
Sets the orientation of the colorbar.
outlinecolor
Sets the axis line color.
outlinewidth
Sets the width (in px) of the axis line.
separatethousands
If "true", even 4-digit integers are separated
showexponent
If "all", all exponents are shown besides their
significands. If "first", only the exponent of
the first tick is shown. If "last", only the
exponent of the last tick is shown. If "none",
no exponents appear.
showticklabels
Determines whether or not the tick labels are
drawn.
showtickprefix
If "all", all tick labels are displayed with a
prefix. If "first", only the first tick is
displayed with a prefix. If "last", only the
last tick is displayed with a suffix. If
"none", tick prefixes are hidden.
showticksuffix
Same as `showtickprefix` but for tick suffixes.
thickness
Sets the thickness of the color bar This
measure excludes the size of the padding, ticks
and labels.
thicknessmode
Determines whether this color bar's thickness
(i.e. the measure in the constant color
direction) is set in units of plot "fraction"
or in "pixels". Use `thickness` to set the
value.
tick0
Sets the placement of the first tick on this
axis. Use with `dtick`. If the axis `type` is
"log", then you must take the log of your
starting tick (e.g. to set the starting tick to
100, set the `tick0` to 2) except when
`dtick`=*L<f>* (see `dtick` for more info). If
the axis `type` is "date", it should be a date
string, like date data. If the axis `type` is
"category", it should be a number, using the
scale where each category is assigned a serial
number from zero in the order it appears.
tickangle
Sets the angle of the tick labels with respect
to the horizontal. For example, a `tickangle`
of -90 draws the tick labels vertically.
tickcolor
Sets the tick color.
tickfont
Sets the color bar's tick label font
tickformat
Sets the tick label formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see: h
ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f
ormat. And for dates see:
https://github.com/d3/d3-time-
format/tree/v2.2.3#locale_format. We add two
items to d3's date formatter: "%h" for half of
the year as a decimal number as well as "%{n}f"
for fractional seconds with n digits. For
example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display
"09~15~23.46"
tickformatstops
A tuple of :class:`plotly.graph_objects.layout.
coloraxis.colorbar.Tickformatstop` instances or
dicts with compatible properties
tickformatstopdefaults
When used in a template (as layout.template.lay
out.coloraxis.colorbar.tickformatstopdefaults),
sets the default property values to use for
elements of
layout.coloraxis.colorbar.tickformatstops
ticklabeloverflow
Determines how we handle tick labels that would
overflow either the graph div or the domain of
the axis. The default value for inside tick
labels is *hide past domain*. In other cases
the default is *hide past div*.
ticklabelposition
Determines where tick labels are drawn relative
to the ticks. Left and right options are used
when `orientation` is "h", top and bottom when
`orientation` is "v".
ticklabelstep
Sets the spacing between tick labels as
compared to the spacing between ticks. A value
of 1 (default) means each tick gets a label. A
value of 2 means shows every 2nd label. A
larger value n means only every nth tick is
labeled. `tick0` determines which labels are
shown. Not implemented for axes with `type`
"log" or "multicategory", or when `tickmode` is
"array".
ticklen
Sets the tick length (in px).
tickmode
Sets the tick mode for this axis. If "auto",
the number of ticks is set via `nticks`. If
"linear", the placement of the ticks is
determined by a starting position `tick0` and a
tick step `dtick` ("linear" is the default
value if `tick0` and `dtick` are provided). If
"array", the placement of the ticks is set via
`tickvals` and the tick text is `ticktext`.
("array" is the default value if `tickvals` is
provided).
tickprefix
Sets a tick label prefix.
ticks
Determines whether ticks are drawn or not. If
"", this axis' ticks are not drawn. If
"outside" ("inside"), this axis' are drawn
outside (inside) the axis lines.
ticksuffix
Sets a tick label suffix.
ticktext
Sets the text displayed at the ticks position
via `tickvals`. Only has an effect if
`tickmode` is set to "array". Used with
`tickvals`.
ticktextsrc
Sets the source reference on Chart Studio Cloud
for `ticktext`.
tickvals
Sets the values at which ticks on this axis
appear. Only has an effect if `tickmode` is set
to "array". Used with `ticktext`.
tickvalssrc
Sets the source reference on Chart Studio Cloud
for `tickvals`.
tickwidth
Sets the tick width (in px).
title
:class:`plotly.graph_objects.layout.coloraxis.c
olorbar.Title` instance or dict with compatible
properties
titlefont
Deprecated: Please use
layout.coloraxis.colorbar.title.font instead.
Sets this color bar's title font. Note that the
title's font used to be set by the now
deprecated `titlefont` attribute.
titleside
Deprecated: Please use
layout.coloraxis.colorbar.title.side instead.
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". Note that
the title's location used to be set by the now
deprecated `titleside` attribute.
x
Sets the x position of the color bar (in plot
fraction). Defaults to 1.02 when `orientation`
is "v" and 0.5 when `orientation` is "h".
xanchor
Sets this color bar's horizontal position
anchor. This anchor binds the `x` position to
the "left", "center" or "right" of the color
bar. Defaults to "left" when `orientation` is
"v" and "center" when `orientation` is "h".
xpad
Sets the amount of padding (in px) along the x
direction.
y
Sets the y position of the color bar (in plot
fraction). Defaults to 0.5 when `orientation`
is "v" and 1.02 when `orientation` is "h".
yanchor
Sets this color bar's vertical position anchor
This anchor binds the `y` position to the
"top", "middle" or "bottom" of the color bar.
Defaults to "middle" when `orientation` is "v"
and "bottom" when `orientation` is "h".
ypad
Sets the amount of padding (in px) along the y
direction.
Returns
-------
plotly.graph_objs.layout.coloraxis.ColorBar
"""
return self["colorbar"]
@colorbar.setter
def colorbar(self, val):
self["colorbar"] = val
# colorscale
# ----------
@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
# reversescale
# ------------
@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
# showscale
# ---------
@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
# Self properties description
# ---------------------------
@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(Coloraxis, self).__init__("coloraxis")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Coloraxis
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Coloraxis`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("autocolorscale", None)
_v = autocolorscale if autocolorscale is not None else _v
if _v is not None:
self["autocolorscale"] = _v
_v = arg.pop("cauto", None)
_v = cauto if cauto is not None else _v
if _v is not None:
self["cauto"] = _v
_v = arg.pop("cmax", None)
_v = cmax if cmax is not None else _v
if _v is not None:
self["cmax"] = _v
_v = arg.pop("cmid", None)
_v = cmid if cmid is not None else _v
if _v is not None:
self["cmid"] = _v
_v = arg.pop("cmin", None)
_v = cmin if cmin is not None else _v
if _v is not None:
self["cmin"] = _v
_v = arg.pop("colorbar", None)
_v = colorbar if colorbar is not None else _v
if _v is not None:
self["colorbar"] = _v
_v = arg.pop("colorscale", None)
_v = colorscale if colorscale is not None else _v
if _v is not None:
self["colorscale"] = _v
_v = arg.pop("reversescale", None)
_v = reversescale if reversescale is not None else _v
if _v is not None:
self["reversescale"] = _v
_v = arg.pop("showscale", None)
_v = showscale if showscale is not None else _v
if _v is not None:
self["showscale"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,246 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Colorscale(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.colorscale"
_valid_props = {"diverging", "sequential", "sequentialminus"}
# diverging
# ---------
@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
# sequential
# ----------
@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
# sequentialminus
# ---------------
@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
# Self properties description
# ---------------------------
@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(Colorscale, self).__init__("colorscale")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Colorscale
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Colorscale`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("diverging", None)
_v = diverging if diverging is not None else _v
if _v is not None:
self["diverging"] = _v
_v = arg.pop("sequential", None)
_v = sequential if sequential is not None else _v
if _v is not None:
self["sequential"] = _v
_v = arg.pop("sequentialminus", None)
_v = sequentialminus if sequentialminus is not None else _v
if _v is not None:
self["sequentialminus"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,601 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Grid(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.grid"
_valid_props = {
"columns",
"domain",
"pattern",
"roworder",
"rows",
"subplots",
"xaxes",
"xgap",
"xside",
"yaxes",
"ygap",
"yside",
}
# columns
# -------
@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
# domain
# ------
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.grid.Domain
"""
return self["domain"]
@domain.setter
def domain(self, val):
self["domain"] = val
# pattern
# -------
@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
# roworder
# --------
@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
# rows
# ----
@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
# subplots
# --------
@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
# xaxes
# -----
@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
# xgap
# ----
@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
# xside
# -----
@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
# yaxes
# -----
@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
# ygap
# ----
@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
# yside
# -----
@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
# Self properties description
# ---------------------------
@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(Grid, self).__init__("grid")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Grid
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Grid`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("columns", None)
_v = columns if columns is not None else _v
if _v is not None:
self["columns"] = _v
_v = arg.pop("domain", None)
_v = domain if domain is not None else _v
if _v is not None:
self["domain"] = _v
_v = arg.pop("pattern", None)
_v = pattern if pattern is not None else _v
if _v is not None:
self["pattern"] = _v
_v = arg.pop("roworder", None)
_v = roworder if roworder is not None else _v
if _v is not None:
self["roworder"] = _v
_v = arg.pop("rows", None)
_v = rows if rows is not None else _v
if _v is not None:
self["rows"] = _v
_v = arg.pop("subplots", None)
_v = subplots if subplots is not None else _v
if _v is not None:
self["subplots"] = _v
_v = arg.pop("xaxes", None)
_v = xaxes if xaxes is not None else _v
if _v is not None:
self["xaxes"] = _v
_v = arg.pop("xgap", None)
_v = xgap if xgap is not None else _v
if _v is not None:
self["xgap"] = _v
_v = arg.pop("xside", None)
_v = xside if xside is not None else _v
if _v is not None:
self["xside"] = _v
_v = arg.pop("yaxes", None)
_v = yaxes if yaxes is not None else _v
if _v is not None:
self["yaxes"] = _v
_v = arg.pop("ygap", None)
_v = ygap if ygap is not None else _v
if _v is not None:
self["ygap"] = _v
_v = arg.pop("yside", None)
_v = yside if yside is not None else _v
if _v is not None:
self["yside"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,417 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Hoverlabel(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.hoverlabel"
_valid_props = {
"align",
"bgcolor",
"bordercolor",
"font",
"grouptitlefont",
"namelength",
}
# align
# -----
@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
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# bordercolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bordercolor"]
@bordercolor.setter
def bordercolor(self, val):
self["bordercolor"] = val
# font
# ----
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.hoverlabel.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# grouptitlefont
# --------------
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.hoverlabel.Grouptitlefont
"""
return self["grouptitlefont"]
@grouptitlefont.setter
def grouptitlefont(self, val):
self["grouptitlefont"] = val
# namelength
# ----------
@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
# Self properties description
# ---------------------------
@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.
"""
def __init__(
self,
arg=None,
align=None,
bgcolor=None,
bordercolor=None,
font=None,
grouptitlefont=None,
namelength=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.
Returns
-------
Hoverlabel
"""
super(Hoverlabel, self).__init__("hoverlabel")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Hoverlabel
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Hoverlabel`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("align", None)
_v = align if align is not None else _v
if _v is not None:
self["align"] = _v
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("bordercolor", None)
_v = bordercolor if bordercolor is not None else _v
if _v is not None:
self["bordercolor"] = _v
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("grouptitlefont", None)
_v = grouptitlefont if grouptitlefont is not None else _v
if _v is not None:
self["grouptitlefont"] = _v
_v = arg.pop("namelength", None)
_v = namelength if namelength is not None else _v
if _v is not None:
self["namelength"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,700 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Image(_BaseLayoutHierarchyType):
# class properties
# --------------------
_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",
}
# layer
# -----
@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
# name
# ----
@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
# opacity
# -------
@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
# sizex
# -----
@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
# sizey
# -----
@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
# sizing
# ------
@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
# source
# ------
@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
# templateitemname
# ----------------
@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
# visible
# -------
@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
# x
# -
@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
# xanchor
# -------
@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
# xref
# ----
@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
# y
# -
@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
# yanchor
# -------
@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
# yref
# ----
@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
# Self properties description
# ---------------------------
@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(Image, self).__init__("images")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Image
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Image`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("layer", None)
_v = layer if layer is not None else _v
if _v is not None:
self["layer"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("opacity", None)
_v = opacity if opacity is not None else _v
if _v is not None:
self["opacity"] = _v
_v = arg.pop("sizex", None)
_v = sizex if sizex is not None else _v
if _v is not None:
self["sizex"] = _v
_v = arg.pop("sizey", None)
_v = sizey if sizey is not None else _v
if _v is not None:
self["sizey"] = _v
_v = arg.pop("sizing", None)
_v = sizing if sizing is not None else _v
if _v is not None:
self["sizing"] = _v
_v = arg.pop("source", None)
_v = source if source is not None else _v
if _v is not None:
self["source"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("visible", None)
_v = visible if visible is not None else _v
if _v is not None:
self["visible"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("xanchor", None)
_v = xanchor if xanchor is not None else _v
if _v is not None:
self["xanchor"] = _v
_v = arg.pop("xref", None)
_v = xref if xref is not None else _v
if _v is not None:
self["xref"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("yanchor", None)
_v = yanchor if yanchor is not None else _v
if _v is not None:
self["yanchor"] = _v
_v = arg.pop("yref", None)
_v = yref if yref is not None else _v
if _v is not None:
self["yref"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,969 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Legend(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.legend"
_valid_props = {
"bgcolor",
"bordercolor",
"borderwidth",
"font",
"groupclick",
"grouptitlefont",
"itemclick",
"itemdoubleclick",
"itemsizing",
"itemwidth",
"orientation",
"title",
"tracegroupgap",
"traceorder",
"uirevision",
"valign",
"x",
"xanchor",
"y",
"yanchor",
}
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# bordercolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bordercolor"]
@bordercolor.setter
def bordercolor(self, val):
self["bordercolor"] = val
# borderwidth
# -----------
@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
# font
# ----
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.legend.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# groupclick
# ----------
@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
# grouptitlefont
# --------------
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.legend.Grouptitlefont
"""
return self["grouptitlefont"]
@grouptitlefont.setter
def grouptitlefont(self, val):
self["grouptitlefont"] = val
# itemclick
# ---------
@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
# itemdoubleclick
# ---------------
@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
# itemsizing
# ----------
@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
# itemwidth
# ---------
@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
# orientation
# -----------
@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
# title
# -----
@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
Supported dict properties:
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 legend area in
both x and y sides.
text
Sets the title of the legend.
Returns
-------
plotly.graph_objs.layout.legend.Title
"""
return self["title"]
@title.setter
def title(self, val):
self["title"] = val
# tracegroupgap
# -------------
@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
# traceorder
# ----------
@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
# uirevision
# ----------
@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
# valign
# ------
@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
# x
# -
@property
def x(self):
"""
Sets the x position (in normalized coordinates) of the legend.
Defaults to 1.02 for vertical legends and defaults to 0 for
horizontal legends.
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
# xanchor
# -------
@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
# y
# -
@property
def y(self):
"""
Sets the y position (in normalized coordinates) of the legend.
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.
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
# yanchor
# -------
@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
# Self properties description
# ---------------------------
@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.
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%.
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).
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.
x
Sets the x position (in normalized coordinates) of the
legend. Defaults to 1.02 for vertical legends and
defaults to 0 for horizontal legends.
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.
y
Sets the y position (in normalized coordinates) of the
legend. 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.
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.
"""
def __init__(
self,
arg=None,
bgcolor=None,
bordercolor=None,
borderwidth=None,
font=None,
groupclick=None,
grouptitlefont=None,
itemclick=None,
itemdoubleclick=None,
itemsizing=None,
itemwidth=None,
orientation=None,
title=None,
tracegroupgap=None,
traceorder=None,
uirevision=None,
valign=None,
x=None,
xanchor=None,
y=None,
yanchor=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.
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%.
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).
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.
x
Sets the x position (in normalized coordinates) of the
legend. Defaults to 1.02 for vertical legends and
defaults to 0 for horizontal legends.
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.
y
Sets the y position (in normalized coordinates) of the
legend. 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.
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.
Returns
-------
Legend
"""
super(Legend, self).__init__("legend")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Legend
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Legend`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("bordercolor", None)
_v = bordercolor if bordercolor is not None else _v
if _v is not None:
self["bordercolor"] = _v
_v = arg.pop("borderwidth", None)
_v = borderwidth if borderwidth is not None else _v
if _v is not None:
self["borderwidth"] = _v
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("groupclick", None)
_v = groupclick if groupclick is not None else _v
if _v is not None:
self["groupclick"] = _v
_v = arg.pop("grouptitlefont", None)
_v = grouptitlefont if grouptitlefont is not None else _v
if _v is not None:
self["grouptitlefont"] = _v
_v = arg.pop("itemclick", None)
_v = itemclick if itemclick is not None else _v
if _v is not None:
self["itemclick"] = _v
_v = arg.pop("itemdoubleclick", None)
_v = itemdoubleclick if itemdoubleclick is not None else _v
if _v is not None:
self["itemdoubleclick"] = _v
_v = arg.pop("itemsizing", None)
_v = itemsizing if itemsizing is not None else _v
if _v is not None:
self["itemsizing"] = _v
_v = arg.pop("itemwidth", None)
_v = itemwidth if itemwidth is not None else _v
if _v is not None:
self["itemwidth"] = _v
_v = arg.pop("orientation", None)
_v = orientation if orientation is not None else _v
if _v is not None:
self["orientation"] = _v
_v = arg.pop("title", None)
_v = title if title is not None else _v
if _v is not None:
self["title"] = _v
_v = arg.pop("tracegroupgap", None)
_v = tracegroupgap if tracegroupgap is not None else _v
if _v is not None:
self["tracegroupgap"] = _v
_v = arg.pop("traceorder", None)
_v = traceorder if traceorder is not None else _v
if _v is not None:
self["traceorder"] = _v
_v = arg.pop("uirevision", None)
_v = uirevision if uirevision is not None else _v
if _v is not None:
self["uirevision"] = _v
_v = arg.pop("valign", None)
_v = valign if valign is not None else _v
if _v is not None:
self["valign"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("xanchor", None)
_v = xanchor if xanchor is not None else _v
if _v is not None:
self["xanchor"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("yanchor", None)
_v = yanchor if yanchor is not None else _v
if _v is not None:
self["yanchor"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,632 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Mapbox(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.mapbox"
_valid_props = {
"accesstoken",
"bearing",
"center",
"domain",
"layerdefaults",
"layers",
"pitch",
"style",
"uirevision",
"zoom",
}
# accesstoken
# -----------
@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
# bearing
# -------
@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
# center
# ------
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.mapbox.Center
"""
return self["center"]
@center.setter
def center(self, val):
self["center"] = val
# domain
# ------
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.mapbox.Domain
"""
return self["domain"]
@domain.setter
def domain(self, val):
self["domain"] = val
# layers
# ------
@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
Supported dict properties:
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.laye
r.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.laye
r.Fill` instance or dict with compatible
properties
line
:class:`plotly.graph_objects.layout.mapbox.laye
r.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.laye
r.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
-------
tuple[plotly.graph_objs.layout.mapbox.Layer]
"""
return self["layers"]
@layers.setter
def layers(self, val):
self["layers"] = val
# layerdefaults
# -------------
@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
Supported dict properties:
Returns
-------
plotly.graph_objs.layout.mapbox.Layer
"""
return self["layerdefaults"]
@layerdefaults.setter
def layerdefaults(self, val):
self["layerdefaults"] = val
# pitch
# -----
@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
# style
# -----
@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
# uirevision
# ----------
@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
# zoom
# ----
@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
# Self properties description
# ---------------------------
@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).
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,
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).
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(Mapbox, self).__init__("mapbox")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Mapbox
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Mapbox`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("accesstoken", None)
_v = accesstoken if accesstoken is not None else _v
if _v is not None:
self["accesstoken"] = _v
_v = arg.pop("bearing", None)
_v = bearing if bearing is not None else _v
if _v is not None:
self["bearing"] = _v
_v = arg.pop("center", None)
_v = center if center is not None else _v
if _v is not None:
self["center"] = _v
_v = arg.pop("domain", None)
_v = domain if domain is not None else _v
if _v is not None:
self["domain"] = _v
_v = arg.pop("layers", None)
_v = layers if layers is not None else _v
if _v is not None:
self["layers"] = _v
_v = arg.pop("layerdefaults", None)
_v = layerdefaults if layerdefaults is not None else _v
if _v is not None:
self["layerdefaults"] = _v
_v = arg.pop("pitch", None)
_v = pitch if pitch is not None else _v
if _v is not None:
self["pitch"] = _v
_v = arg.pop("style", None)
_v = style if style is not None else _v
if _v is not None:
self["style"] = _v
_v = arg.pop("uirevision", None)
_v = uirevision if uirevision is not None else _v
if _v is not None:
self["uirevision"] = _v
_v = arg.pop("zoom", None)
_v = zoom if zoom is not None else _v
if _v is not None:
self["zoom"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,259 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Margin(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.margin"
_valid_props = {"autoexpand", "b", "l", "pad", "r", "t"}
# autoexpand
# ----------
@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
# b
# -
@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
# l
# -
@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
# pad
# ---
@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
# r
# -
@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
# t
# -
@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
# Self properties description
# ---------------------------
@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(Margin, self).__init__("margin")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Margin
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Margin`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("autoexpand", None)
_v = autoexpand if autoexpand is not None else _v
if _v is not None:
self["autoexpand"] = _v
_v = arg.pop("b", None)
_v = b if b is not None else _v
if _v is not None:
self["b"] = _v
_v = arg.pop("l", None)
_v = l if l is not None else _v
if _v is not None:
self["l"] = _v
_v = arg.pop("pad", None)
_v = pad if pad is not None else _v
if _v is not None:
self["pad"] = _v
_v = arg.pop("r", None)
_v = r if r is not None else _v
if _v is not None:
self["r"] = _v
_v = arg.pop("t", None)
_v = t if t is not None else _v
if _v is not None:
self["t"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,554 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Modebar(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.modebar"
_valid_props = {
"activecolor",
"add",
"addsrc",
"bgcolor",
"color",
"orientation",
"remove",
"removesrc",
"uirevision",
}
# activecolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["activecolor"]
@activecolor.setter
def activecolor(self, val):
self["activecolor"] = val
# add
# ---
@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
# addsrc
# ------
@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
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# orientation
# -----------
@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
# remove
# ------
@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", "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",
"zoomInMapbox", "zoomOut2d", "zoomOutGeo", "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
# removesrc
# ---------
@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
# uirevision
# ----------
@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
# Self properties description
# ---------------------------
@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", "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", "zoomInMapbox",
"zoomOut2d", "zoomOutGeo", "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", "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", "zoomInMapbox",
"zoomOut2d", "zoomOutGeo", "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(Modebar, self).__init__("modebar")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Modebar
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Modebar`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("activecolor", None)
_v = activecolor if activecolor is not None else _v
if _v is not None:
self["activecolor"] = _v
_v = arg.pop("add", None)
_v = add if add is not None else _v
if _v is not None:
self["add"] = _v
_v = arg.pop("addsrc", None)
_v = addsrc if addsrc is not None else _v
if _v is not None:
self["addsrc"] = _v
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("orientation", None)
_v = orientation if orientation is not None else _v
if _v is not None:
self["orientation"] = _v
_v = arg.pop("remove", None)
_v = remove if remove is not None else _v
if _v is not None:
self["remove"] = _v
_v = arg.pop("removesrc", None)
_v = removesrc if removesrc is not None else _v
if _v is not None:
self["removesrc"] = _v
_v = arg.pop("uirevision", None)
_v = uirevision if uirevision is not None else _v
if _v is not None:
self["uirevision"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,351 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Newshape(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.newshape"
_valid_props = {
"drawdirection",
"fillcolor",
"fillrule",
"layer",
"line",
"opacity",
}
# drawdirection
# -------------
@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
# fillcolor
# ---------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["fillcolor"]
@fillcolor.setter
def fillcolor(self, val):
self["fillcolor"] = val
# fillrule
# --------
@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
# layer
# -----
@property
def layer(self):
"""
Specifies whether new shapes are drawn below or above traces.
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
# line
# ----
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.newshape.Line
"""
return self["line"]
@line.setter
def line(self, val):
self["line"] = val
# opacity
# -------
@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
# Self properties description
# ---------------------------
@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
layer
Specifies whether new shapes are drawn below or above
traces.
line
:class:`plotly.graph_objects.layout.newshape.Line`
instance or dict with compatible properties
opacity
Sets the opacity of new shapes.
"""
def __init__(
self,
arg=None,
drawdirection=None,
fillcolor=None,
fillrule=None,
layer=None,
line=None,
opacity=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
layer
Specifies whether new shapes are drawn below or above
traces.
line
:class:`plotly.graph_objects.layout.newshape.Line`
instance or dict with compatible properties
opacity
Sets the opacity of new shapes.
Returns
-------
Newshape
"""
super(Newshape, self).__init__("newshape")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Newshape
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Newshape`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("drawdirection", None)
_v = drawdirection if drawdirection is not None else _v
if _v is not None:
self["drawdirection"] = _v
_v = arg.pop("fillcolor", None)
_v = fillcolor if fillcolor is not None else _v
if _v is not None:
self["fillcolor"] = _v
_v = arg.pop("fillrule", None)
_v = fillrule if fillrule is not None else _v
if _v is not None:
self["fillrule"] = _v
_v = arg.pop("layer", None)
_v = layer if layer is not None else _v
if _v is not None:
self["layer"] = _v
_v = arg.pop("line", None)
_v = line if line is not None else _v
if _v is not None:
self["line"] = _v
_v = arg.pop("opacity", None)
_v = opacity if opacity is not None else _v
if _v is not None:
self["opacity"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,472 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Smith(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.smith"
_valid_props = {"bgcolor", "domain", "imaginaryaxis", "realaxis"}
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# domain
# ------
@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
Supported dict properties:
column
If there is a layout grid, use the domain for
this column in the grid for this smith subplot
.
row
If there is a layout grid, use the domain for
this row in the grid for this smith subplot .
x
Sets the horizontal domain of this smith
subplot (in plot fraction).
y
Sets the vertical domain of this smith subplot
(in plot fraction).
Returns
-------
plotly.graph_objs.layout.smith.Domain
"""
return self["domain"]
@domain.setter
def domain(self, val):
self["domain"] = val
# imaginaryaxis
# -------------
@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
Supported dict properties:
color
Sets default for all colors associated with
this axis all at once: line, font, tick, and
grid colors. Grid color is lightened by
blending this with the plot background
Individual pieces can override this.
gridcolor
Sets the color of the grid lines.
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 width (in px) of the grid lines.
hoverformat
Sets the hover text formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see: h
ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f
ormat. And for dates see:
https://github.com/d3/d3-time-
format/tree/v2.2.3#locale_format. We add two
items to d3's date formatter: "%h" for half of
the year as a decimal number as well as "%{n}f"
for fractional seconds with n digits. For
example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display
"09~15~23.46"
layer
Sets the layer on which this axis is displayed.
If *above traces*, this axis is displayed above
all the subplot's traces If *below traces*,
this axis is displayed below all the subplot's
traces, but above the grid lines. Useful when
used together with scatter-like traces with
`cliponaxis` set to False to show markers
and/or text nodes above this axis.
linecolor
Sets the axis line color.
linewidth
Sets the width (in px) of the axis line.
showgrid
Determines whether or not grid lines are drawn.
If True, the grid lines are drawn at every tick
mark.
showline
Determines whether or not a line bounding this
axis is drawn.
showticklabels
Determines whether or not the tick labels are
drawn.
showtickprefix
If "all", all tick labels are displayed with a
prefix. If "first", only the first tick is
displayed with a prefix. If "last", only the
last tick is displayed with a suffix. If
"none", tick prefixes are hidden.
showticksuffix
Same as `showtickprefix` but for tick suffixes.
tickcolor
Sets the tick color.
tickfont
Sets the tick font.
tickformat
Sets the tick label formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see: h
ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f
ormat. And for dates see:
https://github.com/d3/d3-time-
format/tree/v2.2.3#locale_format. We add two
items to d3's date formatter: "%h" for half of
the year as a decimal number as well as "%{n}f"
for fractional seconds with n digits. For
example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display
"09~15~23.46"
ticklen
Sets the tick length (in px).
tickprefix
Sets a tick label prefix.
ticks
Determines whether ticks are drawn or not. If
"", this axis' ticks are not drawn. If
"outside" ("inside"), this axis' are drawn
outside (inside) the axis lines.
ticksuffix
Sets a tick label suffix.
tickvals
Sets the values at which ticks on this axis
appear. Defaults to `realaxis.tickvals` plus
the same as negatives and zero.
tickvalssrc
Sets the source reference on Chart Studio Cloud
for `tickvals`.
tickwidth
Sets the tick width (in px).
visible
A single toggle to hide the axis while
preserving interaction like dragging. Default
is true when a cheater plot is present on the
axis, otherwise false
Returns
-------
plotly.graph_objs.layout.smith.Imaginaryaxis
"""
return self["imaginaryaxis"]
@imaginaryaxis.setter
def imaginaryaxis(self, val):
self["imaginaryaxis"] = val
# realaxis
# --------
@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
Supported dict properties:
color
Sets default for all colors associated with
this axis all at once: line, font, tick, and
grid colors. Grid color is lightened by
blending this with the plot background
Individual pieces can override this.
gridcolor
Sets the color of the grid lines.
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 width (in px) of the grid lines.
hoverformat
Sets the hover text formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see: h
ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f
ormat. And for dates see:
https://github.com/d3/d3-time-
format/tree/v2.2.3#locale_format. We add two
items to d3's date formatter: "%h" for half of
the year as a decimal number as well as "%{n}f"
for fractional seconds with n digits. For
example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display
"09~15~23.46"
layer
Sets the layer on which this axis is displayed.
If *above traces*, this axis is displayed above
all the subplot's traces If *below traces*,
this axis is displayed below all the subplot's
traces, but above the grid lines. Useful when
used together with scatter-like traces with
`cliponaxis` set to False to show markers
and/or text nodes above this axis.
linecolor
Sets the axis line color.
linewidth
Sets the width (in px) of the axis line.
showgrid
Determines whether or not grid lines are drawn.
If True, the grid lines are drawn at every tick
mark.
showline
Determines whether or not a line bounding this
axis is drawn.
showticklabels
Determines whether or not the tick labels are
drawn.
showtickprefix
If "all", all tick labels are displayed with a
prefix. If "first", only the first tick is
displayed with a prefix. If "last", only the
last tick is displayed with a suffix. If
"none", tick prefixes are hidden.
showticksuffix
Same as `showtickprefix` but for tick suffixes.
side
Determines on which side of real axis line the
tick and tick labels appear.
tickangle
Sets the angle of the tick labels with respect
to the horizontal. For example, a `tickangle`
of -90 draws the tick labels vertically.
tickcolor
Sets the tick color.
tickfont
Sets the tick font.
tickformat
Sets the tick label formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see: h
ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f
ormat. And for dates see:
https://github.com/d3/d3-time-
format/tree/v2.2.3#locale_format. We add two
items to d3's date formatter: "%h" for half of
the year as a decimal number as well as "%{n}f"
for fractional seconds with n digits. For
example, *2016-10-13 09:15:23.456* with
tickformat "%H~%M~%S.%2f" would display
"09~15~23.46"
ticklen
Sets the tick length (in px).
tickprefix
Sets a tick label prefix.
ticks
Determines whether ticks are drawn or not. If
"", this axis' ticks are not drawn. If "top"
("bottom"), this axis' are drawn above (below)
the axis line.
ticksuffix
Sets a tick label suffix.
tickvals
Sets the values at which ticks on this axis
appear.
tickvalssrc
Sets the source reference on Chart Studio Cloud
for `tickvals`.
tickwidth
Sets the tick width (in px).
visible
A single toggle to hide the axis while
preserving interaction like dragging. Default
is true when a cheater plot is present on the
axis, otherwise false
Returns
-------
plotly.graph_objs.layout.smith.Realaxis
"""
return self["realaxis"]
@realaxis.setter
def realaxis(self, val):
self["realaxis"] = val
# Self properties description
# ---------------------------
@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(Smith, self).__init__("smith")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Smith
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Smith`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("domain", None)
_v = domain if domain is not None else _v
if _v is not None:
self["domain"] = _v
_v = arg.pop("imaginaryaxis", None)
_v = imaginaryaxis if imaginaryaxis is not None else _v
if _v is not None:
self["imaginaryaxis"] = _v
_v = arg.pop("realaxis", None)
_v = realaxis if realaxis is not None else _v
if _v is not None:
self["realaxis"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,335 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Template(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.template"
_valid_props = {"data", "layout"}
# data
# ----
@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
Supported dict properties:
barpolar
A tuple of
:class:`plotly.graph_objects.Barpolar`
instances or dicts with compatible properties
bar
A tuple of :class:`plotly.graph_objects.Bar`
instances or dicts with compatible properties
box
A tuple of :class:`plotly.graph_objects.Box`
instances or dicts with compatible properties
candlestick
A tuple of
:class:`plotly.graph_objects.Candlestick`
instances or dicts with compatible properties
carpet
A tuple of :class:`plotly.graph_objects.Carpet`
instances or dicts with compatible properties
choroplethmapbox
A tuple of
:class:`plotly.graph_objects.Choroplethmapbox`
instances or dicts with compatible properties
choropleth
A tuple of
:class:`plotly.graph_objects.Choropleth`
instances or dicts with compatible properties
cone
A tuple of :class:`plotly.graph_objects.Cone`
instances or dicts with compatible properties
contourcarpet
A tuple of
:class:`plotly.graph_objects.Contourcarpet`
instances or dicts with compatible properties
contour
A tuple of
:class:`plotly.graph_objects.Contour` instances
or dicts with compatible properties
densitymapbox
A tuple of
:class:`plotly.graph_objects.Densitymapbox`
instances or dicts with compatible properties
funnelarea
A tuple of
:class:`plotly.graph_objects.Funnelarea`
instances or dicts with compatible properties
funnel
A tuple of :class:`plotly.graph_objects.Funnel`
instances or dicts with compatible properties
heatmapgl
A tuple of
:class:`plotly.graph_objects.Heatmapgl`
instances or dicts with compatible properties
heatmap
A tuple of
:class:`plotly.graph_objects.Heatmap` instances
or dicts with compatible properties
histogram2dcontour
A tuple of :class:`plotly.graph_objects.Histogr
am2dContour` instances or dicts with compatible
properties
histogram2d
A tuple of
:class:`plotly.graph_objects.Histogram2d`
instances or dicts with compatible properties
histogram
A tuple of
:class:`plotly.graph_objects.Histogram`
instances or dicts with compatible properties
icicle
A tuple of :class:`plotly.graph_objects.Icicle`
instances or dicts with compatible properties
image
A tuple of :class:`plotly.graph_objects.Image`
instances or dicts with compatible properties
indicator
A tuple of
:class:`plotly.graph_objects.Indicator`
instances or dicts with compatible properties
isosurface
A tuple of
:class:`plotly.graph_objects.Isosurface`
instances or dicts with compatible properties
mesh3d
A tuple of :class:`plotly.graph_objects.Mesh3d`
instances or dicts with compatible properties
ohlc
A tuple of :class:`plotly.graph_objects.Ohlc`
instances or dicts with compatible properties
parcats
A tuple of
:class:`plotly.graph_objects.Parcats` instances
or dicts with compatible properties
parcoords
A tuple of
:class:`plotly.graph_objects.Parcoords`
instances or dicts with compatible properties
pie
A tuple of :class:`plotly.graph_objects.Pie`
instances or dicts with compatible properties
pointcloud
A tuple of
:class:`plotly.graph_objects.Pointcloud`
instances or dicts with compatible properties
sankey
A tuple of :class:`plotly.graph_objects.Sankey`
instances or dicts with compatible properties
scatter3d
A tuple of
:class:`plotly.graph_objects.Scatter3d`
instances or dicts with compatible properties
scattercarpet
A tuple of
:class:`plotly.graph_objects.Scattercarpet`
instances or dicts with compatible properties
scattergeo
A tuple of
:class:`plotly.graph_objects.Scattergeo`
instances or dicts with compatible properties
scattergl
A tuple of
:class:`plotly.graph_objects.Scattergl`
instances or dicts with compatible properties
scattermapbox
A tuple of
:class:`plotly.graph_objects.Scattermapbox`
instances or dicts with compatible properties
scatterpolargl
A tuple of
:class:`plotly.graph_objects.Scatterpolargl`
instances or dicts with compatible properties
scatterpolar
A tuple of
:class:`plotly.graph_objects.Scatterpolar`
instances or dicts with compatible properties
scatter
A tuple of
:class:`plotly.graph_objects.Scatter` instances
or dicts with compatible properties
scattersmith
A tuple of
:class:`plotly.graph_objects.Scattersmith`
instances or dicts with compatible properties
scatterternary
A tuple of
:class:`plotly.graph_objects.Scatterternary`
instances or dicts with compatible properties
splom
A tuple of :class:`plotly.graph_objects.Splom`
instances or dicts with compatible properties
streamtube
A tuple of
:class:`plotly.graph_objects.Streamtube`
instances or dicts with compatible properties
sunburst
A tuple of
:class:`plotly.graph_objects.Sunburst`
instances or dicts with compatible properties
surface
A tuple of
:class:`plotly.graph_objects.Surface` instances
or dicts with compatible properties
table
A tuple of :class:`plotly.graph_objects.Table`
instances or dicts with compatible properties
treemap
A tuple of
:class:`plotly.graph_objects.Treemap` instances
or dicts with compatible properties
violin
A tuple of :class:`plotly.graph_objects.Violin`
instances or dicts with compatible properties
volume
A tuple of :class:`plotly.graph_objects.Volume`
instances or dicts with compatible properties
waterfall
A tuple of
:class:`plotly.graph_objects.Waterfall`
instances or dicts with compatible properties
Returns
-------
plotly.graph_objs.layout.template.Data
"""
return self["data"]
@data.setter
def data(self, val):
self["data"] = val
# layout
# ------
@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
Supported dict properties:
Returns
-------
plotly.graph_objs.layout.template.Layout
"""
return self["layout"]
@layout.setter
def layout(self, val):
self["layout"] = val
# Self properties description
# ---------------------------
@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(Template, self).__init__("template")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Template
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Template`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("data", None)
_v = data if data is not None else _v
if _v is not None:
self["data"] = _v
_v = arg.pop("layout", None)
_v = layout if layout is not None else _v
if _v is not None:
self["layout"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,478 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Title(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.title"
_valid_props = {
"font",
"pad",
"text",
"x",
"xanchor",
"xref",
"y",
"yanchor",
"yref",
}
# font
# ----
@property
def font(self):
"""
Sets the title font. Note that the title's font used to be
customized by the now deprecated `titlefont` attribute.
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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.title.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# pad
# ---
@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
Supported dict properties:
b
The amount of padding (in px) along the bottom
of the component.
l
The amount of padding (in px) on the left side
of the component.
r
The amount of padding (in px) on the right side
of the component.
t
The amount of padding (in px) along the top of
the component.
Returns
-------
plotly.graph_objs.layout.title.Pad
"""
return self["pad"]
@pad.setter
def pad(self, val):
self["pad"] = val
# text
# ----
@property
def text(self):
"""
Sets the plot's title. Note that before the existence of
`title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
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
# x
# -
@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
# xanchor
# -------
@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
# xref
# ----
@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
# y
# -
@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
# yanchor
# -------
@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
# yref
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
font
Sets the title font. Note that the title's font used to
be customized by the now deprecated `titlefont`
attribute.
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".
text
Sets the plot's title. Note that before the existence
of `title.text`, the title's contents used to be
defined as the `title` attribute itself. This behavior
has been deprecated.
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,
font=None,
pad=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`
font
Sets the title font. Note that the title's font used to
be customized by the now deprecated `titlefont`
attribute.
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".
text
Sets the plot's title. Note that before the existence
of `title.text`, the title's contents used to be
defined as the `title` attribute itself. This behavior
has been deprecated.
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(Title, self).__init__("title")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Title
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Title`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("pad", None)
_v = pad if pad is not None else _v
if _v is not None:
self["pad"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("xanchor", None)
_v = xanchor if xanchor is not None else _v
if _v is not None:
self["xanchor"] = _v
_v = arg.pop("xref", None)
_v = xref if xref is not None else _v
if _v is not None:
self["xref"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("yanchor", None)
_v = yanchor if yanchor is not None else _v
if _v is not None:
self["yanchor"] = _v
_v = arg.pop("yref", None)
_v = yref if yref is not None else _v
if _v is not None:
self["yref"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,176 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Transition(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.transition"
_valid_props = {"duration", "easing", "ordering"}
# duration
# --------
@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
# easing
# ------
@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
# ordering
# --------
@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
# Self properties description
# ---------------------------
@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(Transition, self).__init__("transition")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Transition
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Transition`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("duration", None)
_v = duration if duration is not None else _v
if _v is not None:
self["duration"] = _v
_v = arg.pop("easing", None)
_v = easing if easing is not None else _v
if _v is not None:
self["easing"] = _v
_v = arg.pop("ordering", None)
_v = ordering if ordering is not None else _v
if _v is not None:
self["ordering"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,151 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Uniformtext(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.uniformtext"
_valid_props = {"minsize", "mode"}
# minsize
# -------
@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
# mode
# ----
@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
# Self properties description
# ---------------------------
@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(Uniformtext, self).__init__("uniformtext")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Uniformtext
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Uniformtext`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("minsize", None)
_v = minsize if minsize is not None else _v
if _v is not None:
self["minsize"] = _v
_v = arg.pop("mode", None)
_v = mode if mode is not None else _v
if _v is not None:
self["mode"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,905 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Updatemenu(_BaseLayoutHierarchyType):
# class properties
# --------------------
_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",
}
# active
# ------
@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
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# bordercolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bordercolor"]
@bordercolor.setter
def bordercolor(self, val):
self["bordercolor"] = val
# borderwidth
# -----------
@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
# buttons
# -------
@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
Supported dict properties:
args
Sets the arguments values to be passed to the
Plotly method set in `method` on click.
args2
Sets a 2nd set of `args`, these arguments
values are passed to the Plotly method set in
`method` when clicking this button while in the
active state. Use this to create toggle
buttons.
execute
When true, the API method is executed. When
false, all other behaviors are the same and
command execution is skipped. This may be
useful when hooking into, for example, the
`plotly_buttonclicked` method and executing the
API command manually without losing the benefit
of the updatemenu automatically binding to the
state of the plot through the specification of
`method` and `args`.
label
Sets the text label to appear on the button.
method
Sets the Plotly method to be called on click.
If the `skip` method is used, the API
updatemenu will function as normal but will
perform no API calls and will not bind
automatically to state updates. This may be
used to create a component interface and attach
to updatemenu events manually via JavaScript.
name
When used in a template, named items are
created in the output figure in addition to any
items the figure already has in this array. You
can modify these items in the output figure by
making your own item with `templateitemname`
matching this `name` alongside your
modifications (including `visible: false` or
`enabled: false` to hide it). Has no effect
outside of a template.
templateitemname
Used to refer to a named item in this array in
the template. Named items from the template
will be created even without a matching item in
the input figure, but you can modify one by
making an item with `templateitemname` matching
its `name`, alongside your modifications
(including `visible: false` or `enabled: false`
to hide it). If there is no template or no
matching item, this item will be hidden unless
you explicitly show it with `visible: true`.
visible
Determines whether or not this button is
visible.
Returns
-------
tuple[plotly.graph_objs.layout.updatemenu.Button]
"""
return self["buttons"]
@buttons.setter
def buttons(self, val):
self["buttons"] = val
# buttondefaults
# --------------
@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
Supported dict properties:
Returns
-------
plotly.graph_objs.layout.updatemenu.Button
"""
return self["buttondefaults"]
@buttondefaults.setter
def buttondefaults(self, val):
self["buttondefaults"] = val
# direction
# ---------
@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
# font
# ----
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.updatemenu.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# name
# ----
@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
# pad
# ---
@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
Supported dict properties:
b
The amount of padding (in px) along the bottom
of the component.
l
The amount of padding (in px) on the left side
of the component.
r
The amount of padding (in px) on the right side
of the component.
t
The amount of padding (in px) along the top of
the component.
Returns
-------
plotly.graph_objs.layout.updatemenu.Pad
"""
return self["pad"]
@pad.setter
def pad(self, val):
self["pad"] = val
# showactive
# ----------
@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
# templateitemname
# ----------------
@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
# type
# ----
@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
# visible
# -------
@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
# x
# -
@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
# xanchor
# -------
@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
# y
# -
@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
# yanchor
# -------
@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
# Self properties description
# ---------------------------
@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(Updatemenu, self).__init__("updatemenus")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.Updatemenu
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.Updatemenu`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("active", None)
_v = active if active is not None else _v
if _v is not None:
self["active"] = _v
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("bordercolor", None)
_v = bordercolor if bordercolor is not None else _v
if _v is not None:
self["bordercolor"] = _v
_v = arg.pop("borderwidth", None)
_v = borderwidth if borderwidth is not None else _v
if _v is not None:
self["borderwidth"] = _v
_v = arg.pop("buttons", None)
_v = buttons if buttons is not None else _v
if _v is not None:
self["buttons"] = _v
_v = arg.pop("buttondefaults", None)
_v = buttondefaults if buttondefaults is not None else _v
if _v is not None:
self["buttondefaults"] = _v
_v = arg.pop("direction", None)
_v = direction if direction is not None else _v
if _v is not None:
self["direction"] = _v
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("pad", None)
_v = pad if pad is not None else _v
if _v is not None:
self["pad"] = _v
_v = arg.pop("showactive", None)
_v = showactive if showactive is not None else _v
if _v is not None:
self["showactive"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("type", None)
_v = type if type is not None else _v
if _v is not None:
self["type"] = _v
_v = arg.pop("visible", None)
_v = visible if visible is not None else _v
if _v is not None:
self["visible"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("xanchor", None)
_v = xanchor if xanchor is not None else _v
if _v is not None:
self["xanchor"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("yanchor", None)
_v = yanchor if yanchor is not None else _v
if _v is not None:
self["yanchor"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"]
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.annotation"
_path_str = "layout.annotation.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.annotation.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.annotation.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,276 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Hoverlabel(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.annotation"
_path_str = "layout.annotation.hoverlabel"
_valid_props = {"bgcolor", "bordercolor", "font"}
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# bordercolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bordercolor"]
@bordercolor.setter
def bordercolor(self, val):
self["bordercolor"] = val
# font
# ----
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.annotation.hoverlabel.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# Self properties description
# ---------------------------
@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(Hoverlabel, self).__init__("hoverlabel")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.annotation.Hoverlabel
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("bordercolor", None)
_v = bordercolor if bordercolor is not None else _v
if _v is not None:
self["bordercolor"] = _v
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.annotation.hoverlabel"
_path_str = "layout.annotation.hoverlabel.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.annotation.hoverlabel.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,12 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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

View File

@@ -0,0 +1,16 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"],
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickfont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.coloraxis.colorbar"
_path_str = "layout.coloraxis.colorbar.tickfont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Tickfont
"""
super(Tickfont, self).__init__("tickfont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.coloraxis.colorbar.Tickfont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,283 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickformatstop(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.coloraxis.colorbar"
_path_str = "layout.coloraxis.colorbar.tickformatstop"
_valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"}
# dtickrange
# ----------
@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
# enabled
# -------
@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
# name
# ----
@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
# templateitemname
# ----------------
@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
# value
# -----
@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
# Self properties description
# ---------------------------
@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(Tickformatstop, self).__init__("tickformatstops")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dtickrange", None)
_v = dtickrange if dtickrange is not None else _v
if _v is not None:
self["dtickrange"] = _v
_v = arg.pop("enabled", None)
_v = enabled if enabled is not None else _v
if _v is not None:
self["enabled"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("value", None)
_v = value if value is not None else _v
if _v is not None:
self["value"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,210 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Title(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.coloraxis.colorbar"
_path_str = "layout.coloraxis.colorbar.title"
_valid_props = {"font", "side", "text"}
# font
# ----
@property
def font(self):
"""
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.coloraxis.colorbar.title.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# side
# ----
@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". Note that the
title's location used to be set by the now deprecated
`titleside` attribute.
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
# text
# ----
@property
def text(self):
"""
Sets the title of the color bar. Note that before the existence
of `title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
font
Sets this color bar's title font. Note that the title's
font used to be set by the now deprecated `titlefont`
attribute.
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". Note that the title's location
used to be set by the now deprecated `titleside`
attribute.
text
Sets the title of the color bar. Note that before the
existence of `title.text`, the title's contents used to
be defined as the `title` attribute itself. This
behavior has been deprecated.
"""
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. Note that the title's
font used to be set by the now deprecated `titlefont`
attribute.
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". Note that the title's location
used to be set by the now deprecated `titleside`
attribute.
text
Sets the title of the color bar. Note that before the
existence of `title.text`, the title's contents used to
be defined as the `title` attribute itself. This
behavior has been deprecated.
Returns
-------
Title
"""
super(Title, self).__init__("title")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.coloraxis.colorbar.Title
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("side", None)
_v = side if side is not None else _v
if _v is not None:
self["side"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.coloraxis.colorbar.title"
_path_str = "layout.coloraxis.colorbar.title.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.coloraxis.colorbar.title.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,24 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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",
],
)

View File

@@ -0,0 +1,142 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Center(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo"
_path_str = "layout.geo.center"
_valid_props = {"lat", "lon"}
# lat
# ---
@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
# lon
# ---
@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
# Self properties description
# ---------------------------
@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(Center, self).__init__("center")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.Center
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.Center`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("lat", None)
_v = lat if lat is not None else _v
if _v is not None:
self["lat"] = _v
_v = arg.pop("lon", None)
_v = lon if lon is not None else _v
if _v is not None:
self["lon"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,241 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo"
_path_str = "layout.geo.domain"
_valid_props = {"column", "row", "x", "y"}
# column
# ------
@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
# row
# ---
@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
# x
# -
@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
# y
# -
@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
# Self properties description
# ---------------------------
@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(Domain, self).__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.Domain
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.Domain`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("column", None)
_v = column if column is not None else _v
if _v is not None:
self["column"] = _v
_v = arg.pop("row", None)
_v = row if row is not None else _v
if _v is not None:
self["row"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,345 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Lataxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo"
_path_str = "layout.geo.lataxis"
_valid_props = {
"dtick",
"gridcolor",
"griddash",
"gridwidth",
"range",
"showgrid",
"tick0",
}
# dtick
# -----
@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
# gridcolor
# ---------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["gridcolor"]
@gridcolor.setter
def gridcolor(self, val):
self["gridcolor"] = val
# griddash
# --------
@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
# gridwidth
# ---------
@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
# range
# -----
@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
# showgrid
# --------
@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
# tick0
# -----
@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
# Self properties description
# ---------------------------
@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(Lataxis, self).__init__("lataxis")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.Lataxis
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dtick", None)
_v = dtick if dtick is not None else _v
if _v is not None:
self["dtick"] = _v
_v = arg.pop("gridcolor", None)
_v = gridcolor if gridcolor is not None else _v
if _v is not None:
self["gridcolor"] = _v
_v = arg.pop("griddash", None)
_v = griddash if griddash is not None else _v
if _v is not None:
self["griddash"] = _v
_v = arg.pop("gridwidth", None)
_v = gridwidth if gridwidth is not None else _v
if _v is not None:
self["gridwidth"] = _v
_v = arg.pop("range", None)
_v = range if range is not None else _v
if _v is not None:
self["range"] = _v
_v = arg.pop("showgrid", None)
_v = showgrid if showgrid is not None else _v
if _v is not None:
self["showgrid"] = _v
_v = arg.pop("tick0", None)
_v = tick0 if tick0 is not None else _v
if _v is not None:
self["tick0"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,345 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Lonaxis(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo"
_path_str = "layout.geo.lonaxis"
_valid_props = {
"dtick",
"gridcolor",
"griddash",
"gridwidth",
"range",
"showgrid",
"tick0",
}
# dtick
# -----
@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
# gridcolor
# ---------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["gridcolor"]
@gridcolor.setter
def gridcolor(self, val):
self["gridcolor"] = val
# griddash
# --------
@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
# gridwidth
# ---------
@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
# range
# -----
@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
# showgrid
# --------
@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
# tick0
# -----
@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
# Self properties description
# ---------------------------
@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(Lonaxis, self).__init__("lonaxis")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.Lonaxis
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dtick", None)
_v = dtick if dtick is not None else _v
if _v is not None:
self["dtick"] = _v
_v = arg.pop("gridcolor", None)
_v = gridcolor if gridcolor is not None else _v
if _v is not None:
self["gridcolor"] = _v
_v = arg.pop("griddash", None)
_v = griddash if griddash is not None else _v
if _v is not None:
self["griddash"] = _v
_v = arg.pop("gridwidth", None)
_v = gridwidth if gridwidth is not None else _v
if _v is not None:
self["gridwidth"] = _v
_v = arg.pop("range", None)
_v = range if range is not None else _v
if _v is not None:
self["range"] = _v
_v = arg.pop("showgrid", None)
_v = showgrid if showgrid is not None else _v
if _v is not None:
self["showgrid"] = _v
_v = arg.pop("tick0", None)
_v = tick0 if tick0 is not None else _v
if _v is not None:
self["tick0"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,311 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Projection(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo"
_path_str = "layout.geo.projection"
_valid_props = {"distance", "parallels", "rotation", "scale", "tilt", "type"}
# distance
# --------
@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 spheres 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
# parallels
# ---------
@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
# rotation
# --------
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.geo.projection.Rotation
"""
return self["rotation"]
@rotation.setter
def rotation(self, val):
self["rotation"] = val
# scale
# -----
@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
# tilt
# ----
@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
# type
# ----
@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',
'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
# Self properties description
# ---------------------------
@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 spheres 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 spheres 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(Projection, self).__init__("projection")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.Projection
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.Projection`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("distance", None)
_v = distance if distance is not None else _v
if _v is not None:
self["distance"] = _v
_v = arg.pop("parallels", None)
_v = parallels if parallels is not None else _v
if _v is not None:
self["parallels"] = _v
_v = arg.pop("rotation", None)
_v = rotation if rotation is not None else _v
if _v is not None:
self["rotation"] = _v
_v = arg.pop("scale", None)
_v = scale if scale is not None else _v
if _v is not None:
self["scale"] = _v
_v = arg.pop("tilt", None)
_v = tilt if tilt is not None else _v
if _v is not None:
self["tilt"] = _v
_v = arg.pop("type", None)
_v = type if type is not None else _v
if _v is not None:
self["type"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,11 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._rotation import Rotation
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._rotation.Rotation"]
)

View File

@@ -0,0 +1,161 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Rotation(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.geo.projection"
_path_str = "layout.geo.projection.rotation"
_valid_props = {"lat", "lon", "roll"}
# lat
# ---
@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
# lon
# ---
@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
# roll
# ----
@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
# Self properties description
# ---------------------------
@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(Rotation, self).__init__("rotation")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.geo.projection.Rotation
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("lat", None)
_v = lat if lat is not None else _v
if _v is not None:
self["lat"] = _v
_v = arg.pop("lon", None)
_v = lon if lon is not None else _v
if _v is not None:
self["lon"] = _v
_v = arg.pop("roll", None)
_v = roll if roll is not None else _v
if _v is not None:
self["roll"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._domain import Domain
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._domain.Domain"])

View File

@@ -0,0 +1,149 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.grid"
_path_str = "layout.grid.domain"
_valid_props = {"x", "y"}
# x
# -
@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
# y
# -
@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
# Self properties description
# ---------------------------
@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(Domain, self).__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.grid.Domain
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.grid.Domain`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,12 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"]
)

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.hoverlabel"
_path_str = "layout.hoverlabel.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.hoverlabel.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Grouptitlefont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.hoverlabel"
_path_str = "layout.hoverlabel.grouptitlefont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Grouptitlefont
"""
super(Grouptitlefont, self).__init__("grouptitlefont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.hoverlabel.Grouptitlefont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,16 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"],
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.legend"
_path_str = "layout.legend.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.legend.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.legend.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Grouptitlefont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.legend"
_path_str = "layout.legend.grouptitlefont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Grouptitlefont
"""
super(Grouptitlefont, self).__init__("grouptitlefont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.legend.Grouptitlefont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.legend.Grouptitlefont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,198 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Title(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.legend"
_path_str = "layout.legend.title"
_valid_props = {"font", "side", "text"}
# font
# ----
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.legend.title.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# side
# ----
@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 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']
Returns
-------
Any
"""
return self["side"]
@side.setter
def side(self, val):
self["side"] = val
# text
# ----
@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
# Self properties description
# ---------------------------
@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 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 legend area in both x and y sides.
text
Sets the title of the legend.
Returns
-------
Title
"""
super(Title, self).__init__("title")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.legend.Title
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.legend.Title`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("side", None)
_v = side if side is not None else _v
if _v is not None:
self["side"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.legend.title"
_path_str = "layout.legend.title.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.legend.title.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.legend.title.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,14 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
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"], ["._center.Center", "._domain.Domain", "._layer.Layer"]
)

View File

@@ -0,0 +1,131 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Center(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox"
_path_str = "layout.mapbox.center"
_valid_props = {"lat", "lon"}
# lat
# ---
@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
# lon
# ---
@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
# Self properties description
# ---------------------------
@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(Center, self).__init__("center")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.Center
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.Center`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("lat", None)
_v = lat if lat is not None else _v
if _v is not None:
self["lat"] = _v
_v = arg.pop("lon", None)
_v = lon if lon is not None else _v
if _v is not None:
self["lon"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,207 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox"
_path_str = "layout.mapbox.domain"
_valid_props = {"column", "row", "x", "y"}
# column
# ------
@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
# row
# ---
@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
# x
# -
@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
# y
# -
@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
# Self properties description
# ---------------------------
@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(Domain, self).__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.Domain
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.Domain`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("column", None)
_v = column if column is not None else _v
if _v is not None:
self["column"] = _v
_v = arg.pop("row", None)
_v = row if row is not None else _v
if _v is not None:
self["row"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,896 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Layer(_BaseLayoutHierarchyType):
# class properties
# --------------------
_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",
}
# below
# -----
@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
# circle
# ------
@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
Supported dict properties:
radius
Sets the circle radius
(mapbox.layer.paint.circle-radius). Has an
effect only when `type` is set to "circle".
Returns
-------
plotly.graph_objs.layout.mapbox.layer.Circle
"""
return self["circle"]
@circle.setter
def circle(self, val):
self["circle"] = val
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# coordinates
# -----------
@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
# fill
# ----
@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
Supported dict properties:
outlinecolor
Sets the fill outline color
(mapbox.layer.paint.fill-outline-color). Has an
effect only when `type` is set to "fill".
Returns
-------
plotly.graph_objs.layout.mapbox.layer.Fill
"""
return self["fill"]
@fill.setter
def fill(self, val):
self["fill"] = val
# line
# ----
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.mapbox.layer.Line
"""
return self["line"]
@line.setter
def line(self, val):
self["line"] = val
# maxzoom
# -------
@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
# minzoom
# -------
@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
# name
# ----
@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
# opacity
# -------
@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
# source
# ------
@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
# sourceattribution
# -----------------
@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
# sourcelayer
# -----------
@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
# sourcetype
# ----------
@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
# symbol
# ------
@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
Supported dict properties:
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
-------
plotly.graph_objs.layout.mapbox.layer.Symbol
"""
return self["symbol"]
@symbol.setter
def symbol(self, val):
self["symbol"] = val
# templateitemname
# ----------------
@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
# type
# ----
@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
# visible
# -------
@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
# Self properties description
# ---------------------------
@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(Layer, self).__init__("layers")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.Layer
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.Layer`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("below", None)
_v = below if below is not None else _v
if _v is not None:
self["below"] = _v
_v = arg.pop("circle", None)
_v = circle if circle is not None else _v
if _v is not None:
self["circle"] = _v
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("coordinates", None)
_v = coordinates if coordinates is not None else _v
if _v is not None:
self["coordinates"] = _v
_v = arg.pop("fill", None)
_v = fill if fill is not None else _v
if _v is not None:
self["fill"] = _v
_v = arg.pop("line", None)
_v = line if line is not None else _v
if _v is not None:
self["line"] = _v
_v = arg.pop("maxzoom", None)
_v = maxzoom if maxzoom is not None else _v
if _v is not None:
self["maxzoom"] = _v
_v = arg.pop("minzoom", None)
_v = minzoom if minzoom is not None else _v
if _v is not None:
self["minzoom"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("opacity", None)
_v = opacity if opacity is not None else _v
if _v is not None:
self["opacity"] = _v
_v = arg.pop("source", None)
_v = source if source is not None else _v
if _v is not None:
self["source"] = _v
_v = arg.pop("sourceattribution", None)
_v = sourceattribution if sourceattribution is not None else _v
if _v is not None:
self["sourceattribution"] = _v
_v = arg.pop("sourcelayer", None)
_v = sourcelayer if sourcelayer is not None else _v
if _v is not None:
self["sourcelayer"] = _v
_v = arg.pop("sourcetype", None)
_v = sourcetype if sourcetype is not None else _v
if _v is not None:
self["sourcetype"] = _v
_v = arg.pop("symbol", None)
_v = symbol if symbol is not None else _v
if _v is not None:
self["symbol"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("type", None)
_v = type if type is not None else _v
if _v is not None:
self["type"] = _v
_v = arg.pop("visible", None)
_v = visible if visible is not None else _v
if _v is not None:
self["visible"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,17 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"],
)

View File

@@ -0,0 +1,104 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Circle(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer"
_path_str = "layout.mapbox.layer.circle"
_valid_props = {"radius"}
# 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
# Self properties description
# ---------------------------
@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(Circle, self).__init__("circle")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.layer.Circle
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("radius", None)
_v = radius if radius is not None else _v
if _v is not None:
self["radius"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,143 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Fill(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer"
_path_str = "layout.mapbox.layer.fill"
_valid_props = {"outlinecolor"}
# 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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["outlinecolor"]
@outlinecolor.setter
def outlinecolor(self, val):
self["outlinecolor"] = val
# Self properties description
# ---------------------------
@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(Fill, self).__init__("fill")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.layer.Fill
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("outlinecolor", None)
_v = outlinecolor if outlinecolor is not None else _v
if _v is not None:
self["outlinecolor"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,165 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Line(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer"
_path_str = "layout.mapbox.layer.line"
_valid_props = {"dash", "dashsrc", "width"}
# dash
# ----
@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
# dashsrc
# -------
@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
# width
# -----
@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
# Self properties description
# ---------------------------
@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(Line, self).__init__("line")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.layer.Line
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dash", None)
_v = dash if dash is not None else _v
if _v is not None:
self["dash"] = _v
_v = arg.pop("dashsrc", None)
_v = dashsrc if dashsrc is not None else _v
if _v is not None:
self["dashsrc"] = _v
_v = arg.pop("width", None)
_v = width if width is not None else _v
if _v is not None:
self["width"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,315 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Symbol(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer"
_path_str = "layout.mapbox.layer.symbol"
_valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"}
# icon
# ----
@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
# iconsize
# --------
@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
# placement
# ---------
@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
# text
# ----
@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
# textfont
# --------
@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
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.mapbox.layer.symbol.Textfont
"""
return self["textfont"]
@textfont.setter
def textfont(self, val):
self["textfont"] = val
# textposition
# ------------
@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
# Self properties description
# ---------------------------
@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(Symbol, self).__init__("symbol")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.layer.Symbol
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("icon", None)
_v = icon if icon is not None else _v
if _v is not None:
self["icon"] = _v
_v = arg.pop("iconsize", None)
_v = iconsize if iconsize is not None else _v
if _v is not None:
self["iconsize"] = _v
_v = arg.pop("placement", None)
_v = placement if placement is not None else _v
if _v is not None:
self["placement"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
_v = arg.pop("textfont", None)
_v = textfont if textfont is not None else _v
if _v is not None:
self["textfont"] = _v
_v = arg.pop("textposition", None)
_v = textposition if textposition is not None else _v
if _v is not None:
self["textposition"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,11 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._textfont import Textfont
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._textfont.Textfont"]
)

View File

@@ -0,0 +1,229 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Textfont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.mapbox.layer.symbol"
_path_str = "layout.mapbox.layer.symbol.textfont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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 will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Textfont
"""
super(Textfont, self).__init__("textfont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.mapbox.layer.symbol.Textfont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._line import Line
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"])

View File

@@ -0,0 +1,209 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Line(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.newshape"
_path_str = "layout.newshape.line"
_valid_props = {"color", "dash", "width"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# dash
# ----
@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
# width
# -----
@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
# Self properties description
# ---------------------------
@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(Line, self).__init__("line")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.newshape.Line
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.newshape.Line`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("dash", None)
_v = dash if dash is not None else _v
if _v is not None:
self["dash"] = _v
_v = arg.pop("width", None)
_v = width if width is not None else _v
if _v is not None:
self["width"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,17 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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

View File

@@ -0,0 +1,207 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar"
_path_str = "layout.polar.domain"
_valid_props = {"column", "row", "x", "y"}
# column
# ------
@property
def column(self):
"""
If there is a layout grid, use the domain for this column in
the grid for this polar 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
# row
# ---
@property
def row(self):
"""
If there is a layout grid, use the domain for this row in the
grid for this polar 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
# x
# -
@property
def x(self):
"""
Sets the horizontal domain of this polar 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
# y
# -
@property
def y(self):
"""
Sets the vertical domain of this polar 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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
column
If there is a layout grid, use the domain for this
column in the grid for this polar subplot .
row
If there is a layout grid, use the domain for this row
in the grid for this polar subplot .
x
Sets the horizontal domain of this polar subplot (in
plot fraction).
y
Sets the vertical domain of this polar 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.polar.Domain`
column
If there is a layout grid, use the domain for this
column in the grid for this polar subplot .
row
If there is a layout grid, use the domain for this row
in the grid for this polar subplot .
x
Sets the horizontal domain of this polar subplot (in
plot fraction).
y
Sets the vertical domain of this polar subplot (in plot
fraction).
Returns
-------
Domain
"""
super(Domain, self).__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.Domain
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.Domain`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("column", None)
_v = column if column is not None else _v
if _v is not None:
self["column"] = _v
_v = arg.pop("row", None)
_v = row if row is not None else _v
if _v is not None:
self["row"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._tickfont import Tickfont
from ._tickformatstop import Tickformatstop
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop"]
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickfont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.angularaxis"
_path_str = "layout.polar.angularaxis.tickfont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Tickfont object
Sets the tick font.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.polar.a
ngularaxis.Tickfont`
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Tickfont
"""
super(Tickfont, self).__init__("tickfont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.angularaxis.Tickfont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,283 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickformatstop(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.angularaxis"
_path_str = "layout.polar.angularaxis.tickformatstop"
_valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"}
# dtickrange
# ----------
@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
# enabled
# -------
@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
# name
# ----
@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
# templateitemname
# ----------------
@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
# value
# -----
@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
# Self properties description
# ---------------------------
@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.polar.a
ngularaxis.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(Tickformatstop, self).__init__("tickformatstops")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.angularaxis.Tickformatstop
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dtickrange", None)
_v = dtickrange if dtickrange is not None else _v
if _v is not None:
self["dtickrange"] = _v
_v = arg.pop("enabled", None)
_v = enabled if enabled is not None else _v
if _v is not None:
self["enabled"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("value", None)
_v = value if value is not None else _v
if _v is not None:
self["value"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,16 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"],
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickfont(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.radialaxis"
_path_str = "layout.polar.radialaxis.tickfont"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Tickfont object
Sets the tick font.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.polar.r
adialaxis.Tickfont`
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Tickfont
"""
super(Tickfont, self).__init__("tickfont")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.radialaxis.Tickfont
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,283 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Tickformatstop(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.radialaxis"
_path_str = "layout.polar.radialaxis.tickformatstop"
_valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"}
# dtickrange
# ----------
@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
# enabled
# -------
@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
# name
# ----
@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
# templateitemname
# ----------------
@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
# value
# -----
@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
# Self properties description
# ---------------------------
@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.polar.r
adialaxis.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(Tickformatstop, self).__init__("tickformatstops")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.radialaxis.Tickformatstop
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("dtickrange", None)
_v = dtickrange if dtickrange is not None else _v
if _v is not None:
self["dtickrange"] = _v
_v = arg.pop("enabled", None)
_v = enabled if enabled is not None else _v
if _v is not None:
self["enabled"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("templateitemname", None)
_v = templateitemname if templateitemname is not None else _v
if _v is not None:
self["templateitemname"] = _v
_v = arg.pop("value", None)
_v = value if value is not None else _v
if _v is not None:
self["value"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,167 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Title(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.radialaxis"
_path_str = "layout.polar.radialaxis.title"
_valid_props = {"font", "text"}
# font
# ----
@property
def font(self):
"""
Sets this axis' title font. Note that the title's font used to
be customized by the now deprecated `titlefont` attribute.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font`
- A dict of string/value properties that will be passed
to the Font constructor
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.polar.radialaxis.title.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# text
# ----
@property
def text(self):
"""
Sets the title of this axis. Note that before the existence of
`title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
font
Sets this axis' title font. Note that the title's font
used to be customized by the now deprecated `titlefont`
attribute.
text
Sets the title of this axis. Note that before the
existence of `title.text`, the title's contents used to
be defined as the `title` attribute itself. This
behavior has been deprecated.
"""
def __init__(self, arg=None, font=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.polar.r
adialaxis.Title`
font
Sets this axis' title font. Note that the title's font
used to be customized by the now deprecated `titlefont`
attribute.
text
Sets the title of this axis. Note that before the
existence of `title.text`, the title's contents used to
be defined as the `title` attribute itself. This
behavior has been deprecated.
Returns
-------
Title
"""
super(Title, self).__init__("title")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.radialaxis.Title
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.polar.radialaxis.title"
_path_str = "layout.polar.radialaxis.title.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets this axis' title font. Note that the title's font used to
be customized by the now deprecated `titlefont` attribute.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.polar.r
adialaxis.title.Font`
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.polar.radialaxis.title.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,32 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._annotation import Annotation
from ._aspectratio import Aspectratio
from ._camera import Camera
from ._domain import Domain
from ._xaxis import XAxis
from ._yaxis import YAxis
from ._zaxis import ZAxis
from . import annotation
from . import camera
from . import xaxis
from . import yaxis
from . import zaxis
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__,
[".annotation", ".camera", ".xaxis", ".yaxis", ".zaxis"],
[
"._annotation.Annotation",
"._aspectratio.Aspectratio",
"._camera.Camera",
"._domain.Domain",
"._xaxis.XAxis",
"._yaxis.YAxis",
"._zaxis.ZAxis",
],
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Aspectratio(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.aspectratio"
_valid_props = {"x", "y", "z"}
# x
# -
@property
def x(self):
"""
The 'x' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["x"]
@x.setter
def x(self, val):
self["x"] = val
# y
# -
@property
def y(self):
"""
The 'y' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["y"]
@y.setter
def y(self, val):
self["y"] = val
# z
# -
@property
def z(self):
"""
The 'z' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["z"]
@z.setter
def z(self, val):
self["z"] = val
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
x
y
z
"""
def __init__(self, arg=None, x=None, y=None, z=None, **kwargs):
"""
Construct a new Aspectratio object
Sets this scene's axis aspectratio.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.scene.Aspectratio`
x
y
z
Returns
-------
Aspectratio
"""
super(Aspectratio, self).__init__("aspectratio")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.Aspectratio
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.Aspectratio`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("z", None)
_v = z if z is not None else _v
if _v is not None:
self["z"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,251 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Camera(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.camera"
_valid_props = {"center", "eye", "projection", "up"}
# center
# ------
@property
def center(self):
"""
Sets the (x,y,z) components of the 'center' camera vector This
vector determines the translation (x,y,z) space about the
center of this scene. By default, there is no such translation.
The 'center' property is an instance of Center
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.camera.Center`
- A dict of string/value properties that will be passed
to the Center constructor
Supported dict properties:
x
y
z
Returns
-------
plotly.graph_objs.layout.scene.camera.Center
"""
return self["center"]
@center.setter
def center(self, val):
self["center"] = val
# eye
# ---
@property
def eye(self):
"""
Sets the (x,y,z) components of the 'eye' camera vector. This
vector determines the view point about the origin of this
scene.
The 'eye' property is an instance of Eye
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.camera.Eye`
- A dict of string/value properties that will be passed
to the Eye constructor
Supported dict properties:
x
y
z
Returns
-------
plotly.graph_objs.layout.scene.camera.Eye
"""
return self["eye"]
@eye.setter
def eye(self, val):
self["eye"] = val
# projection
# ----------
@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.scene.camera.Projection`
- A dict of string/value properties that will be passed
to the Projection constructor
Supported dict properties:
type
Sets the projection type. The projection type
could be either "perspective" or
"orthographic". The default is "perspective".
Returns
-------
plotly.graph_objs.layout.scene.camera.Projection
"""
return self["projection"]
@projection.setter
def projection(self, val):
self["projection"] = val
# up
# --
@property
def up(self):
"""
Sets the (x,y,z) components of the 'up' camera vector. This
vector determines the up direction of this scene with respect
to the page. The default is *{x: 0, y: 0, z: 1}* which means
that the z axis points up.
The 'up' property is an instance of Up
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.camera.Up`
- A dict of string/value properties that will be passed
to the Up constructor
Supported dict properties:
x
y
z
Returns
-------
plotly.graph_objs.layout.scene.camera.Up
"""
return self["up"]
@up.setter
def up(self, val):
self["up"] = val
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
center
Sets the (x,y,z) components of the 'center' camera
vector This vector determines the translation (x,y,z)
space about the center of this scene. By default, there
is no such translation.
eye
Sets the (x,y,z) components of the 'eye' camera vector.
This vector determines the view point about the origin
of this scene.
projection
:class:`plotly.graph_objects.layout.scene.camera.Projec
tion` instance or dict with compatible properties
up
Sets the (x,y,z) components of the 'up' camera vector.
This vector determines the up direction of this scene
with respect to the page. The default is *{x: 0, y: 0,
z: 1}* which means that the z axis points up.
"""
def __init__(
self, arg=None, center=None, eye=None, projection=None, up=None, **kwargs
):
"""
Construct a new Camera object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.scene.Camera`
center
Sets the (x,y,z) components of the 'center' camera
vector This vector determines the translation (x,y,z)
space about the center of this scene. By default, there
is no such translation.
eye
Sets the (x,y,z) components of the 'eye' camera vector.
This vector determines the view point about the origin
of this scene.
projection
:class:`plotly.graph_objects.layout.scene.camera.Projec
tion` instance or dict with compatible properties
up
Sets the (x,y,z) components of the 'up' camera vector.
This vector determines the up direction of this scene
with respect to the page. The default is *{x: 0, y: 0,
z: 1}* which means that the z axis points up.
Returns
-------
Camera
"""
super(Camera, self).__init__("camera")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.Camera
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.Camera`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("center", None)
_v = center if center is not None else _v
if _v is not None:
self["center"] = _v
_v = arg.pop("eye", None)
_v = eye if eye is not None else _v
if _v is not None:
self["eye"] = _v
_v = arg.pop("projection", None)
_v = projection if projection is not None else _v
if _v is not None:
self["projection"] = _v
_v = arg.pop("up", None)
_v = up if up is not None else _v
if _v is not None:
self["up"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,207 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene"
_path_str = "layout.scene.domain"
_valid_props = {"column", "row", "x", "y"}
# column
# ------
@property
def column(self):
"""
If there is a layout grid, use the domain for this column in
the grid for this scene 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
# row
# ---
@property
def row(self):
"""
If there is a layout grid, use the domain for this row in the
grid for this scene 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
# x
# -
@property
def x(self):
"""
Sets the horizontal domain of this scene 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
# y
# -
@property
def y(self):
"""
Sets the vertical domain of this scene 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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
column
If there is a layout grid, use the domain for this
column in the grid for this scene subplot .
row
If there is a layout grid, use the domain for this row
in the grid for this scene subplot .
x
Sets the horizontal domain of this scene subplot (in
plot fraction).
y
Sets the vertical domain of this scene subplot (in plot
fraction).
"""
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.scene.Domain`
column
If there is a layout grid, use the domain for this
column in the grid for this scene subplot .
row
If there is a layout grid, use the domain for this row
in the grid for this scene subplot .
x
Sets the horizontal domain of this scene subplot (in
plot fraction).
y
Sets the vertical domain of this scene subplot (in plot
fraction).
Returns
-------
Domain
"""
super(Domain, self).__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.Domain
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.Domain`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("column", None)
_v = column if column is not None else _v
if _v is not None:
self["column"] = _v
_v = arg.pop("row", None)
_v = row if row is not None else _v
if _v is not None:
self["row"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or 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"]
)

View File

@@ -0,0 +1,227 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene.annotation"
_path_str = "layout.scene.annotation.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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.scene.annotation.Font`
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.annotation.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.annotation.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,276 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Hoverlabel(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene.annotation"
_path_str = "layout.scene.annotation.hoverlabel"
_valid_props = {"bgcolor", "bordercolor", "font"}
# bgcolor
# -------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bgcolor"]
@bgcolor.setter
def bgcolor(self, val):
self["bgcolor"] = val
# bordercolor
# -----------
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["bordercolor"]
@bordercolor.setter
def bordercolor(self, val):
self["bordercolor"] = val
# font
# ----
@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.scene.annotation.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constructor
Supported dict properties:
color
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
size
Returns
-------
plotly.graph_objs.layout.scene.annotation.hoverlabel.Font
"""
return self["font"]
@font.setter
def font(self, val):
self["font"] = val
# Self properties description
# ---------------------------
@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.scene.a
nnotation.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(Hoverlabel, self).__init__("hoverlabel")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.annotation.Hoverlabel
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("bgcolor", None)
_v = bgcolor if bgcolor is not None else _v
if _v is not None:
self["bgcolor"] = _v
_v = arg.pop("bordercolor", None)
_v = bordercolor if bordercolor is not None else _v
if _v is not None:
self["bordercolor"] = _v
_v = arg.pop("font", None)
_v = font if font is not None else _v
if _v is not None:
self["font"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,9 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._font import Font
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"])

View File

@@ -0,0 +1,228 @@
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene.annotation.hoverlabel"
_path_str = "layout.scene.annotation.hoverlabel.font"
_valid_props = {"color", "family", "size"}
# color
# -----
@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:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
Returns
-------
str
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
Returns
-------
str
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# size
# ----
@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
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
"""
def __init__(self, arg=None, color=None, family=None, size=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.scene.a
nnotation.hoverlabel.Font`
color
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
size
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.layout.scene.annotation.hoverlabel.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False

View File

@@ -0,0 +1,16 @@
import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._center import Center
from ._eye import Eye
from ._projection import Projection
from ._up import Up
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__,
[],
["._center.Center", "._eye.Eye", "._projection.Projection", "._up.Up"],
)

Some files were not shown because too many files have changed in this diff Show More