mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-07-01 22:13:01 +00:00
first commit
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if sys.version_info < (3, 7) or TYPE_CHECKING:
|
||||
from ._colorbar import ColorBar
|
||||
from ._contours import Contours
|
||||
from ._legendgrouptitle import Legendgrouptitle
|
||||
from ._line import Line
|
||||
from ._stream import Stream
|
||||
from . import colorbar
|
||||
from . import contours
|
||||
from . import legendgrouptitle
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".colorbar", ".contours", ".legendgrouptitle"],
|
||||
[
|
||||
"._colorbar.ColorBar",
|
||||
"._contours.Contours",
|
||||
"._legendgrouptitle.Legendgrouptitle",
|
||||
"._line.Line",
|
||||
"._stream.Stream",
|
||||
],
|
||||
)
|
2166
.venv/Lib/site-packages/plotly/graph_objs/contourcarpet/_colorbar.py
Normal file
2166
.venv/Lib/site-packages/plotly/graph_objs/contourcarpet/_colorbar.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,528 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Contours(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet"
|
||||
_path_str = "contourcarpet.contours"
|
||||
_valid_props = {
|
||||
"coloring",
|
||||
"end",
|
||||
"labelfont",
|
||||
"labelformat",
|
||||
"operation",
|
||||
"showlabels",
|
||||
"showlines",
|
||||
"size",
|
||||
"start",
|
||||
"type",
|
||||
"value",
|
||||
}
|
||||
|
||||
# coloring
|
||||
# --------
|
||||
@property
|
||||
def coloring(self):
|
||||
"""
|
||||
Determines the coloring method showing the contour values. If
|
||||
"fill", coloring is done evenly between each contour level If
|
||||
"lines", coloring is done on the contour lines. If "none", no
|
||||
coloring is applied on this trace.
|
||||
|
||||
The 'coloring' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['fill', 'lines', 'none']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["coloring"]
|
||||
|
||||
@coloring.setter
|
||||
def coloring(self, val):
|
||||
self["coloring"] = val
|
||||
|
||||
# end
|
||||
# ---
|
||||
@property
|
||||
def end(self):
|
||||
"""
|
||||
Sets the end contour level value. Must be more than
|
||||
`contours.start`
|
||||
|
||||
The 'end' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["end"]
|
||||
|
||||
@end.setter
|
||||
def end(self, val):
|
||||
self["end"] = val
|
||||
|
||||
# labelfont
|
||||
# ---------
|
||||
@property
|
||||
def labelfont(self):
|
||||
"""
|
||||
Sets the font used for labeling the contour levels. The default
|
||||
color comes from the lines, if shown. The default family and
|
||||
size come from `layout.font`.
|
||||
|
||||
The 'labelfont' property is an instance of Labelfont
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Labelfont 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.contourcarpet.contours.Labelfont
|
||||
"""
|
||||
return self["labelfont"]
|
||||
|
||||
@labelfont.setter
|
||||
def labelfont(self, val):
|
||||
self["labelfont"] = val
|
||||
|
||||
# labelformat
|
||||
# -----------
|
||||
@property
|
||||
def labelformat(self):
|
||||
"""
|
||||
Sets the contour label formatting rule using d3 formatting
|
||||
mini-languages which are very similar to those in Python. For
|
||||
numbers, see:
|
||||
https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
|
||||
|
||||
The 'labelformat' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["labelformat"]
|
||||
|
||||
@labelformat.setter
|
||||
def labelformat(self, val):
|
||||
self["labelformat"] = val
|
||||
|
||||
# operation
|
||||
# ---------
|
||||
@property
|
||||
def operation(self):
|
||||
"""
|
||||
Sets the constraint operation. "=" keeps regions equal to
|
||||
`value` "<" and "<=" keep regions less than `value` ">" and
|
||||
">=" keep regions greater than `value` "[]", "()", "[)", and
|
||||
"(]" keep regions inside `value[0]` to `value[1]` "][", ")(",
|
||||
"](", ")[" keep regions outside `value[0]` to value[1]` Open
|
||||
vs. closed intervals make no difference to constraint display,
|
||||
but all versions are allowed for consistency with filter
|
||||
transforms.
|
||||
|
||||
The 'operation' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][',
|
||||
')(', '](', ')[']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["operation"]
|
||||
|
||||
@operation.setter
|
||||
def operation(self, val):
|
||||
self["operation"] = val
|
||||
|
||||
# showlabels
|
||||
# ----------
|
||||
@property
|
||||
def showlabels(self):
|
||||
"""
|
||||
Determines whether to label the contour lines with their
|
||||
values.
|
||||
|
||||
The 'showlabels' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showlabels"]
|
||||
|
||||
@showlabels.setter
|
||||
def showlabels(self, val):
|
||||
self["showlabels"] = val
|
||||
|
||||
# showlines
|
||||
# ---------
|
||||
@property
|
||||
def showlines(self):
|
||||
"""
|
||||
Determines whether or not the contour lines are drawn. Has an
|
||||
effect only if `contours.coloring` is set to "fill".
|
||||
|
||||
The 'showlines' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showlines"]
|
||||
|
||||
@showlines.setter
|
||||
def showlines(self, val):
|
||||
self["showlines"] = val
|
||||
|
||||
# size
|
||||
# ----
|
||||
@property
|
||||
def size(self):
|
||||
"""
|
||||
Sets the step between each contour level. Must be positive.
|
||||
|
||||
The 'size' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["size"]
|
||||
|
||||
@size.setter
|
||||
def size(self, val):
|
||||
self["size"] = val
|
||||
|
||||
# start
|
||||
# -----
|
||||
@property
|
||||
def start(self):
|
||||
"""
|
||||
Sets the starting contour level value. Must be less than
|
||||
`contours.end`
|
||||
|
||||
The 'start' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["start"]
|
||||
|
||||
@start.setter
|
||||
def start(self, val):
|
||||
self["start"] = val
|
||||
|
||||
# type
|
||||
# ----
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
If `levels`, the data is represented as a contour plot with
|
||||
multiple levels displayed. If `constraint`, the data is
|
||||
represented as constraints with the invalid region shaded as
|
||||
specified by the `operation` and `value` parameters.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['levels', 'constraint']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
# value
|
||||
# -----
|
||||
@property
|
||||
def value(self):
|
||||
"""
|
||||
Sets the value or values of the constraint boundary. When
|
||||
`operation` is set to one of the comparison values
|
||||
(=,<,>=,>,<=) "value" is expected to be a number. When
|
||||
`operation` is set to one of the interval values
|
||||
([],(),[),(],][,)(,](,)[) "value" is expected to be an array of
|
||||
two numbers where the first is the lower bound and the second
|
||||
is the upper bound.
|
||||
|
||||
The 'value' property accepts values of any type
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["value"]
|
||||
|
||||
@value.setter
|
||||
def value(self, val):
|
||||
self["value"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
coloring
|
||||
Determines the coloring method showing the contour
|
||||
values. If "fill", coloring is done evenly between each
|
||||
contour level If "lines", coloring is done on the
|
||||
contour lines. If "none", no coloring is applied on
|
||||
this trace.
|
||||
end
|
||||
Sets the end contour level value. Must be more than
|
||||
`contours.start`
|
||||
labelfont
|
||||
Sets the font used for labeling the contour levels. The
|
||||
default color comes from the lines, if shown. The
|
||||
default family and size come from `layout.font`.
|
||||
labelformat
|
||||
Sets the contour label formatting rule using d3
|
||||
formatting mini-languages which are very similar to
|
||||
those in Python. For numbers, see:
|
||||
https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
|
||||
operation
|
||||
Sets the constraint operation. "=" keeps regions equal
|
||||
to `value` "<" and "<=" keep regions less than `value`
|
||||
">" and ">=" keep regions greater than `value` "[]",
|
||||
"()", "[)", and "(]" keep regions inside `value[0]` to
|
||||
`value[1]` "][", ")(", "](", ")[" keep regions outside
|
||||
`value[0]` to value[1]` Open vs. closed intervals make
|
||||
no difference to constraint display, but all versions
|
||||
are allowed for consistency with filter transforms.
|
||||
showlabels
|
||||
Determines whether to label the contour lines with
|
||||
their values.
|
||||
showlines
|
||||
Determines whether or not the contour lines are drawn.
|
||||
Has an effect only if `contours.coloring` is set to
|
||||
"fill".
|
||||
size
|
||||
Sets the step between each contour level. Must be
|
||||
positive.
|
||||
start
|
||||
Sets the starting contour level value. Must be less
|
||||
than `contours.end`
|
||||
type
|
||||
If `levels`, the data is represented as a contour plot
|
||||
with multiple levels displayed. If `constraint`, the
|
||||
data is represented as constraints with the invalid
|
||||
region shaded as specified by the `operation` and
|
||||
`value` parameters.
|
||||
value
|
||||
Sets the value or values of the constraint boundary.
|
||||
When `operation` is set to one of the comparison values
|
||||
(=,<,>=,>,<=) "value" is expected to be a number. When
|
||||
`operation` is set to one of the interval values
|
||||
([],(),[),(],][,)(,](,)[) "value" is expected to be an
|
||||
array of two numbers where the first is the lower bound
|
||||
and the second is the upper bound.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
coloring=None,
|
||||
end=None,
|
||||
labelfont=None,
|
||||
labelformat=None,
|
||||
operation=None,
|
||||
showlabels=None,
|
||||
showlines=None,
|
||||
size=None,
|
||||
start=None,
|
||||
type=None,
|
||||
value=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Contours object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.contourcarpet.Contours`
|
||||
coloring
|
||||
Determines the coloring method showing the contour
|
||||
values. If "fill", coloring is done evenly between each
|
||||
contour level If "lines", coloring is done on the
|
||||
contour lines. If "none", no coloring is applied on
|
||||
this trace.
|
||||
end
|
||||
Sets the end contour level value. Must be more than
|
||||
`contours.start`
|
||||
labelfont
|
||||
Sets the font used for labeling the contour levels. The
|
||||
default color comes from the lines, if shown. The
|
||||
default family and size come from `layout.font`.
|
||||
labelformat
|
||||
Sets the contour label formatting rule using d3
|
||||
formatting mini-languages which are very similar to
|
||||
those in Python. For numbers, see:
|
||||
https://github.com/d3/d3-format/tree/v1.4.5#d3-format.
|
||||
operation
|
||||
Sets the constraint operation. "=" keeps regions equal
|
||||
to `value` "<" and "<=" keep regions less than `value`
|
||||
">" and ">=" keep regions greater than `value` "[]",
|
||||
"()", "[)", and "(]" keep regions inside `value[0]` to
|
||||
`value[1]` "][", ")(", "](", ")[" keep regions outside
|
||||
`value[0]` to value[1]` Open vs. closed intervals make
|
||||
no difference to constraint display, but all versions
|
||||
are allowed for consistency with filter transforms.
|
||||
showlabels
|
||||
Determines whether to label the contour lines with
|
||||
their values.
|
||||
showlines
|
||||
Determines whether or not the contour lines are drawn.
|
||||
Has an effect only if `contours.coloring` is set to
|
||||
"fill".
|
||||
size
|
||||
Sets the step between each contour level. Must be
|
||||
positive.
|
||||
start
|
||||
Sets the starting contour level value. Must be less
|
||||
than `contours.end`
|
||||
type
|
||||
If `levels`, the data is represented as a contour plot
|
||||
with multiple levels displayed. If `constraint`, the
|
||||
data is represented as constraints with the invalid
|
||||
region shaded as specified by the `operation` and
|
||||
`value` parameters.
|
||||
value
|
||||
Sets the value or values of the constraint boundary.
|
||||
When `operation` is set to one of the comparison values
|
||||
(=,<,>=,>,<=) "value" is expected to be a number. When
|
||||
`operation` is set to one of the interval values
|
||||
([],(),[),(],][,)(,](,)[) "value" is expected to be an
|
||||
array of two numbers where the first is the lower bound
|
||||
and the second is the upper bound.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Contours
|
||||
"""
|
||||
super(Contours, self).__init__("contours")
|
||||
|
||||
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.contourcarpet.Contours
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.Contours`"""
|
||||
)
|
||||
|
||||
# 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("coloring", None)
|
||||
_v = coloring if coloring is not None else _v
|
||||
if _v is not None:
|
||||
self["coloring"] = _v
|
||||
_v = arg.pop("end", None)
|
||||
_v = end if end is not None else _v
|
||||
if _v is not None:
|
||||
self["end"] = _v
|
||||
_v = arg.pop("labelfont", None)
|
||||
_v = labelfont if labelfont is not None else _v
|
||||
if _v is not None:
|
||||
self["labelfont"] = _v
|
||||
_v = arg.pop("labelformat", None)
|
||||
_v = labelformat if labelformat is not None else _v
|
||||
if _v is not None:
|
||||
self["labelformat"] = _v
|
||||
_v = arg.pop("operation", None)
|
||||
_v = operation if operation is not None else _v
|
||||
if _v is not None:
|
||||
self["operation"] = _v
|
||||
_v = arg.pop("showlabels", None)
|
||||
_v = showlabels if showlabels is not None else _v
|
||||
if _v is not None:
|
||||
self["showlabels"] = _v
|
||||
_v = arg.pop("showlines", None)
|
||||
_v = showlines if showlines is not None else _v
|
||||
if _v is not None:
|
||||
self["showlines"] = _v
|
||||
_v = arg.pop("size", None)
|
||||
_v = size if size is not None else _v
|
||||
if _v is not None:
|
||||
self["size"] = _v
|
||||
_v = arg.pop("start", None)
|
||||
_v = start if start is not None else _v
|
||||
if _v is not None:
|
||||
self["start"] = _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("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
|
@ -0,0 +1,154 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Legendgrouptitle(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet"
|
||||
_path_str = "contourcarpet.legendgrouptitle"
|
||||
_valid_props = {"font", "text"}
|
||||
|
||||
# font
|
||||
# ----
|
||||
@property
|
||||
def font(self):
|
||||
"""
|
||||
Sets this legend group's title font.
|
||||
|
||||
The 'font' property is an instance of Font
|
||||
that may be specified as:
|
||||
- An instance of :class:`plotly.graph_objs.contourcarpet.legendgrouptitle.Font`
|
||||
- A dict of string/value properties that will be passed
|
||||
to the Font constructor
|
||||
|
||||
Supported dict properties:
|
||||
|
||||
color
|
||||
|
||||
family
|
||||
HTML font family - the typeface that will be
|
||||
applied by the web browser. The web browser
|
||||
will only be able to apply a font if it is
|
||||
available on the system which it operates.
|
||||
Provide multiple font families, separated by
|
||||
commas, to indicate the preference in which to
|
||||
apply fonts if they aren't available on the
|
||||
system. The Chart Studio Cloud (at
|
||||
https://chart-studio.plotly.com or on-premise)
|
||||
generates images on a server, where only a
|
||||
select number of fonts are installed and
|
||||
supported. These include "Arial", "Balto",
|
||||
"Courier New", "Droid Sans",, "Droid Serif",
|
||||
"Droid Sans Mono", "Gravitas One", "Old
|
||||
Standard TT", "Open Sans", "Overpass", "PT Sans
|
||||
Narrow", "Raleway", "Times New Roman".
|
||||
size
|
||||
|
||||
Returns
|
||||
-------
|
||||
plotly.graph_objs.contourcarpet.legendgrouptitle.Font
|
||||
"""
|
||||
return self["font"]
|
||||
|
||||
@font.setter
|
||||
def font(self, val):
|
||||
self["font"] = val
|
||||
|
||||
# text
|
||||
# ----
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
Sets the title of the legend group.
|
||||
|
||||
The 'text' property is a string and must be specified as:
|
||||
- A string
|
||||
- A number that will be converted to a string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["text"]
|
||||
|
||||
@text.setter
|
||||
def text(self, val):
|
||||
self["text"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
font
|
||||
Sets this legend group's title font.
|
||||
text
|
||||
Sets the title of the legend group.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, font=None, text=None, **kwargs):
|
||||
"""
|
||||
Construct a new Legendgrouptitle object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.
|
||||
Legendgrouptitle`
|
||||
font
|
||||
Sets this legend group's title font.
|
||||
text
|
||||
Sets the title of the legend group.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Legendgrouptitle
|
||||
"""
|
||||
super(Legendgrouptitle, self).__init__("legendgrouptitle")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.contourcarpet.Legendgrouptitle
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.Legendgrouptitle`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("font", None)
|
||||
_v = font if font is not None else _v
|
||||
if _v is not None:
|
||||
self["font"] = _v
|
||||
_v = arg.pop("text", None)
|
||||
_v = text if text is not None else _v
|
||||
if _v is not None:
|
||||
self["text"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
248
.venv/Lib/site-packages/plotly/graph_objs/contourcarpet/_line.py
Normal file
248
.venv/Lib/site-packages/plotly/graph_objs/contourcarpet/_line.py
Normal file
@ -0,0 +1,248 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Line(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet"
|
||||
_path_str = "contourcarpet.line"
|
||||
_valid_props = {"color", "dash", "smoothing", "width"}
|
||||
|
||||
# color
|
||||
# -----
|
||||
@property
|
||||
def color(self):
|
||||
"""
|
||||
Sets the color of the contour level. Has no effect if
|
||||
`contours.coloring` is set to "lines".
|
||||
|
||||
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
|
||||
|
||||
# smoothing
|
||||
# ---------
|
||||
@property
|
||||
def smoothing(self):
|
||||
"""
|
||||
Sets the amount of smoothing for the contour lines, where 0
|
||||
corresponds to no smoothing.
|
||||
|
||||
The 'smoothing' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1.3]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["smoothing"]
|
||||
|
||||
@smoothing.setter
|
||||
def smoothing(self, val):
|
||||
self["smoothing"] = val
|
||||
|
||||
# width
|
||||
# -----
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Sets the contour line width in (in px) Defaults to 0.5 when
|
||||
`contours.type` is "levels". Defaults to 2 when `contour.type`
|
||||
is "constraint".
|
||||
|
||||
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 color of the contour level. Has no effect if
|
||||
`contours.coloring` is set to "lines".
|
||||
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").
|
||||
smoothing
|
||||
Sets the amount of smoothing for the contour lines,
|
||||
where 0 corresponds to no smoothing.
|
||||
width
|
||||
Sets the contour line width in (in px) Defaults to 0.5
|
||||
when `contours.type` is "levels". Defaults to 2 when
|
||||
`contour.type` is "constraint".
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, arg=None, color=None, dash=None, smoothing=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.contourcarpet.Line`
|
||||
color
|
||||
Sets the color of the contour level. Has no effect if
|
||||
`contours.coloring` is set to "lines".
|
||||
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").
|
||||
smoothing
|
||||
Sets the amount of smoothing for the contour lines,
|
||||
where 0 corresponds to no smoothing.
|
||||
width
|
||||
Sets the contour line width in (in px) Defaults to 0.5
|
||||
when `contours.type` is "levels". Defaults to 2 when
|
||||
`contour.type` is "constraint".
|
||||
|
||||
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.contourcarpet.Line
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.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("smoothing", None)
|
||||
_v = smoothing if smoothing is not None else _v
|
||||
if _v is not None:
|
||||
self["smoothing"] = _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
|
@ -0,0 +1,141 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Stream(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet"
|
||||
_path_str = "contourcarpet.stream"
|
||||
_valid_props = {"maxpoints", "token"}
|
||||
|
||||
# maxpoints
|
||||
# ---------
|
||||
@property
|
||||
def maxpoints(self):
|
||||
"""
|
||||
Sets the maximum number of points to keep on the plots from an
|
||||
incoming stream. If `maxpoints` is set to 50, only the newest
|
||||
50 points will be displayed on the plot.
|
||||
|
||||
The 'maxpoints' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 10000]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["maxpoints"]
|
||||
|
||||
@maxpoints.setter
|
||||
def maxpoints(self, val):
|
||||
self["maxpoints"] = val
|
||||
|
||||
# token
|
||||
# -----
|
||||
@property
|
||||
def token(self):
|
||||
"""
|
||||
The stream id number links a data trace on a plot with a
|
||||
stream. See https://chart-studio.plotly.com/settings for more
|
||||
details.
|
||||
|
||||
The 'token' property is a string and must be specified as:
|
||||
- A non-empty string
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["token"]
|
||||
|
||||
@token.setter
|
||||
def token(self, val):
|
||||
self["token"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
maxpoints
|
||||
Sets the maximum number of points to keep on the plots
|
||||
from an incoming stream. If `maxpoints` is set to 50,
|
||||
only the newest 50 points will be displayed on the
|
||||
plot.
|
||||
token
|
||||
The stream id number links a data trace on a plot with
|
||||
a stream. See https://chart-studio.plotly.com/settings
|
||||
for more details.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, maxpoints=None, token=None, **kwargs):
|
||||
"""
|
||||
Construct a new Stream object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.contourcarpet.Stream`
|
||||
maxpoints
|
||||
Sets the maximum number of points to keep on the plots
|
||||
from an incoming stream. If `maxpoints` is set to 50,
|
||||
only the newest 50 points will be displayed on the
|
||||
plot.
|
||||
token
|
||||
The stream id number links a data trace on a plot with
|
||||
a stream. See https://chart-studio.plotly.com/settings
|
||||
for more details.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Stream
|
||||
"""
|
||||
super(Stream, self).__init__("stream")
|
||||
|
||||
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.contourcarpet.Stream
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.Stream`"""
|
||||
)
|
||||
|
||||
# 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("maxpoints", None)
|
||||
_v = maxpoints if maxpoints is not None else _v
|
||||
if _v is not None:
|
||||
self["maxpoints"] = _v
|
||||
_v = arg.pop("token", None)
|
||||
_v = token if token is not None else _v
|
||||
if _v is not None:
|
||||
self["token"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
@ -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"],
|
||||
)
|
@ -0,0 +1,227 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Tickfont(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.colorbar"
|
||||
_path_str = "contourcarpet.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.contourcarpet.
|
||||
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.contourcarpet.colorbar.Tickfont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.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
|
@ -0,0 +1,283 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Tickformatstop(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.colorbar"
|
||||
_path_str = "contourcarpet.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.contourcarpet.
|
||||
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.contourcarpet.colorbar.Tickformatstop
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.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
|
@ -0,0 +1,210 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Title(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.colorbar"
|
||||
_path_str = "contourcarpet.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.contourcarpet.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.contourcarpet.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.contourcarpet.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.contourcarpet.colorbar.Title
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.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
|
@ -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"])
|
@ -0,0 +1,228 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.colorbar.title"
|
||||
_path_str = "contourcarpet.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.contourcarpet.
|
||||
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.contourcarpet.colorbar.title.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.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
|
@ -0,0 +1,11 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if sys.version_info < (3, 7) or TYPE_CHECKING:
|
||||
from ._labelfont import Labelfont
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._labelfont.Labelfont"]
|
||||
)
|
@ -0,0 +1,229 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Labelfont(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.contours"
|
||||
_path_str = "contourcarpet.contours.labelfont"
|
||||
_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 Labelfont object
|
||||
|
||||
Sets the font used for labeling the contour levels. The default
|
||||
color comes from the lines, if shown. The default family and
|
||||
size come from `layout.font`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.
|
||||
contours.Labelfont`
|
||||
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
|
||||
-------
|
||||
Labelfont
|
||||
"""
|
||||
super(Labelfont, self).__init__("labelfont")
|
||||
|
||||
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.contourcarpet.contours.Labelfont
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`"""
|
||||
)
|
||||
|
||||
# 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
|
@ -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"])
|
@ -0,0 +1,227 @@
|
||||
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Font(_BaseTraceHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "contourcarpet.legendgrouptitle"
|
||||
_path_str = "contourcarpet.legendgrouptitle.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 group's title font.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.
|
||||
legendgrouptitle.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.contourcarpet.legendgrouptitle.Font
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.contourcarpet.legendgrouptitle.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
|
Reference in New Issue
Block a user