element.
+ animation_opts: dict or None (default None)
+ dict of custom animation parameters to be passed to the function
+ Plotly.animate in Plotly.js. See
+ https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
+ for available options. Has no effect if the figure does not contain
+ frames, or auto_play is False.
+ default_width, default_height: number or str (default '100%')
+ The default figure width/height to use if the provided figure does not
+ specify its own layout.width/layout.height property. May be
+ specified in pixels as an integer (e.g. 500), or as a css width style
+ string (e.g. '500px', '100%').
+ validate: bool (default True)
+ True if the figure should be validated before being converted to
+ JSON, False otherwise.
+ Returns
+ -------
+ str
+ Representation of figure as an HTML div string
+ """
import plotly.io as pio
return pio.to_html(self, *args, **kwargs)
def write_html(self, *args, **kwargs):
+ """
+ Write a figure to an HTML file representation
+
+ Parameters
+ ----------
+ file: str or writeable
+ A string representing a local file path or a writeable object
+ (e.g. an open file descriptor)
+ config: dict or None (default None)
+ Plotly.js figure config options
+ auto_play: bool (default=True)
+ Whether to automatically start the animation sequence on page load
+ if the figure contains frames. Has no effect if the figure does not
+ contain frames.
+ include_plotlyjs: bool or string (default True)
+ Specifies how the plotly.js library is included/loaded in the output
+ div string.
+
+ If True, a script tag containing the plotly.js source code (~3MB)
+ is included in the output. HTML files generated with this option are
+ fully self-contained and can be used offline.
+
+ If 'cdn', a script tag that references the plotly.js CDN is included
+ in the output. HTML files generated with this option are about 3MB
+ smaller than those generated with include_plotlyjs=True, but they
+ require an active internet connection in order to load the plotly.js
+ library.
+
+ If 'directory', a script tag is included that references an external
+ plotly.min.js bundle that is assumed to reside in the same
+ directory as the HTML file. If `file` is a string to a local file path
+ and `full_html` is True then
+
+ If 'directory', a script tag is included that references an external
+ plotly.min.js bundle that is assumed to reside in the same
+ directory as the HTML file. If `file` is a string to a local file
+ path and `full_html` is True, then the plotly.min.js bundle is copied
+ into the directory of the resulting HTML file. If a file named
+ plotly.min.js already exists in the output directory then this file
+ is left unmodified and no copy is performed. HTML files generated
+ with this option can be used offline, but they require a copy of
+ the plotly.min.js bundle in the same directory. This option is
+ useful when many figures will be saved as HTML files in the same
+ directory because the plotly.js source code will be included only
+ once per output directory, rather than once per output file.
+
+ If 'require', Plotly.js is loaded using require.js. This option
+ assumes that require.js is globally available and that it has been
+ globally configured to know how to find Plotly.js as 'plotly'.
+ This option is not advised when full_html=True as it will result
+ in a non-functional html file.
+
+ If a string that ends in '.js', a script tag is included that
+ references the specified path. This approach can be used to point
+ the resulting HTML file to an alternative CDN or local bundle.
+
+ If False, no script tag referencing plotly.js is included. This is
+ useful when the resulting div string will be placed inside an HTML
+ document that already loads plotly.js. This option is not advised
+ when full_html=True as it will result in a non-functional html file.
+
+ include_mathjax: bool or string (default False)
+ Specifies how the MathJax.js library is included in the output html
+ div string. MathJax is required in order to display labels
+ with LaTeX typesetting.
+
+ If False, no script tag referencing MathJax.js will be included in the
+ output.
+
+ If 'cdn', a script tag that references a MathJax CDN location will be
+ included in the output. HTML div strings generated with this option
+ will be able to display LaTeX typesetting as long as internet access
+ is available.
+
+ If a string that ends in '.js', a script tag is included that
+ references the specified path. This approach can be used to point the
+ resulting HTML div string to an alternative CDN.
+ post_script: str or list or None (default None)
+ JavaScript snippet(s) to be included in the resulting div just after
+ plot creation. The string(s) may include '{plot_id}' placeholders
+ that will then be replaced by the `id` of the div element that the
+ plotly.js figure is associated with. One application for this script
+ is to install custom plotly.js event handlers.
+ full_html: bool (default True)
+ If True, produce a string containing a complete HTML document
+ starting with an tag. If False, produce a string containing
+ a single
element.
+ animation_opts: dict or None (default None)
+ dict of custom animation parameters to be passed to the function
+ Plotly.animate in Plotly.js. See
+ https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
+ for available options. Has no effect if the figure does not contain
+ frames, or auto_play is False.
+ default_width, default_height: number or str (default '100%')
+ The default figure width/height to use if the provided figure does not
+ specify its own layout.width/layout.height property. May be
+ specified in pixels as an integer (e.g. 500), or as a css width style
+ string (e.g. '500px', '100%').
+ validate: bool (default True)
+ True if the figure should be validated before being converted to
+ JSON, False otherwise.
+ auto_open: bool (default True
+ If True, open the saved file in a web browser after saving.
+ This argument only applies if `full_html` is True.
+ Returns
+ -------
+ str
+ Representation of figure as an HTML div string
+ """
import plotly.io as pio
return pio.write_html(self, *args, **kwargs)
def to_image(self, *args, **kwargs):
+ """
+ Convert a figure to a static image bytes string
+
+ Parameters
+ ----------
+ format: str or None
+ The desired image format. One of
+ - 'png'
+ - 'jpg' or 'jpeg'
+ - 'webp'
+ - 'svg'
+ - 'pdf'
+ - 'eps' (Requires the poppler library to be installed)
+
+ If not specified, will default to `plotly.io.config.default_format`
+
+ width: int or None
+ The width of the exported image in layout pixels. If the `scale`
+ property is 1.0, this will also be the width of the exported image
+ in physical pixels.
+
+ If not specified, will default to `plotly.io.config.default_width`
+
+ height: int or None
+ The height of the exported image in layout pixels. If the `scale`
+ property is 1.0, this will also be the height of the exported image
+ in physical pixels.
+
+ If not specified, will default to `plotly.io.config.default_height`
+
+ scale: int or float or None
+ The scale factor to use when exporting the figure. A scale factor
+ larger than 1.0 will increase the image resolution with respect
+ to the figure's layout pixel dimensions. Whereas as scale factor of
+ less than 1.0 will decrease the image resolution.
+
+ If not specified, will default to `plotly.io.config.default_scale`
+
+ validate: bool
+ True if the figure should be validated before being converted to
+ an image, False otherwise.
+
+ Returns
+ -------
+ bytes
+ The image data
+ """
import plotly.io as pio
return pio.to_image(self, *args, **kwargs)
def write_image(self, *args, **kwargs):
+ """
+ Convert a figure to a static image and write it to a file or writeable
+ object
+
+ Parameters
+ ----------
+ file: str or writeable
+ A string representing a local file path or a writeable object
+ (e.g. an open file descriptor)
+
+ format: str or None
+ The desired image format. One of
+ - 'png'
+ - 'jpg' or 'jpeg'
+ - 'webp'
+ - 'svg'
+ - 'pdf'
+ - 'eps' (Requires the poppler library to be installed)
+
+ If not specified and `file` is a string then this will default to the
+ file extension. If not specified and `file` is not a string then this
+ will default to `plotly.io.config.default_format`
+
+ width: int or None
+ The width of the exported image in layout pixels. If the `scale`
+ property is 1.0, this will also be the width of the exported image
+ in physical pixels.
+
+ If not specified, will default to `plotly.io.config.default_width`
+
+ height: int or None
+ The height of the exported image in layout pixels. If the `scale`
+ property is 1.0, this will also be the height of the exported image
+ in physical pixels.
+
+ If not specified, will default to `plotly.io.config.default_height`
+
+ scale: int or float or None
+ The scale factor to use when exporting the figure. A scale factor
+ larger than 1.0 will increase the image resolution with respect
+ to the figure's layout pixel dimensions. Whereas as scale factor of
+ less than 1.0 will decrease the image resolution.
+
+ If not specified, will default to `plotly.io.config.default_scale`
+
+ validate: bool
+ True if the figure should be validated before being converted to
+ an image, False otherwise.
+
+ Returns
+ -------
+ None
+ """
import plotly.io as pio
return pio.write_image(self, *args, **kwargs)
@@ -2850,6 +3202,10 @@ def _perform_update(plotly_obj, update_obj, overwrite=False):
:class:`BasePlotlyType`, ``update_obj`` should be a tuple or list
of dicts
"""
+ from _plotly_utils.basevalidators import (
+ CompoundValidator,
+ CompoundArrayValidator,
+ )
if update_obj is None:
# Nothing to do
@@ -2963,6 +3319,10 @@ class BasePlotlyType(object):
# of relative path to new property (e.g. ('title', 'font')
_mapped_properties = {}
+ _parent_path_str = ""
+ _path_str = ""
+ _valid_props = set()
+
def __init__(self, plotly_name, **kwargs):
"""
Construct a new BasePlotlyType
@@ -2989,10 +3349,6 @@ def __init__(self, plotly_name, **kwargs):
# Initialize properties
# ---------------------
- # ### _validators ###
- # A dict from property names to property validators
- self._validators = {}
-
# ### _compound_props ###
# A dict from compound property names to compound objects
self._compound_props = {}
@@ -3019,6 +3375,47 @@ def __init__(self, plotly_name, **kwargs):
# properties is modified
self._change_callbacks = {}
+ # ### Backing property for backward compatible _validator property ##
+ self.__validators = None
+
+ def _get_validator(self, prop):
+ from .validator_cache import ValidatorCache
+
+ return ValidatorCache.get_validator(self._path_str, prop)
+
+ @property
+ def _validators(self):
+ """
+ Validators used to be stored in a private _validators property. This was
+ eliminated when we switched to building validators on demand using the
+ _get_validator method.
+
+ This property returns a simple object that
+
+ Returns
+ -------
+ dict-like interface for accessing the object's validators
+ """
+ obj = self
+ if self.__validators is None:
+
+ class ValidatorCompat(object):
+ def __getitem__(self, item):
+ return obj._get_validator(item)
+
+ def __contains__(self, item):
+ return obj.__contains__(item)
+
+ def __iter__(self):
+ return iter(obj)
+
+ def items(self):
+ return [(k, self[k]) for k in self]
+
+ self.__validators = ValidatorCompat()
+
+ return self.__validators
+
def _process_kwargs(self, **kwargs):
"""
Process any extra kwargs that are not predefined as constructor params
@@ -3028,6 +3425,9 @@ def _process_kwargs(self, **kwargs):
if k in self:
# e.g. underscore kwargs like marker_line_color
self[k] = v
+ elif not validate._should_validate:
+ # Set extra property as-is
+ self[k] = v
else:
invalid_kwargs[k] = v
@@ -3045,30 +3445,6 @@ def plotly_name(self):
"""
return self._plotly_name
- @property
- def _parent_path_str(self):
- """
- dot-separated path string to this object's parent.
-
- Returns
- -------
- str
-
- Examples
- --------
-
- >>> import plotly.graph_objs as go
- >>> go.Layout()._parent_path_str
- ''
-
- >>> go.layout.XAxis()._parent_path_str
- 'layout'
-
- >>> go.layout.xaxis.rangeselector.Button()._parent_path_str
- 'layout.xaxis.rangeselector'
- """
- raise NotImplementedError
-
@property
def _prop_descriptions(self):
"""
@@ -3122,21 +3498,30 @@ def _get_child_props(self, child):
return None
else:
# ### Child a compound property ###
- if child.plotly_name in self._compound_props:
- return self._props.get(child.plotly_name, None)
+ if child.plotly_name in self:
+ from _plotly_utils.basevalidators import (
+ CompoundValidator,
+ CompoundArrayValidator,
+ )
- # ### Child an element of a compound array property ###
- elif child.plotly_name in self._compound_array_props:
- children = self._compound_array_props[child.plotly_name]
- child_ind = BaseFigure._index_is(children, child)
- assert child_ind is not None
+ validator = self._get_validator(child.plotly_name)
- children_props = self._props.get(child.plotly_name, None)
- return (
- children_props[child_ind]
- if children_props is not None and len(children_props) > child_ind
- else None
- )
+ if isinstance(validator, CompoundValidator):
+ return self._props.get(child.plotly_name, None)
+
+ # ### Child an element of a compound array property ###
+ elif isinstance(validator, CompoundArrayValidator):
+ children = self[child.plotly_name]
+ child_ind = BaseFigure._index_is(children, child)
+ assert child_ind is not None
+
+ children_props = self._props.get(child.plotly_name, None)
+ return (
+ children_props[child_ind]
+ if children_props is not None
+ and len(children_props) > child_ind
+ else None
+ )
# ### Invalid child ###
else:
@@ -3282,7 +3667,7 @@ def _get_prop_validator(self, prop):
# Return validator
# ----------------
- return plotly_obj._validators[prop]
+ return plotly_obj._get_validator(prop)
@property
def parent(self):
@@ -3344,6 +3729,11 @@ def __getitem__(self, prop):
-------
Any
"""
+ from _plotly_utils.basevalidators import (
+ CompoundValidator,
+ CompoundArrayValidator,
+ BaseDataValidator,
+ )
# Normalize prop
# --------------
@@ -3361,13 +3751,33 @@ def __getitem__(self, prop):
if len(prop) == 1:
# Unwrap scalar tuple
prop = prop[0]
- if prop not in self._validators:
+ if prop not in self._valid_props:
raise KeyError(prop)
- validator = self._validators[prop]
- if prop in self._compound_props:
+ validator = self._get_validator(prop)
+
+ if isinstance(validator, CompoundValidator):
+ if self._compound_props.get(prop, None) is None:
+ # Init compound objects
+ self._compound_props[prop] = validator.data_class(
+ _parent=self, plotly_name=prop
+ )
+ # Update plotly_name value in case the validator applies
+ # non-standard name (e.g. imagedefaults instead of image)
+ self._compound_props[prop]._plotly_name = prop
+
return validator.present(self._compound_props[prop])
- elif prop in self._compound_array_props:
+ elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
+ if self._compound_array_props.get(prop, None) is None:
+ # Init list of compound objects
+ if self._props is not None:
+ self._compound_array_props[prop] = [
+ validator.data_class(_parent=self)
+ for _ in self._props.get(prop, [])
+ ]
+ else:
+ self._compound_array_props[prop] = []
+
return validator.present(self._compound_array_props[prop])
elif self._props is not None and prop in self._props:
return validator.present(self._props[prop])
@@ -3422,7 +3832,7 @@ def __contains__(self, prop):
else:
return False
else:
- if obj is not None and p in obj._validators:
+ if obj is not None and p in obj._valid_props:
obj = obj[p]
else:
return False
@@ -3445,6 +3855,11 @@ def __setitem__(self, prop, value):
-------
None
"""
+ from _plotly_utils.basevalidators import (
+ CompoundValidator,
+ CompoundArrayValidator,
+ BaseDataValidator,
+ )
# Normalize prop
# --------------
@@ -3470,24 +3885,49 @@ def __setitem__(self, prop, value):
# ### Unwrap scalar tuple ###
prop = prop[0]
- # ### Validate prop ###
- if prop not in self._validators:
- self._raise_on_invalid_property_error(prop)
+ if validate._should_validate:
+ if prop not in self._valid_props:
+ self._raise_on_invalid_property_error(prop)
- # ### Get validator for this property ###
- validator = self._validators[prop]
+ # ### Get validator for this property ###
+ validator = self._get_validator(prop)
- # ### Handle compound property ###
- if isinstance(validator, CompoundValidator):
- self._set_compound_prop(prop, value)
+ # ### Handle compound property ###
+ if isinstance(validator, CompoundValidator):
+ self._set_compound_prop(prop, value)
- # ### Handle compound array property ###
- elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
- self._set_array_prop(prop, value)
+ # ### Handle compound array property ###
+ elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)):
+ self._set_array_prop(prop, value)
- # ### Handle simple property ###
+ # ### Handle simple property ###
+ else:
+ self._set_prop(prop, value)
else:
- self._set_prop(prop, value)
+ # Make sure properties dict is initialized
+ self._init_props()
+
+ if isinstance(value, BasePlotlyType):
+ # Extract json from graph objects
+ value = value.to_plotly_json()
+
+ # Check for list/tuple of graph objects
+ if (
+ isinstance(value, (list, tuple))
+ and value
+ and isinstance(value[0], BasePlotlyType)
+ ):
+ value = [
+ v.to_plotly_json() if isinstance(v, BasePlotlyType) else v
+ for v in value
+ ]
+
+ self._props[prop] = value
+
+ # Remove any already constructed graph object so that it will be
+ # reconstructed on property access
+ self._compound_props.pop(prop, None)
+ self._compound_array_props.pop(prop, None)
# Handle non-scalar case
# ----------------------
@@ -3511,7 +3951,7 @@ def __setattr__(self, prop, value):
-------
None
"""
- if prop.startswith("_") or hasattr(self, prop) or prop in self._validators:
+ if prop.startswith("_") or hasattr(self, prop) or prop in self._valid_props:
# Let known properties and private properties through
super(BasePlotlyType, self).__setattr__(prop, value)
else:
@@ -3522,7 +3962,7 @@ def __iter__(self):
"""
Return an iterator over the object's properties
"""
- res = list(self._validators.keys())
+ res = list(self._valid_props)
for prop in self._mapped_properties:
res.append(prop)
return iter(res)
@@ -3575,6 +4015,8 @@ def _build_repr_for_class(props, class_name, parent_path_str=None):
str
The representation string
"""
+ from plotly.utils import ElidedPrettyPrinter
+
if parent_path_str:
class_name = parent_path_str + "." + class_name
@@ -3597,6 +4039,7 @@ def __repr__(self):
Customize object representation when displayed in the
terminal/notebook
"""
+ from _plotly_utils.basevalidators import LiteralValidator
# Get all properties
props = self._props if self._props is not None else {}
@@ -3605,8 +4048,8 @@ def __repr__(self):
props = {
p: v
for p, v in props.items()
- if p in self._validators
- and not isinstance(self._validators[p], LiteralValidator)
+ if p in self._valid_props
+ and not isinstance(self._get_validator(p), LiteralValidator)
}
# Elide template
@@ -3767,7 +4210,8 @@ def _set_prop(self, prop, val):
# Import value
# ------------
- validator = self._validators.get(prop)
+ validator = self._get_validator(prop)
+
try:
val = validator.validate_coerce(val)
except ValueError as err:
@@ -3832,7 +4276,7 @@ def _set_compound_prop(self, prop, val):
# Import value
# ------------
- validator = self._validators.get(prop)
+ validator = self._get_validator(prop)
val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
# Save deep copies of current and new states
@@ -3906,7 +4350,7 @@ def _set_array_prop(self, prop, val):
# Import value
# ------------
- validator = self._validators.get(prop)
+ validator = self._get_validator(prop)
val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
# Save deep copies of current and new states
@@ -4179,7 +4623,7 @@ def _vals_equal(v1, v2):
bool
True if v1 and v2 are equal, False otherwise
"""
- np = get_module("numpy")
+ np = get_module("numpy", should_load=False)
if np is not None and (
isinstance(v1, np.ndarray) or isinstance(v2, np.ndarray)
):
@@ -4331,10 +4775,8 @@ def _set_subplotid_prop(self, prop, value):
# Construct and add validator
# ---------------------------
- if prop not in self._validators:
- validator_class = self._subplotid_validators[subplot_prop]
- validator = validator_class(plotly_name=prop)
- self._validators[prop] = validator
+ if prop not in self._valid_props:
+ self._valid_props.add(prop)
# Import value
# ------------
@@ -4395,7 +4837,7 @@ def __getattr__(self, prop):
"""
prop = self._strip_subplot_suffix_of_1(prop)
if prop != "_subplotid_props" and prop in self._subplotid_props:
- validator = self._validators[prop]
+ validator = self._get_validator(prop)
return validator.present(self._compound_props[prop])
else:
return super(BaseLayoutHierarchyType, self).__getattribute__(prop)
diff --git a/packages/python/plotly/plotly/graph_objects.py b/packages/python/plotly/plotly/graph_objects.py
deleted file mode 100644
index c63c2a376d2..00000000000
--- a/packages/python/plotly/plotly/graph_objects.py
+++ /dev/null
@@ -1,128 +0,0 @@
-from __future__ import absolute_import
-from plotly.graph_objs import *
-
-__all__ = [
- "AngularAxis",
- "Annotation",
- "Annotations",
- "Area",
- "Bar",
- "Barpolar",
- "Box",
- "Candlestick",
- "Carpet",
- "Choropleth",
- "Choroplethmapbox",
- "ColorBar",
- "Cone",
- "Contour",
- "Contourcarpet",
- "Contours",
- "Data",
- "Densitymapbox",
- "ErrorX",
- "ErrorY",
- "ErrorZ",
- "Figure",
- "Font",
- "Frame",
- "Frames",
- "Funnel",
- "Funnelarea",
- "Heatmap",
- "Heatmapgl",
- "Histogram",
- "Histogram2d",
- "Histogram2dContour",
- "Histogram2dcontour",
- "Image",
- "Indicator",
- "Isosurface",
- "Layout",
- "Legend",
- "Line",
- "Margin",
- "Marker",
- "Mesh3d",
- "Ohlc",
- "Parcats",
- "Parcoords",
- "Pie",
- "Pointcloud",
- "RadialAxis",
- "Sankey",
- "Scatter",
- "Scatter3d",
- "Scattercarpet",
- "Scattergeo",
- "Scattergl",
- "Scattermapbox",
- "Scatterpolar",
- "Scatterpolargl",
- "Scatterternary",
- "Scene",
- "Splom",
- "Stream",
- "Streamtube",
- "Sunburst",
- "Surface",
- "Table",
- "Trace",
- "Treemap",
- "Violin",
- "Volume",
- "Waterfall",
- "XAxis",
- "XBins",
- "YAxis",
- "YBins",
- "ZAxis",
- "area",
- "bar",
- "barpolar",
- "box",
- "candlestick",
- "carpet",
- "choropleth",
- "choroplethmapbox",
- "cone",
- "contour",
- "contourcarpet",
- "densitymapbox",
- "funnel",
- "funnelarea",
- "heatmap",
- "heatmapgl",
- "histogram",
- "histogram2d",
- "histogram2dcontour",
- "image",
- "indicator",
- "isosurface",
- "layout",
- "mesh3d",
- "ohlc",
- "parcats",
- "parcoords",
- "pie",
- "pointcloud",
- "sankey",
- "scatter",
- "scatter3d",
- "scattercarpet",
- "scattergeo",
- "scattergl",
- "scattermapbox",
- "scatterpolar",
- "scatterpolargl",
- "scatterternary",
- "splom",
- "streamtube",
- "sunburst",
- "surface",
- "table",
- "treemap",
- "violin",
- "volume",
- "waterfall",
-]
diff --git a/packages/python/plotly/plotly/graph_objects/__init__.py b/packages/python/plotly/plotly/graph_objects/__init__.py
new file mode 100644
index 00000000000..6935730d4c6
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objects/__init__.py
@@ -0,0 +1,291 @@
+import sys
+
+if sys.version_info < (3, 7):
+ from ..graph_objs import Waterfall
+ from ..graph_objs import Volume
+ from ..graph_objs import Violin
+ from ..graph_objs import Treemap
+ from ..graph_objs import Table
+ from ..graph_objs import Surface
+ from ..graph_objs import Sunburst
+ from ..graph_objs import Streamtube
+ from ..graph_objs import Splom
+ from ..graph_objs import Scatterternary
+ from ..graph_objs import Scatterpolargl
+ from ..graph_objs import Scatterpolar
+ from ..graph_objs import Scattermapbox
+ from ..graph_objs import Scattergl
+ from ..graph_objs import Scattergeo
+ from ..graph_objs import Scattercarpet
+ from ..graph_objs import Scatter3d
+ from ..graph_objs import Scatter
+ from ..graph_objs import Sankey
+ from ..graph_objs import Pointcloud
+ from ..graph_objs import Pie
+ from ..graph_objs import Parcoords
+ from ..graph_objs import Parcats
+ from ..graph_objs import Ohlc
+ from ..graph_objs import Mesh3d
+ from ..graph_objs import Isosurface
+ from ..graph_objs import Indicator
+ from ..graph_objs import Image
+ from ..graph_objs import Histogram2dContour
+ from ..graph_objs import Histogram2d
+ from ..graph_objs import Histogram
+ from ..graph_objs import Heatmapgl
+ from ..graph_objs import Heatmap
+ from ..graph_objs import Funnelarea
+ from ..graph_objs import Funnel
+ from ..graph_objs import Densitymapbox
+ from ..graph_objs import Contourcarpet
+ from ..graph_objs import Contour
+ from ..graph_objs import Cone
+ from ..graph_objs import Choroplethmapbox
+ from ..graph_objs import Choropleth
+ from ..graph_objs import Carpet
+ from ..graph_objs import Candlestick
+ from ..graph_objs import Box
+ from ..graph_objs import Barpolar
+ from ..graph_objs import Bar
+ from ..graph_objs import Area
+ from ..graph_objs import Layout
+ from ..graph_objs import Frame
+ from ..graph_objs import Figure
+ from ..graph_objs import Data
+ from ..graph_objs import Annotations
+ from ..graph_objs import Frames
+ from ..graph_objs import AngularAxis
+ from ..graph_objs import Annotation
+ from ..graph_objs import ColorBar
+ from ..graph_objs import Contours
+ from ..graph_objs import ErrorX
+ from ..graph_objs import ErrorY
+ from ..graph_objs import ErrorZ
+ from ..graph_objs import Font
+ from ..graph_objs import Legend
+ from ..graph_objs import Line
+ from ..graph_objs import Margin
+ from ..graph_objs import Marker
+ from ..graph_objs import RadialAxis
+ from ..graph_objs import Scene
+ from ..graph_objs import Stream
+ from ..graph_objs import XAxis
+ from ..graph_objs import YAxis
+ from ..graph_objs import ZAxis
+ from ..graph_objs import XBins
+ from ..graph_objs import YBins
+ from ..graph_objs import Trace
+ from ..graph_objs import Histogram2dcontour
+ from ..graph_objs import waterfall
+ from ..graph_objs import volume
+ from ..graph_objs import violin
+ from ..graph_objs import treemap
+ from ..graph_objs import table
+ from ..graph_objs import surface
+ from ..graph_objs import sunburst
+ from ..graph_objs import streamtube
+ from ..graph_objs import splom
+ from ..graph_objs import scatterternary
+ from ..graph_objs import scatterpolargl
+ from ..graph_objs import scatterpolar
+ from ..graph_objs import scattermapbox
+ from ..graph_objs import scattergl
+ from ..graph_objs import scattergeo
+ from ..graph_objs import scattercarpet
+ from ..graph_objs import scatter3d
+ from ..graph_objs import scatter
+ from ..graph_objs import sankey
+ from ..graph_objs import pointcloud
+ from ..graph_objs import pie
+ from ..graph_objs import parcoords
+ from ..graph_objs import parcats
+ from ..graph_objs import ohlc
+ from ..graph_objs import mesh3d
+ from ..graph_objs import isosurface
+ from ..graph_objs import indicator
+ from ..graph_objs import image
+ from ..graph_objs import histogram2dcontour
+ from ..graph_objs import histogram2d
+ from ..graph_objs import histogram
+ from ..graph_objs import heatmapgl
+ from ..graph_objs import heatmap
+ from ..graph_objs import funnelarea
+ from ..graph_objs import funnel
+ from ..graph_objs import densitymapbox
+ from ..graph_objs import contourcarpet
+ from ..graph_objs import contour
+ from ..graph_objs import cone
+ from ..graph_objs import choroplethmapbox
+ from ..graph_objs import choropleth
+ from ..graph_objs import carpet
+ from ..graph_objs import candlestick
+ from ..graph_objs import box
+ from ..graph_objs import barpolar
+ from ..graph_objs import bar
+ from ..graph_objs import area
+ from ..graph_objs import layout
+else:
+ from _plotly_utils.importers import relative_import
+
+ __all__, __getattr__, __dir__ = relative_import(
+ __name__,
+ [
+ "..graph_objs.waterfall",
+ "..graph_objs.volume",
+ "..graph_objs.violin",
+ "..graph_objs.treemap",
+ "..graph_objs.table",
+ "..graph_objs.surface",
+ "..graph_objs.sunburst",
+ "..graph_objs.streamtube",
+ "..graph_objs.splom",
+ "..graph_objs.scatterternary",
+ "..graph_objs.scatterpolargl",
+ "..graph_objs.scatterpolar",
+ "..graph_objs.scattermapbox",
+ "..graph_objs.scattergl",
+ "..graph_objs.scattergeo",
+ "..graph_objs.scattercarpet",
+ "..graph_objs.scatter3d",
+ "..graph_objs.scatter",
+ "..graph_objs.sankey",
+ "..graph_objs.pointcloud",
+ "..graph_objs.pie",
+ "..graph_objs.parcoords",
+ "..graph_objs.parcats",
+ "..graph_objs.ohlc",
+ "..graph_objs.mesh3d",
+ "..graph_objs.isosurface",
+ "..graph_objs.indicator",
+ "..graph_objs.image",
+ "..graph_objs.histogram2dcontour",
+ "..graph_objs.histogram2d",
+ "..graph_objs.histogram",
+ "..graph_objs.heatmapgl",
+ "..graph_objs.heatmap",
+ "..graph_objs.funnelarea",
+ "..graph_objs.funnel",
+ "..graph_objs.densitymapbox",
+ "..graph_objs.contourcarpet",
+ "..graph_objs.contour",
+ "..graph_objs.cone",
+ "..graph_objs.choroplethmapbox",
+ "..graph_objs.choropleth",
+ "..graph_objs.carpet",
+ "..graph_objs.candlestick",
+ "..graph_objs.box",
+ "..graph_objs.barpolar",
+ "..graph_objs.bar",
+ "..graph_objs.area",
+ "..graph_objs.layout",
+ ],
+ [
+ "..graph_objs.Waterfall",
+ "..graph_objs.Volume",
+ "..graph_objs.Violin",
+ "..graph_objs.Treemap",
+ "..graph_objs.Table",
+ "..graph_objs.Surface",
+ "..graph_objs.Sunburst",
+ "..graph_objs.Streamtube",
+ "..graph_objs.Splom",
+ "..graph_objs.Scatterternary",
+ "..graph_objs.Scatterpolargl",
+ "..graph_objs.Scatterpolar",
+ "..graph_objs.Scattermapbox",
+ "..graph_objs.Scattergl",
+ "..graph_objs.Scattergeo",
+ "..graph_objs.Scattercarpet",
+ "..graph_objs.Scatter3d",
+ "..graph_objs.Scatter",
+ "..graph_objs.Sankey",
+ "..graph_objs.Pointcloud",
+ "..graph_objs.Pie",
+ "..graph_objs.Parcoords",
+ "..graph_objs.Parcats",
+ "..graph_objs.Ohlc",
+ "..graph_objs.Mesh3d",
+ "..graph_objs.Isosurface",
+ "..graph_objs.Indicator",
+ "..graph_objs.Image",
+ "..graph_objs.Histogram2dContour",
+ "..graph_objs.Histogram2d",
+ "..graph_objs.Histogram",
+ "..graph_objs.Heatmapgl",
+ "..graph_objs.Heatmap",
+ "..graph_objs.Funnelarea",
+ "..graph_objs.Funnel",
+ "..graph_objs.Densitymapbox",
+ "..graph_objs.Contourcarpet",
+ "..graph_objs.Contour",
+ "..graph_objs.Cone",
+ "..graph_objs.Choroplethmapbox",
+ "..graph_objs.Choropleth",
+ "..graph_objs.Carpet",
+ "..graph_objs.Candlestick",
+ "..graph_objs.Box",
+ "..graph_objs.Barpolar",
+ "..graph_objs.Bar",
+ "..graph_objs.Area",
+ "..graph_objs.Layout",
+ "..graph_objs.Frame",
+ "..graph_objs.Figure",
+ "..graph_objs.Data",
+ "..graph_objs.Annotations",
+ "..graph_objs.Frames",
+ "..graph_objs.AngularAxis",
+ "..graph_objs.Annotation",
+ "..graph_objs.ColorBar",
+ "..graph_objs.Contours",
+ "..graph_objs.ErrorX",
+ "..graph_objs.ErrorY",
+ "..graph_objs.ErrorZ",
+ "..graph_objs.Font",
+ "..graph_objs.Legend",
+ "..graph_objs.Line",
+ "..graph_objs.Margin",
+ "..graph_objs.Marker",
+ "..graph_objs.RadialAxis",
+ "..graph_objs.Scene",
+ "..graph_objs.Stream",
+ "..graph_objs.XAxis",
+ "..graph_objs.YAxis",
+ "..graph_objs.ZAxis",
+ "..graph_objs.XBins",
+ "..graph_objs.YBins",
+ "..graph_objs.Trace",
+ "..graph_objs.Histogram2dcontour",
+ ],
+ )
+
+from .._validate import validate
+
+if sys.version_info < (3, 7):
+ try:
+ import ipywidgets
+ from distutils.version import LooseVersion
+
+ if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
+ from ..graph_objs._figurewidget import FigureWidget
+ del LooseVersion
+ del ipywidgets
+ except ImportError:
+ pass
+else:
+ __all__.append("FigureWidget")
+ orig_getattr = __getattr__
+
+ def __getattr__(import_name):
+ if import_name == "FigureWidget":
+ try:
+ import ipywidgets
+ from distutils.version import LooseVersion
+
+ if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
+ from ..graph_objs._figurewidget import FigureWidget
+
+ return FigureWidget
+ except ImportError:
+ pass
+
+ return orig_getattr(import_name)
diff --git a/packages/python/plotly/plotly/graph_objs/__init__.py b/packages/python/plotly/plotly/graph_objs/__init__.py
index cf7c5e0d63a..80648e0661e 100644
--- a/packages/python/plotly/plotly/graph_objs/__init__.py
+++ b/packages/python/plotly/plotly/graph_objs/__init__.py
@@ -1,101472 +1,291 @@
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Waterfall(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # base
- # ----
- @property
- def base(self):
- """
- Sets where the bar base is drawn (in position axis units).
-
- The 'base' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["base"]
-
- @base.setter
- def base(self, val):
- self["base"] = val
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether the text nodes are clipped about the subplot
- axes. To show the text nodes above axis lines and tick labels,
- make sure to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # connector
- # ---------
- @property
- def connector(self):
- """
- The 'connector' property is an instance of Connector
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Connector`
- - A dict of string/value properties that will be passed
- to the Connector constructor
-
- Supported dict properties:
-
- line
- :class:`plotly.graph_objects.waterfall.connecto
- r.Line` instance or dict with compatible
- properties
- mode
- Sets the shape of connector lines.
- visible
- Determines if connector lines are drawn.
-
- Returns
- -------
- plotly.graph_objs.waterfall.Connector
- """
- return self["connector"]
-
- @connector.setter
- def connector(self, val):
- self["connector"] = val
-
- # constraintext
- # -------------
- @property
- def constraintext(self):
- """
- Constrain the size of text inside or outside a bar to be no
- larger than the bar itself.
-
- The 'constraintext' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'both', 'none']
-
- Returns
- -------
- Any
- """
- return self["constraintext"]
-
- @constraintext.setter
- def constraintext(self, val):
- self["constraintext"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # decreasing
- # ----------
- @property
- def decreasing(self):
- """
- The 'decreasing' property is an instance of Decreasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Decreasing`
- - A dict of string/value properties that will be passed
- to the Decreasing constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.waterfall.decreasi
- ng.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.waterfall.Decreasing
- """
- return self["decreasing"]
-
- @decreasing.setter
- def decreasing(self, val):
- self["decreasing"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters
- (e.g. 'name+x')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.waterfall.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `initial`, `delta` and `final`. Anything contained in
- tag `
` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # increasing
- # ----------
- @property
- def increasing(self):
- """
- The 'increasing' property is an instance of Increasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Increasing`
- - A dict of string/value properties that will be passed
- to the Increasing constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.waterfall.increasi
- ng.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.waterfall.Increasing
- """
- return self["increasing"]
-
- @increasing.setter
- def increasing(self, val):
- self["increasing"] = val
-
- # insidetextanchor
- # ----------------
- @property
- def insidetextanchor(self):
- """
- Determines if texts are kept at center or start/end points in
- `textposition` "inside" mode.
-
- The 'insidetextanchor' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['end', 'middle', 'start']
-
- Returns
- -------
- Any
- """
- return self["insidetextanchor"]
-
- @insidetextanchor.setter
- def insidetextanchor(self, val):
- self["insidetextanchor"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `text` lying inside the bar.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.waterfall.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # measure
- # -------
- @property
- def measure(self):
- """
- An array containing types of values. By default the values are
- considered as 'relative'. However; it is possible to use
- 'total' to compute the sums. Also 'absolute' could be applied
- to reset the computed total or to declare an initial value
- where needed.
-
- The 'measure' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["measure"]
-
- @measure.setter
- def measure(self, val):
- self["measure"] = val
-
- # measuresrc
- # ----------
- @property
- def measuresrc(self):
- """
- Sets the source reference on Chart Studio Cloud for measure .
-
- The 'measuresrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["measuresrc"]
-
- @measuresrc.setter
- def measuresrc(self, val):
- self["measuresrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # offset
- # ------
- @property
- def offset(self):
- """
- Shifts the position where the bar is drawn (in position axis
- units). In "group" barmode, traces that set "offset" will be
- excluded and drawn in "overlay" mode instead.
-
- The 'offset' property is a number and may be specified as:
- - An int or float
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["offset"]
-
- @offset.setter
- def offset(self, val):
- self["offset"] = val
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # offsetsrc
- # ---------
- @property
- def offsetsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for offset .
-
- The 'offsetsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["offsetsrc"]
-
- @offsetsrc.setter
- def offsetsrc(self, val):
- self["offsetsrc"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the bars. With "v" ("h"), the value of
- the each bar spans along the vertical (horizontal).
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `text` lying outside the bar.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.waterfall.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.waterfall.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textangle
- # ---------
- @property
- def textangle(self):
- """
- Sets the angle of the tick labels with respect to the bar. For
- example, a `tickangle` of -90 draws the tick labels vertically.
- With "auto" the texts may automatically be rotated to fit with
- the maximum size in bars.
-
- The 'textangle' property is a angle (in degrees) that may be
- specified as a number between -180 and 180. Numeric values outside this
- range are converted to the equivalent value
- (e.g. 270 is converted to -90).
-
- Returns
- -------
- int|float
- """
- return self["textangle"]
-
- @textangle.setter
- def textangle(self, val):
- self["textangle"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `text`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.waterfall.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph. In the
- case of having multiple waterfalls, totals are computed
- separately (per trace).
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Specifies the location of the `text`. "inside" positions `text`
- inside, next to the bar end (rotated and scaled if needed).
- "outside" positions `text` outside, next to the bar end (scaled
- if needed), unless there is another bar stacked on this one,
- then the text gets pushed inside. "auto" tries to position
- `text` inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
-
- The 'textposition' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'auto', 'none']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `initial`, `delta`, `final` and `label`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # totals
- # ------
- @property
- def totals(self):
- """
- The 'totals' property is an instance of Totals
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.waterfall.Totals`
- - A dict of string/value properties that will be passed
- to the Totals constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.waterfall.totals.M
- arker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.waterfall.Totals
- """
- return self["totals"]
-
- @totals.setter
- def totals(self, val):
- self["totals"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the bar width (in position axis units).
-
- The 'width' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["width"]
-
- @width.setter
- def width(self, val):
- self["width"] = val
-
- # widthsrc
- # --------
- @property
- def widthsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for width .
-
- The 'widthsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["widthsrc"]
-
- @widthsrc.setter
- def widthsrc(self, val):
- self["widthsrc"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- base
- Sets where the bar base is drawn (in position axis
- units).
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- connector
- :class:`plotly.graph_objects.waterfall.Connector`
- instance or dict with compatible properties
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.waterfall.Decreasing`
- instance or dict with compatible properties
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.waterfall.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `initial`, `delta` and
- `final`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.waterfall.Increasing`
- instance or dict with compatible properties
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- measure
- An array containing types of values. By default the
- values are considered as 'relative'. However; it is
- possible to use 'total' to compute the sums. Also
- 'absolute' could be applied to reset the computed total
- or to declare an initial value where needed.
- measuresrc
- Sets the source reference on Chart Studio Cloud for
- measure .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.waterfall.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textinfo
- Determines which trace information appear on the graph.
- In the case of having multiple waterfalls, totals are
- computed separately (per trace).
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `initial`,
- `delta`, `final` and `label`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- totals
- :class:`plotly.graph_objects.waterfall.Totals` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- base=None,
- cliponaxis=None,
- connector=None,
- constraintext=None,
- customdata=None,
- customdatasrc=None,
- decreasing=None,
- dx=None,
- dy=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- increasing=None,
- insidetextanchor=None,
- insidetextfont=None,
- legendgroup=None,
- measure=None,
- measuresrc=None,
- meta=None,
- metasrc=None,
- name=None,
- offset=None,
- offsetgroup=None,
- offsetsrc=None,
- opacity=None,
- orientation=None,
- outsidetextfont=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textangle=None,
- textfont=None,
- textinfo=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- totals=None,
- uid=None,
- uirevision=None,
- visible=None,
- width=None,
- widthsrc=None,
- x=None,
- x0=None,
- xaxis=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Waterfall object
-
- Draws waterfall trace which is useful graph to displays the
- contribution of various elements (either positive or negative)
- in a bar chart. The data visualized by the span of the bars is
- set in `y` if `orientation` is set th "v" (the default) and the
- labels are set in `x`. By setting `orientation` to "h", the
- roles are interchanged.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Waterfall`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- base
- Sets where the bar base is drawn (in position axis
- units).
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- connector
- :class:`plotly.graph_objects.waterfall.Connector`
- instance or dict with compatible properties
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.waterfall.Decreasing`
- instance or dict with compatible properties
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.waterfall.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `initial`, `delta` and
- `final`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.waterfall.Increasing`
- instance or dict with compatible properties
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- measure
- An array containing types of values. By default the
- values are considered as 'relative'. However; it is
- possible to use 'total' to compute the sums. Also
- 'absolute' could be applied to reset the computed total
- or to declare an initial value where needed.
- measuresrc
- Sets the source reference on Chart Studio Cloud for
- measure .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.waterfall.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textinfo
- Determines which trace information appear on the graph.
- In the case of having multiple waterfalls, totals are
- computed separately (per trace).
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `initial`,
- `delta`, `final` and `label`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- totals
- :class:`plotly.graph_objects.waterfall.Totals` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Waterfall
- """
- super(Waterfall, self).__init__("waterfall")
-
- # 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.Waterfall
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Waterfall`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import waterfall as v_waterfall
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_waterfall.AlignmentgroupValidator()
- self._validators["base"] = v_waterfall.BaseValidator()
- self._validators["cliponaxis"] = v_waterfall.CliponaxisValidator()
- self._validators["connector"] = v_waterfall.ConnectorValidator()
- self._validators["constraintext"] = v_waterfall.ConstraintextValidator()
- self._validators["customdata"] = v_waterfall.CustomdataValidator()
- self._validators["customdatasrc"] = v_waterfall.CustomdatasrcValidator()
- self._validators["decreasing"] = v_waterfall.DecreasingValidator()
- self._validators["dx"] = v_waterfall.DxValidator()
- self._validators["dy"] = v_waterfall.DyValidator()
- self._validators["hoverinfo"] = v_waterfall.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_waterfall.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_waterfall.HoverlabelValidator()
- self._validators["hovertemplate"] = v_waterfall.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_waterfall.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_waterfall.HovertextValidator()
- self._validators["hovertextsrc"] = v_waterfall.HovertextsrcValidator()
- self._validators["ids"] = v_waterfall.IdsValidator()
- self._validators["idssrc"] = v_waterfall.IdssrcValidator()
- self._validators["increasing"] = v_waterfall.IncreasingValidator()
- self._validators["insidetextanchor"] = v_waterfall.InsidetextanchorValidator()
- self._validators["insidetextfont"] = v_waterfall.InsidetextfontValidator()
- self._validators["legendgroup"] = v_waterfall.LegendgroupValidator()
- self._validators["measure"] = v_waterfall.MeasureValidator()
- self._validators["measuresrc"] = v_waterfall.MeasuresrcValidator()
- self._validators["meta"] = v_waterfall.MetaValidator()
- self._validators["metasrc"] = v_waterfall.MetasrcValidator()
- self._validators["name"] = v_waterfall.NameValidator()
- self._validators["offset"] = v_waterfall.OffsetValidator()
- self._validators["offsetgroup"] = v_waterfall.OffsetgroupValidator()
- self._validators["offsetsrc"] = v_waterfall.OffsetsrcValidator()
- self._validators["opacity"] = v_waterfall.OpacityValidator()
- self._validators["orientation"] = v_waterfall.OrientationValidator()
- self._validators["outsidetextfont"] = v_waterfall.OutsidetextfontValidator()
- self._validators["selectedpoints"] = v_waterfall.SelectedpointsValidator()
- self._validators["showlegend"] = v_waterfall.ShowlegendValidator()
- self._validators["stream"] = v_waterfall.StreamValidator()
- self._validators["text"] = v_waterfall.TextValidator()
- self._validators["textangle"] = v_waterfall.TextangleValidator()
- self._validators["textfont"] = v_waterfall.TextfontValidator()
- self._validators["textinfo"] = v_waterfall.TextinfoValidator()
- self._validators["textposition"] = v_waterfall.TextpositionValidator()
- self._validators["textpositionsrc"] = v_waterfall.TextpositionsrcValidator()
- self._validators["textsrc"] = v_waterfall.TextsrcValidator()
- self._validators["texttemplate"] = v_waterfall.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_waterfall.TexttemplatesrcValidator()
- self._validators["totals"] = v_waterfall.TotalsValidator()
- self._validators["uid"] = v_waterfall.UidValidator()
- self._validators["uirevision"] = v_waterfall.UirevisionValidator()
- self._validators["visible"] = v_waterfall.VisibleValidator()
- self._validators["width"] = v_waterfall.WidthValidator()
- self._validators["widthsrc"] = v_waterfall.WidthsrcValidator()
- self._validators["x"] = v_waterfall.XValidator()
- self._validators["x0"] = v_waterfall.X0Validator()
- self._validators["xaxis"] = v_waterfall.XAxisValidator()
- self._validators["xsrc"] = v_waterfall.XsrcValidator()
- self._validators["y"] = v_waterfall.YValidator()
- self._validators["y0"] = v_waterfall.Y0Validator()
- self._validators["yaxis"] = v_waterfall.YAxisValidator()
- self._validators["ysrc"] = v_waterfall.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("base", None)
- self["base"] = base if base is not None else _v
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("connector", None)
- self["connector"] = connector if connector is not None else _v
- _v = arg.pop("constraintext", None)
- self["constraintext"] = constraintext if constraintext is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("decreasing", None)
- self["decreasing"] = decreasing if decreasing is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("increasing", None)
- self["increasing"] = increasing if increasing is not None else _v
- _v = arg.pop("insidetextanchor", None)
- self["insidetextanchor"] = (
- insidetextanchor if insidetextanchor is not None else _v
- )
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("measure", None)
- self["measure"] = measure if measure is not None else _v
- _v = arg.pop("measuresrc", None)
- self["measuresrc"] = measuresrc if measuresrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("offset", None)
- self["offset"] = offset if offset is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("offsetsrc", None)
- self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textangle", None)
- self["textangle"] = textangle if textangle is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("totals", None)
- self["totals"] = totals if totals is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("widthsrc", None)
- self["widthsrc"] = widthsrc if widthsrc is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "waterfall"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="waterfall", val="waterfall"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Volume(_BaseTraceType):
-
- # 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
-
- # caps
- # ----
- @property
- def caps(self):
- """
- The 'caps' property is an instance of Caps
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Caps`
- - A dict of string/value properties that will be passed
- to the Caps constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.volume.caps.X`
- instance or dict with compatible properties
- y
- :class:`plotly.graph_objects.volume.caps.Y`
- instance or dict with compatible properties
- z
- :class:`plotly.graph_objects.volume.caps.Z`
- instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.volume.Caps
- """
- return self["caps"]
-
- @caps.setter
- def caps(self, val):
- self["caps"] = val
-
- # cauto
- # -----
- @property
- def cauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here `value`) 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 `value` 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 `value`. 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 `value` 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.volume.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.volume.
- colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.volume.colorbar.tickformatstopdefaults), sets
- the default property values to use for elements
- of volume.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.volume.colorbar.Ti
- tle` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- volume.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
- volume.colorbar.title.side instead. Determines
- the location of color bar's title with respect
- to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.volume.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # contour
- # -------
- @property
- def contour(self):
- """
- The 'contour' property is an instance of Contour
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Contour`
- - A dict of string/value properties that will be passed
- to the Contour constructor
-
- Supported dict properties:
-
- color
- Sets the color of the contour lines.
- show
- Sets whether or not dynamic contours are shown
- on hover
- width
- Sets the width of the contour lines.
-
- Returns
- -------
- plotly.graph_objs.volume.Contour
- """
- return self["contour"]
-
- @contour.setter
- def contour(self, val):
- self["contour"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # flatshading
- # -----------
- @property
- def flatshading(self):
- """
- Determines whether or not normal smoothing is applied to the
- meshes, creating meshes with an angular, low-poly look via flat
- reflections.
-
- The 'flatshading' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["flatshading"]
-
- @flatshading.setter
- def flatshading(self, val):
- self["flatshading"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.volume.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # isomax
- # ------
- @property
- def isomax(self):
- """
- Sets the maximum boundary for iso-surface plot.
-
- The 'isomax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["isomax"]
-
- @isomax.setter
- def isomax(self, val):
- self["isomax"] = val
-
- # isomin
- # ------
- @property
- def isomin(self):
- """
- Sets the minimum boundary for iso-surface plot.
-
- The 'isomin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["isomin"]
-
- @isomin.setter
- def isomin(self, val):
- self["isomin"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- facenormalsepsilon
- Epsilon for face normals calculation avoids
- math issues arising from degenerate geometry.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
- vertexnormalsepsilon
- Epsilon for vertex normals calculation avoids
- math issues arising from degenerate geometry.
-
- Returns
- -------
- plotly.graph_objs.volume.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.volume.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # opacityscale
- # ------------
- @property
- def opacityscale(self):
- """
- Sets the opacityscale. The opacityscale must be an array
- containing arrays mapping a normalized value to an opacity
- value. At minimum, a mapping for the lowest (0) and highest (1)
- values are required. For example, `[[0, 1], [0.5, 0.2], [1,
- 1]]` means that higher/lower values would have higher opacity
- values and those in the middle would be more transparent
- Alternatively, `opacityscale` may be a palette name string of
- the following list: 'min', 'max', 'extremes' and 'uniform'. The
- default is 'uniform'.
-
- The 'opacityscale' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["opacityscale"]
-
- @opacityscale.setter
- def opacityscale(self, val):
- self["opacityscale"] = 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # slices
- # ------
- @property
- def slices(self):
- """
- The 'slices' property is an instance of Slices
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Slices`
- - A dict of string/value properties that will be passed
- to the Slices constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.volume.slices.X`
- instance or dict with compatible properties
- y
- :class:`plotly.graph_objects.volume.slices.Y`
- instance or dict with compatible properties
- z
- :class:`plotly.graph_objects.volume.slices.Z`
- instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.volume.Slices
- """
- return self["slices"]
-
- @slices.setter
- def slices(self, val):
- self["slices"] = val
-
- # spaceframe
- # ----------
- @property
- def spaceframe(self):
- """
- The 'spaceframe' property is an instance of Spaceframe
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Spaceframe`
- - A dict of string/value properties that will be passed
- to the Spaceframe constructor
-
- Supported dict properties:
-
- fill
- Sets the fill ratio of the `spaceframe`
- elements. The default fill value is 1 meaning
- that they are entirely shaded. Applying a
- `fill` ratio less than one would allow the
- creation of openings parallel to the edges.
- show
- Displays/hides tetrahedron shapes between
- minimum and maximum iso-values. Often useful
- when either caps or surfaces are disabled or
- filled with values less than 1.
-
- Returns
- -------
- plotly.graph_objs.volume.Spaceframe
- """
- return self["spaceframe"]
-
- @spaceframe.setter
- def spaceframe(self, val):
- self["spaceframe"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.volume.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # surface
- # -------
- @property
- def surface(self):
- """
- The 'surface' property is an instance of Surface
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.volume.Surface`
- - A dict of string/value properties that will be passed
- to the Surface constructor
-
- Supported dict properties:
-
- count
- Sets the number of iso-surfaces between minimum
- and maximum iso-values. By default this value
- is 2 meaning that only minimum and maximum
- surfaces would be drawn.
- fill
- Sets the fill ratio of the iso-surface. The
- default fill value of the surface is 1 meaning
- that they are entirely shaded. On the other
- hand Applying a `fill` ratio less than one
- would allow the creation of openings parallel
- to the edges.
- pattern
- Sets the surface pattern of the iso-surface 3-D
- sections. The default pattern of the surface is
- `all` meaning that the rest of surface elements
- would be shaded. The check options (either 1 or
- 2) could be used to draw half of the squares on
- the surface. Using various combinations of
- capital `A`, `B`, `C`, `D` and `E` may also be
- used to reduce the number of triangles on the
- iso-surfaces and creating other patterns of
- interest.
- show
- Hides/displays surfaces between minimum and
- maximum iso-values.
-
- Returns
- -------
- plotly.graph_objs.volume.Surface
- """
- return self["surface"]
-
- @surface.setter
- def surface(self, val):
- self["surface"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with the vertices. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # value
- # -----
- @property
- def value(self):
- """
- Sets the 4th dimension (value) of the vertices.
-
- The 'value' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["value"]
-
- @value.setter
- def value(self, val):
- self["value"] = val
-
- # valuesrc
- # --------
- @property
- def valuesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for value .
-
- The 'valuesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuesrc"]
-
- @valuesrc.setter
- def valuesrc(self, val):
- self["valuesrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the X coordinates of the vertices on X axis.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the Y coordinates of the vertices on Y axis.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the Z coordinates of the vertices on Z axis.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- caps
- :class:`plotly.graph_objects.volume.Caps` instance or
- dict with compatible properties
- cauto
- Determines whether or not the color domain is computed
- with respect to the input data (here `value`) 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 `value` 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 `value`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `value` and if set, `cmax` must
- be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.volume.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.volume.Contour` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.volume.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- isomax
- Sets the maximum boundary for iso-surface plot.
- isomin
- Sets the minimum boundary for iso-surface plot.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.volume.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.volume.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- opacityscale
- Sets the opacityscale. The opacityscale must be an
- array containing arrays mapping a normalized value to
- an opacity value. At minimum, a mapping for the lowest
- (0) and highest (1) values are required. For example,
- `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower
- values would have higher opacity values and those in
- the middle would be more transparent Alternatively,
- `opacityscale` may be a palette name string of the
- following list: 'min', 'max', 'extremes' and 'uniform'.
- The default is 'uniform'.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- slices
- :class:`plotly.graph_objects.volume.Slices` instance or
- dict with compatible properties
- spaceframe
- :class:`plotly.graph_objects.volume.Spaceframe`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.volume.Stream` instance or
- dict with compatible properties
- surface
- :class:`plotly.graph_objects.volume.Surface` instance
- or dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the 4th dimension (value) of the vertices.
- valuesrc
- Sets the source reference on Chart Studio Cloud for
- value .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices on X axis.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices on Y axis.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices on Z axis.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- caps=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- contour=None,
- customdata=None,
- customdatasrc=None,
- flatshading=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- isomax=None,
- isomin=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- opacityscale=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- slices=None,
- spaceframe=None,
- stream=None,
- surface=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- value=None,
- valuesrc=None,
- visible=None,
- x=None,
- xsrc=None,
- y=None,
- ysrc=None,
- z=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Volume object
-
- Draws volume trace between iso-min and iso-max values with
- coordinates given by four 1-dimensional arrays containing the
- `value`, `x`, `y` and `z` of every vertex of a uniform or non-
- uniform 3-D grid. Horizontal or vertical slices, caps as well
- as spaceframe between iso-min and iso-max values could also be
- drawn using this trace.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Volume`
- 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.
- caps
- :class:`plotly.graph_objects.volume.Caps` instance or
- dict with compatible properties
- cauto
- Determines whether or not the color domain is computed
- with respect to the input data (here `value`) 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 `value` 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 `value`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `value` and if set, `cmax` must
- be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.volume.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.volume.Contour` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.volume.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- isomax
- Sets the maximum boundary for iso-surface plot.
- isomin
- Sets the minimum boundary for iso-surface plot.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.volume.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.volume.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- opacityscale
- Sets the opacityscale. The opacityscale must be an
- array containing arrays mapping a normalized value to
- an opacity value. At minimum, a mapping for the lowest
- (0) and highest (1) values are required. For example,
- `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower
- values would have higher opacity values and those in
- the middle would be more transparent Alternatively,
- `opacityscale` may be a palette name string of the
- following list: 'min', 'max', 'extremes' and 'uniform'.
- The default is 'uniform'.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- slices
- :class:`plotly.graph_objects.volume.Slices` instance or
- dict with compatible properties
- spaceframe
- :class:`plotly.graph_objects.volume.Spaceframe`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.volume.Stream` instance or
- dict with compatible properties
- surface
- :class:`plotly.graph_objects.volume.Surface` instance
- or dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the 4th dimension (value) of the vertices.
- valuesrc
- Sets the source reference on Chart Studio Cloud for
- value .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices on X axis.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices on Y axis.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices on Z axis.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Volume
- """
- super(Volume, self).__init__("volume")
-
- # 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.Volume
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Volume`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import volume as v_volume
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_volume.AutocolorscaleValidator()
- self._validators["caps"] = v_volume.CapsValidator()
- self._validators["cauto"] = v_volume.CautoValidator()
- self._validators["cmax"] = v_volume.CmaxValidator()
- self._validators["cmid"] = v_volume.CmidValidator()
- self._validators["cmin"] = v_volume.CminValidator()
- self._validators["coloraxis"] = v_volume.ColoraxisValidator()
- self._validators["colorbar"] = v_volume.ColorBarValidator()
- self._validators["colorscale"] = v_volume.ColorscaleValidator()
- self._validators["contour"] = v_volume.ContourValidator()
- self._validators["customdata"] = v_volume.CustomdataValidator()
- self._validators["customdatasrc"] = v_volume.CustomdatasrcValidator()
- self._validators["flatshading"] = v_volume.FlatshadingValidator()
- self._validators["hoverinfo"] = v_volume.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_volume.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_volume.HoverlabelValidator()
- self._validators["hovertemplate"] = v_volume.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_volume.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_volume.HovertextValidator()
- self._validators["hovertextsrc"] = v_volume.HovertextsrcValidator()
- self._validators["ids"] = v_volume.IdsValidator()
- self._validators["idssrc"] = v_volume.IdssrcValidator()
- self._validators["isomax"] = v_volume.IsomaxValidator()
- self._validators["isomin"] = v_volume.IsominValidator()
- self._validators["legendgroup"] = v_volume.LegendgroupValidator()
- self._validators["lighting"] = v_volume.LightingValidator()
- self._validators["lightposition"] = v_volume.LightpositionValidator()
- self._validators["meta"] = v_volume.MetaValidator()
- self._validators["metasrc"] = v_volume.MetasrcValidator()
- self._validators["name"] = v_volume.NameValidator()
- self._validators["opacity"] = v_volume.OpacityValidator()
- self._validators["opacityscale"] = v_volume.OpacityscaleValidator()
- self._validators["reversescale"] = v_volume.ReversescaleValidator()
- self._validators["scene"] = v_volume.SceneValidator()
- self._validators["showlegend"] = v_volume.ShowlegendValidator()
- self._validators["showscale"] = v_volume.ShowscaleValidator()
- self._validators["slices"] = v_volume.SlicesValidator()
- self._validators["spaceframe"] = v_volume.SpaceframeValidator()
- self._validators["stream"] = v_volume.StreamValidator()
- self._validators["surface"] = v_volume.SurfaceValidator()
- self._validators["text"] = v_volume.TextValidator()
- self._validators["textsrc"] = v_volume.TextsrcValidator()
- self._validators["uid"] = v_volume.UidValidator()
- self._validators["uirevision"] = v_volume.UirevisionValidator()
- self._validators["value"] = v_volume.ValueValidator()
- self._validators["valuesrc"] = v_volume.ValuesrcValidator()
- self._validators["visible"] = v_volume.VisibleValidator()
- self._validators["x"] = v_volume.XValidator()
- self._validators["xsrc"] = v_volume.XsrcValidator()
- self._validators["y"] = v_volume.YValidator()
- self._validators["ysrc"] = v_volume.YsrcValidator()
- self._validators["z"] = v_volume.ZValidator()
- self._validators["zsrc"] = v_volume.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("caps", None)
- self["caps"] = caps if caps is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("contour", None)
- self["contour"] = contour if contour is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("flatshading", None)
- self["flatshading"] = flatshading if flatshading is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("isomax", None)
- self["isomax"] = isomax if isomax is not None else _v
- _v = arg.pop("isomin", None)
- self["isomin"] = isomin if isomin is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("opacityscale", None)
- self["opacityscale"] = opacityscale if opacityscale is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("slices", None)
- self["slices"] = slices if slices is not None else _v
- _v = arg.pop("spaceframe", None)
- self["spaceframe"] = spaceframe if spaceframe is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("surface", None)
- self["surface"] = surface if surface is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("value", None)
- self["value"] = value if value is not None else _v
- _v = arg.pop("valuesrc", None)
- self["valuesrc"] = valuesrc if valuesrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "volume"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="volume", val="volume"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Violin(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # bandwidth
- # ---------
- @property
- def bandwidth(self):
- """
- Sets the bandwidth used to compute the kernel density estimate.
- By default, the bandwidth is determined by Silverman's rule of
- thumb.
-
- The 'bandwidth' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["bandwidth"]
-
- @bandwidth.setter
- def bandwidth(self, val):
- self["bandwidth"] = val
-
- # box
- # ---
- @property
- def box(self):
- """
- The 'box' property is an instance of Box
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Box`
- - A dict of string/value properties that will be passed
- to the Box constructor
-
- Supported dict properties:
-
- fillcolor
- Sets the inner box plot fill color.
- line
- :class:`plotly.graph_objects.violin.box.Line`
- instance or dict with compatible properties
- visible
- Determines if an miniature box plot is drawn
- inside the violins.
- width
- Sets the width of the inner box plots relative
- to the violins' width. For example, with 1, the
- inner box plots are as wide as the violins.
-
- Returns
- -------
- plotly.graph_objs.violin.Box
- """
- return self["box"]
-
- @box.setter
- def box(self, val):
- self["box"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.violin.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual violins or sample
- points or the kernel density estimate or any combination of
- them?
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['violins', 'points', 'kde'] joined with '+' characters
- (e.g. 'violins+points')
- OR exactly one of ['all'] (e.g. 'all')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # jitter
- # ------
- @property
- def jitter(self):
- """
- Sets the amount of jitter in the sample points drawn. If 0, the
- sample points align along the distribution axis. If 1, the
- sample points are drawn in a random jitter of width equal to
- the width of the violins.
-
- The 'jitter' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["jitter"]
-
- @jitter.setter
- def jitter(self, val):
- self["jitter"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.violin.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the color of line bounding the violin(s).
- width
- Sets the width (in px) of line bounding the
- violin(s).
-
- Returns
- -------
- plotly.graph_objs.violin.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- line
- :class:`plotly.graph_objects.violin.marker.Line
- ` instance or dict with compatible properties
- opacity
- Sets the marker opacity.
- outliercolor
- Sets the color of the outlier sample points.
- size
- Sets the marker size (in px).
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
-
- Returns
- -------
- plotly.graph_objs.violin.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meanline
- # --------
- @property
- def meanline(self):
- """
- The 'meanline' property is an instance of Meanline
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Meanline`
- - A dict of string/value properties that will be passed
- to the Meanline constructor
-
- Supported dict properties:
-
- color
- Sets the mean line color.
- visible
- Determines if a line corresponding to the
- sample's mean is shown inside the violins. If
- `box.visible` is turned on, the mean line is
- drawn inside the inner box. Otherwise, the mean
- line is drawn from one side of the violin to
- other.
- width
- Sets the mean line width.
-
- Returns
- -------
- plotly.graph_objs.violin.Meanline
- """
- return self["meanline"]
-
- @meanline.setter
- def meanline(self, val):
- self["meanline"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover. For violin traces, the name will also be used for
- the position coordinate, if `x` and `x0` (`y` and `y0` if
- horizontal) are missing and the position axis is categorical.
- Note that the trace name is also used as a default value for
- attribute `scalegroup` (please see its description for
- details).
-
- 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
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the violin(s). If "v" ("h"), the
- distribution is visualized along the vertical (horizontal).
-
- 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
-
- # pointpos
- # --------
- @property
- def pointpos(self):
- """
- Sets the position of the sample points in relation to the
- violins. If 0, the sample points are places over the center of
- the violins. Positive (negative) values correspond to positions
- to the right (left) for vertical violins and above (below) for
- horizontal violins.
-
- The 'pointpos' property is a number and may be specified as:
- - An int or float in the interval [-2, 2]
-
- Returns
- -------
- int|float
- """
- return self["pointpos"]
-
- @pointpos.setter
- def pointpos(self, val):
- self["pointpos"] = val
-
- # points
- # ------
- @property
- def points(self):
- """
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier points
- are shown and points either less than 4*Q1-3*Q3 or greater than
- 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all
- sample points are shown If False, only the violins are shown
- with no sample points. Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is set,
- otherwise defaults to "outliers".
-
- The 'points' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['all', 'outliers', 'suspectedoutliers', False]
-
- Returns
- -------
- Any
- """
- return self["points"]
-
- @points.setter
- def points(self, val):
- self["points"] = val
-
- # scalegroup
- # ----------
- @property
- def scalegroup(self):
- """
- If there are multiple violins that should be sized according to
- to some metric (see `scalemode`), link them by providing a non-
- empty group id here shared by every trace in the same group. If
- a violin's `width` is undefined, `scalegroup` will default to
- the trace's name. In this case, violins with the same names
- will be linked together
-
- The 'scalegroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["scalegroup"]
-
- @scalegroup.setter
- def scalegroup(self, val):
- self["scalegroup"] = val
-
- # scalemode
- # ---------
- @property
- def scalemode(self):
- """
- Sets the metric by which the width of each violin is
- determined."width" means each violin has the same (max)
- width*count* means the violins are scaled by the number of
- sample points makingup each violin.
-
- The 'scalemode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['width', 'count']
-
- Returns
- -------
- Any
- """
- return self["scalemode"]
-
- @scalemode.setter
- def scalemode(self, val):
- self["scalemode"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.violin.selected.Ma
- rker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.violin.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # side
- # ----
- @property
- def side(self):
- """
- Determines on which side of the position value the density
- function making up one half of a violin is plotted. Useful when
- comparing two violin traces under "overlay" mode, where one
- trace has `side` set to "positive" and the other to "negative".
-
- The 'side' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['both', 'positive', 'negative']
-
- Returns
- -------
- Any
- """
- return self["side"]
-
- @side.setter
- def side(self, val):
- self["side"] = val
-
- # span
- # ----
- @property
- def span(self):
- """
- Sets the span in data space for which the density function will
- be computed. Has an effect only when `spanmode` is set to
- "manual".
-
- The 'span' property is an info array that may be specified as:
-
- * a list or tuple of 2 elements where:
- (0) The 'span[0]' property accepts values of any type
- (1) The 'span[1]' property accepts values of any type
-
- Returns
- -------
- list
- """
- return self["span"]
-
- @span.setter
- def span(self, val):
- self["span"] = val
-
- # spanmode
- # --------
- @property
- def spanmode(self):
- """
- Sets the method by which the span in data space where the
- density function will be computed. "soft" means the span goes
- from the sample's minimum value minus two bandwidths to the
- sample's maximum value plus two bandwidths. "hard" means the
- span goes from the sample's minimum to its maximum value. For
- custom span settings, use mode "manual" and fill in the `span`
- attribute.
-
- The 'spanmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['soft', 'hard', 'manual']
-
- Returns
- -------
- Any
- """
- return self["spanmode"]
-
- @spanmode.setter
- def spanmode(self, val):
- self["spanmode"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.violin.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each sample value. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.violin.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.violin.unselected.
- Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.violin.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the width of the violin in data coordinates. If 0 (default
- value) the width is automatically selected based on the
- positions of other violin traces in the same subplot.
-
- 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
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x sample data or coordinates. See overview for more
- info.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Sets the x coordinate for single-box traces or the starting
- coordinate for multi-box traces set using q1/median/q3. See
- overview for more info.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y sample data or coordinates. See overview for more
- info.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Sets the y coordinate for single-box traces or the starting
- coordinate for multi-box traces set using q1/median/q3. See
- overview for more info.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- bandwidth
- Sets the bandwidth used to compute the kernel density
- estimate. By default, the bandwidth is determined by
- Silverman's rule of thumb.
- box
- :class:`plotly.graph_objects.violin.Box` instance or
- dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.violin.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual violins or
- sample points or the kernel density estimate or any
- combination of them?
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- jitter
- Sets the amount of jitter in the sample points drawn.
- If 0, the sample points align along the distribution
- axis. If 1, the sample points are drawn in a random
- jitter of width equal to the width of the violins.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.violin.Line` instance or
- dict with compatible properties
- marker
- :class:`plotly.graph_objects.violin.Marker` instance or
- dict with compatible properties
- meanline
- :class:`plotly.graph_objects.violin.Meanline` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover. For violin traces, the name
- will also be used for the position coordinate, if `x`
- and `x0` (`y` and `y0` if horizontal) are missing and
- the position axis is categorical. Note that the trace
- name is also used as a default value for attribute
- `scalegroup` (please see its description for details).
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the violin(s). If "v" ("h"),
- the distribution is visualized along the vertical
- (horizontal).
- pointpos
- Sets the position of the sample points in relation to
- the violins. If 0, the sample points are places over
- the center of the violins. Positive (negative) values
- correspond to positions to the right (left) for
- vertical violins and above (below) for horizontal
- violins.
- points
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier
- points are shown and points either less than 4*Q1-3*Q3
- or greater than 4*Q3-3*Q1 are highlighted (see
- `outliercolor`) If "all", all sample points are shown
- If False, only the violins are shown with no sample
- points. Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is
- set, otherwise defaults to "outliers".
- scalegroup
- If there are multiple violins that should be sized
- according to to some metric (see `scalemode`), link
- them by providing a non-empty group id here shared by
- every trace in the same group. If a violin's `width` is
- undefined, `scalegroup` will default to the trace's
- name. In this case, violins with the same names will be
- linked together
- scalemode
- Sets the metric by which the width of each violin is
- determined."width" means each violin has the same (max)
- width*count* means the violins are scaled by the number
- of sample points makingup each violin.
- selected
- :class:`plotly.graph_objects.violin.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- side
- Determines on which side of the position value the
- density function making up one half of a violin is
- plotted. Useful when comparing two violin traces under
- "overlay" mode, where one trace has `side` set to
- "positive" and the other to "negative".
- span
- Sets the span in data space for which the density
- function will be computed. Has an effect only when
- `spanmode` is set to "manual".
- spanmode
- Sets the method by which the span in data space where
- the density function will be computed. "soft" means the
- span goes from the sample's minimum value minus two
- bandwidths to the sample's maximum value plus two
- bandwidths. "hard" means the span goes from the
- sample's minimum to its maximum value. For custom span
- settings, use mode "manual" and fill in the `span`
- attribute.
- stream
- :class:`plotly.graph_objects.violin.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each sample
- value. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.violin.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the width of the violin in data coordinates. If 0
- (default value) the width is automatically selected
- based on the positions of other violin traces in the
- same subplot.
- x
- Sets the x sample data or coordinates. See overview for
- more info.
- x0
- Sets the x coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y sample data or coordinates. See overview for
- more info.
- y0
- Sets the y coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- bandwidth=None,
- box=None,
- customdata=None,
- customdatasrc=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- jitter=None,
- legendgroup=None,
- line=None,
- marker=None,
- meanline=None,
- meta=None,
- metasrc=None,
- name=None,
- offsetgroup=None,
- opacity=None,
- orientation=None,
- pointpos=None,
- points=None,
- scalegroup=None,
- scalemode=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- side=None,
- span=None,
- spanmode=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- width=None,
- x=None,
- x0=None,
- xaxis=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Violin object
-
- In vertical (horizontal) violin plots, statistics are computed
- using `y` (`x`) values. By supplying an `x` (`y`) array, one
- violin per distinct x (y) value is drawn If no `x` (`y`) list
- is provided, a single violin is drawn. That violin position is
- then positioned with with `name` or with `x0` (`y0`) if
- provided.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Violin`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- bandwidth
- Sets the bandwidth used to compute the kernel density
- estimate. By default, the bandwidth is determined by
- Silverman's rule of thumb.
- box
- :class:`plotly.graph_objects.violin.Box` instance or
- dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.violin.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual violins or
- sample points or the kernel density estimate or any
- combination of them?
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- jitter
- Sets the amount of jitter in the sample points drawn.
- If 0, the sample points align along the distribution
- axis. If 1, the sample points are drawn in a random
- jitter of width equal to the width of the violins.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.violin.Line` instance or
- dict with compatible properties
- marker
- :class:`plotly.graph_objects.violin.Marker` instance or
- dict with compatible properties
- meanline
- :class:`plotly.graph_objects.violin.Meanline` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover. For violin traces, the name
- will also be used for the position coordinate, if `x`
- and `x0` (`y` and `y0` if horizontal) are missing and
- the position axis is categorical. Note that the trace
- name is also used as a default value for attribute
- `scalegroup` (please see its description for details).
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the violin(s). If "v" ("h"),
- the distribution is visualized along the vertical
- (horizontal).
- pointpos
- Sets the position of the sample points in relation to
- the violins. If 0, the sample points are places over
- the center of the violins. Positive (negative) values
- correspond to positions to the right (left) for
- vertical violins and above (below) for horizontal
- violins.
- points
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier
- points are shown and points either less than 4*Q1-3*Q3
- or greater than 4*Q3-3*Q1 are highlighted (see
- `outliercolor`) If "all", all sample points are shown
- If False, only the violins are shown with no sample
- points. Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is
- set, otherwise defaults to "outliers".
- scalegroup
- If there are multiple violins that should be sized
- according to to some metric (see `scalemode`), link
- them by providing a non-empty group id here shared by
- every trace in the same group. If a violin's `width` is
- undefined, `scalegroup` will default to the trace's
- name. In this case, violins with the same names will be
- linked together
- scalemode
- Sets the metric by which the width of each violin is
- determined."width" means each violin has the same (max)
- width*count* means the violins are scaled by the number
- of sample points makingup each violin.
- selected
- :class:`plotly.graph_objects.violin.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- side
- Determines on which side of the position value the
- density function making up one half of a violin is
- plotted. Useful when comparing two violin traces under
- "overlay" mode, where one trace has `side` set to
- "positive" and the other to "negative".
- span
- Sets the span in data space for which the density
- function will be computed. Has an effect only when
- `spanmode` is set to "manual".
- spanmode
- Sets the method by which the span in data space where
- the density function will be computed. "soft" means the
- span goes from the sample's minimum value minus two
- bandwidths to the sample's maximum value plus two
- bandwidths. "hard" means the span goes from the
- sample's minimum to its maximum value. For custom span
- settings, use mode "manual" and fill in the `span`
- attribute.
- stream
- :class:`plotly.graph_objects.violin.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each sample
- value. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.violin.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the width of the violin in data coordinates. If 0
- (default value) the width is automatically selected
- based on the positions of other violin traces in the
- same subplot.
- x
- Sets the x sample data or coordinates. See overview for
- more info.
- x0
- Sets the x coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y sample data or coordinates. See overview for
- more info.
- y0
- Sets the y coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Violin
- """
- super(Violin, self).__init__("violin")
-
- # 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.Violin
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Violin`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import violin as v_violin
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_violin.AlignmentgroupValidator()
- self._validators["bandwidth"] = v_violin.BandwidthValidator()
- self._validators["box"] = v_violin.BoxValidator()
- self._validators["customdata"] = v_violin.CustomdataValidator()
- self._validators["customdatasrc"] = v_violin.CustomdatasrcValidator()
- self._validators["fillcolor"] = v_violin.FillcolorValidator()
- self._validators["hoverinfo"] = v_violin.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_violin.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_violin.HoverlabelValidator()
- self._validators["hoveron"] = v_violin.HoveronValidator()
- self._validators["hovertemplate"] = v_violin.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_violin.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_violin.HovertextValidator()
- self._validators["hovertextsrc"] = v_violin.HovertextsrcValidator()
- self._validators["ids"] = v_violin.IdsValidator()
- self._validators["idssrc"] = v_violin.IdssrcValidator()
- self._validators["jitter"] = v_violin.JitterValidator()
- self._validators["legendgroup"] = v_violin.LegendgroupValidator()
- self._validators["line"] = v_violin.LineValidator()
- self._validators["marker"] = v_violin.MarkerValidator()
- self._validators["meanline"] = v_violin.MeanlineValidator()
- self._validators["meta"] = v_violin.MetaValidator()
- self._validators["metasrc"] = v_violin.MetasrcValidator()
- self._validators["name"] = v_violin.NameValidator()
- self._validators["offsetgroup"] = v_violin.OffsetgroupValidator()
- self._validators["opacity"] = v_violin.OpacityValidator()
- self._validators["orientation"] = v_violin.OrientationValidator()
- self._validators["pointpos"] = v_violin.PointposValidator()
- self._validators["points"] = v_violin.PointsValidator()
- self._validators["scalegroup"] = v_violin.ScalegroupValidator()
- self._validators["scalemode"] = v_violin.ScalemodeValidator()
- self._validators["selected"] = v_violin.SelectedValidator()
- self._validators["selectedpoints"] = v_violin.SelectedpointsValidator()
- self._validators["showlegend"] = v_violin.ShowlegendValidator()
- self._validators["side"] = v_violin.SideValidator()
- self._validators["span"] = v_violin.SpanValidator()
- self._validators["spanmode"] = v_violin.SpanmodeValidator()
- self._validators["stream"] = v_violin.StreamValidator()
- self._validators["text"] = v_violin.TextValidator()
- self._validators["textsrc"] = v_violin.TextsrcValidator()
- self._validators["uid"] = v_violin.UidValidator()
- self._validators["uirevision"] = v_violin.UirevisionValidator()
- self._validators["unselected"] = v_violin.UnselectedValidator()
- self._validators["visible"] = v_violin.VisibleValidator()
- self._validators["width"] = v_violin.WidthValidator()
- self._validators["x"] = v_violin.XValidator()
- self._validators["x0"] = v_violin.X0Validator()
- self._validators["xaxis"] = v_violin.XAxisValidator()
- self._validators["xsrc"] = v_violin.XsrcValidator()
- self._validators["y"] = v_violin.YValidator()
- self._validators["y0"] = v_violin.Y0Validator()
- self._validators["yaxis"] = v_violin.YAxisValidator()
- self._validators["ysrc"] = v_violin.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("bandwidth", None)
- self["bandwidth"] = bandwidth if bandwidth is not None else _v
- _v = arg.pop("box", None)
- self["box"] = box if box is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("jitter", None)
- self["jitter"] = jitter if jitter is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meanline", None)
- self["meanline"] = meanline if meanline is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("pointpos", None)
- self["pointpos"] = pointpos if pointpos is not None else _v
- _v = arg.pop("points", None)
- self["points"] = points if points is not None else _v
- _v = arg.pop("scalegroup", None)
- self["scalegroup"] = scalegroup if scalegroup is not None else _v
- _v = arg.pop("scalemode", None)
- self["scalemode"] = scalemode if scalemode is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("side", None)
- self["side"] = side if side is not None else _v
- _v = arg.pop("span", None)
- self["span"] = span if span is not None else _v
- _v = arg.pop("spanmode", None)
- self["spanmode"] = spanmode if spanmode is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "violin"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="violin", val="violin"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Treemap(_BaseTraceType):
-
- # branchvalues
- # ------------
- @property
- def branchvalues(self):
- """
- Determines how the items in `values` are summed. When set to
- "total", items in `values` are taken to be value of all its
- descendants. When set to "remainder", items in `values`
- corresponding to the root and the branches sectors are taken to
- be the extra part not part of the sum of the values at their
- leaves.
-
- The 'branchvalues' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['remainder', 'total']
-
- Returns
- -------
- Any
- """
- return self["branchvalues"]
-
- @branchvalues.setter
- def branchvalues(self, val):
- self["branchvalues"] = val
-
- # count
- # -----
- @property
- def count(self):
- """
- Determines default for `values` when it is not provided, by
- inferring a 1 for each of the "leaves" and/or "branches",
- otherwise 0.
-
- The 'count' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['branches', 'leaves'] joined with '+' characters
- (e.g. 'branches+leaves')
-
- Returns
- -------
- Any
- """
- return self["count"]
-
- @count.setter
- def count(self, val):
- self["count"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = 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.treemap.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 treemap trace
- .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this treemap trace .
- x
- Sets the horizontal domain of this treemap
- trace (in plot fraction).
- y
- Sets the vertical domain of this treemap trace
- (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.treemap.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.treemap.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry` and `percentParent`. Anything contained in tag
- `` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each sector. If a
- single string, the same string appears for all data points. If
- an array of string, the items are mapped in order of this
- trace's sectors. To be seen, trace `hoverinfo` must contain a
- "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `textinfo` lying inside the sector.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.treemap.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # labels
- # ------
- @property
- def labels(self):
- """
- Sets the labels of each of the sectors.
-
- The 'labels' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["labels"]
-
- @labels.setter
- def labels(self, val):
- self["labels"] = val
-
- # labelssrc
- # ---------
- @property
- def labelssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for labels .
-
- The 'labelssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["labelssrc"]
-
- @labelssrc.setter
- def labelssrc(self, val):
- self["labelssrc"] = val
-
- # level
- # -----
- @property
- def level(self):
- """
- Sets the level from which this trace hierarchy is rendered. Set
- `level` to `''` to start from the root node in the hierarchy.
- Must be an "id" if `ids` is filled in, otherwise plotly
- attempts to find a matching item in `labels`.
-
- The 'level' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["level"]
-
- @level.setter
- def level(self, val):
- self["level"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if colorsis set to a numerical
- array. 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
- colors) or the bounds set in `marker.cmin` and
- `marker.cmax` Has an effect only if colorsis
- set to a numerical array. Defaults to `false`
- when `marker.cmin` and `marker.cmax` are set by
- the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if colorsis set to a numerical
- array. Value should have the same units as
- colors and if set, `marker.cmin` must be set as
- well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if colorsis set to a numerical array.
- Value should have the same units as colors. Has
- no effect when `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if colorsis set to a numerical
- array. Value should have the same units as
- colors and if set, `marker.cmax` must be set as
- well.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.treemap.marker.Col
- orBar` instance or dict with compatible
- properties
- colors
- Sets the color of each sector of this trace. If
- not specified, the default trace color set is
- used to pick the sector colors.
- colorscale
- Sets the colorscale. Has an effect only if
- colorsis set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorssrc
- Sets the source reference on Chart Studio Cloud
- for colors .
- depthfade
- Determines if the sector colors are faded
- towards the background from the leaves up to
- the headers. This option is unavailable when a
- `colorscale` is present, defaults to false when
- `marker.colors` is set, but otherwise defaults
- to true. When set to "reversed", the fading
- direction is inverted, that is the top elements
- within hierarchy are drawn with fully saturated
- colors while the leaves are faded towards the
- background color.
- line
- :class:`plotly.graph_objects.treemap.marker.Lin
- e` instance or dict with compatible properties
- pad
- :class:`plotly.graph_objects.treemap.marker.Pad
- ` instance or dict with compatible properties
- reversescale
- Reverses the color mapping if true. Has an
- effect only if colorsis set to a numerical
- array. If true, `marker.cmin` will correspond
- to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- colorsis set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.treemap.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # maxdepth
- # --------
- @property
- def maxdepth(self):
- """
- Sets the number of rendered sectors from any given `level`. Set
- `maxdepth` to "-1" to render all the levels in the hierarchy.
-
- The 'maxdepth' property is a integer and may be specified as:
- - An int (or float that will be cast to an int)
-
- Returns
- -------
- int
- """
- return self["maxdepth"]
-
- @maxdepth.setter
- def maxdepth(self, val):
- self["maxdepth"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `textinfo` lying outside the sector.
- This option refers to the root of the hierarchy presented on
- top left corner of a treemap graph. Please note that if a
- hierarchy has multiple root nodes, this option won't have any
- effect and `insidetextfont` would be used.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.treemap.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # parents
- # -------
- @property
- def parents(self):
- """
- Sets the parent sectors for each of the sectors. Empty string
- items '' are understood to reference the root node in the
- hierarchy. If `ids` is filled, `parents` items are understood
- to be "ids" themselves. When `ids` is not set, plotly attempts
- to find matching items in `labels`, but beware they must be
- unique.
-
- The 'parents' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["parents"]
-
- @parents.setter
- def parents(self, val):
- self["parents"] = val
-
- # parentssrc
- # ----------
- @property
- def parentssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for parents .
-
- The 'parentssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["parentssrc"]
-
- @parentssrc.setter
- def parentssrc(self, val):
- self["parentssrc"] = val
-
- # pathbar
- # -------
- @property
- def pathbar(self):
- """
- The 'pathbar' property is an instance of Pathbar
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Pathbar`
- - A dict of string/value properties that will be passed
- to the Pathbar constructor
-
- Supported dict properties:
-
- edgeshape
- Determines which shape is used for edges
- between `barpath` labels.
- side
- Determines on which side of the the treemap the
- `pathbar` should be presented.
- textfont
- Sets the font used inside `pathbar`.
- thickness
- Sets the thickness of `pathbar` (in px). If not
- specified the `pathbar.textfont.size` is used
- with 3 pixles extra padding on each side.
- visible
- Determines if the path bar is drawn i.e.
- outside the trace `domain` and with one pixel
- gap.
-
- Returns
- -------
- plotly.graph_objs.treemap.Pathbar
- """
- return self["pathbar"]
-
- @pathbar.setter
- def pathbar(self, val):
- self["pathbar"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.treemap.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each sector. If trace
- `textinfo` contains a "text" flag, these elements will be seen
- on the chart. If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in the
- hover labels.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `textinfo`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.treemap.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph.
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Sets the positions of the `text` elements.
-
- 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
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `currentPath`, `root`, `entry`,
- `percentRoot`, `percentEntry`, `percentParent`, `label` and
- `value`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # tiling
- # ------
- @property
- def tiling(self):
- """
- The 'tiling' property is an instance of Tiling
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.treemap.Tiling`
- - A dict of string/value properties that will be passed
- to the Tiling constructor
-
- Supported dict properties:
-
- flip
- Determines if the positions obtained from
- solver are flipped on each axis.
- packing
- Determines d3 treemap solver. For more info
- please refer to
- https://github.com/d3/d3-hierarchy#treemap-
- tiling
- pad
- Sets the inner padding (in px).
- squarifyratio
- When using "squarify" `packing` algorithm,
- according to https://github.com/d3/d3-hierarchy
- /blob/master/README.md#squarify_ratio this
- option specifies the desired aspect ratio of
- the generated rectangles. The ratio must be
- specified as a number greater than or equal to
- one. Note that the orientation of the generated
- rectangles (tall or wide) is not implied by the
- ratio; for example, a ratio of two will attempt
- to produce a mixture of rectangles whose
- width:height ratio is either 2:1 or 1:2. When
- using "squarify", unlike d3 which uses the
- Golden Ratio i.e. 1.618034, Plotly applies 1 to
- increase squares in treemap layouts.
-
- Returns
- -------
- plotly.graph_objs.treemap.Tiling
- """
- return self["tiling"]
-
- @tiling.setter
- def tiling(self, val):
- self["tiling"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # values
- # ------
- @property
- def values(self):
- """
- Sets the values associated with each of the sectors. Use with
- `branchvalues` to determine how the values are summed.
-
- The 'values' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["values"]
-
- @values.setter
- def values(self, val):
- self["values"] = val
-
- # valuessrc
- # ---------
- @property
- def valuessrc(self):
- """
- Sets the source reference on Chart Studio Cloud for values .
-
- The 'valuessrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuessrc"]
-
- @valuessrc.setter
- def valuessrc(self, val):
- self["valuessrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- branchvalues
- Determines how the items in `values` are summed. When
- set to "total", items in `values` are taken to be value
- of all its descendants. When set to "remainder", items
- in `values` corresponding to the root and the branches
- sectors are taken to be the extra part not part of the
- sum of the values at their leaves.
- count
- Determines default for `values` when it is not
- provided, by inferring a 1 for each of the "leaves"
- and/or "branches", otherwise 0.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.treemap.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.treemap.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `currentPath`, `root`,
- `entry`, `percentRoot`, `percentEntry` and
- `percentParent`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- labels
- Sets the labels of each of the sectors.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- level
- Sets the level from which this trace hierarchy is
- rendered. Set `level` to `''` to start from the root
- node in the hierarchy. Must be an "id" if `ids` is
- filled in, otherwise plotly attempts to find a matching
- item in `labels`.
- marker
- :class:`plotly.graph_objects.treemap.Marker` instance
- or dict with compatible properties
- maxdepth
- Sets the number of rendered sectors from any given
- `level`. Set `maxdepth` to "-1" to render all the
- levels in the hierarchy.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector. This option refers to the root of the hierarchy
- presented on top left corner of a treemap graph. Please
- note that if a hierarchy has multiple root nodes, this
- option won't have any effect and `insidetextfont` would
- be used.
- parents
- Sets the parent sectors for each of the sectors. Empty
- string items '' are understood to reference the root
- node in the hierarchy. If `ids` is filled, `parents`
- items are understood to be "ids" themselves. When `ids`
- is not set, plotly attempts to find matching items in
- `labels`, but beware they must be unique.
- parentssrc
- Sets the source reference on Chart Studio Cloud for
- parents .
- pathbar
- :class:`plotly.graph_objects.treemap.Pathbar` instance
- or dict with compatible properties
- stream
- :class:`plotly.graph_objects.treemap.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Sets the positions of the `text` elements.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry`, `percentParent`, `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tiling
- :class:`plotly.graph_objects.treemap.Tiling` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values associated with each of the sectors.
- Use with `branchvalues` to determine how the values are
- summed.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- branchvalues=None,
- count=None,
- customdata=None,
- customdatasrc=None,
- domain=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextfont=None,
- labels=None,
- labelssrc=None,
- level=None,
- marker=None,
- maxdepth=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- outsidetextfont=None,
- parents=None,
- parentssrc=None,
- pathbar=None,
- stream=None,
- text=None,
- textfont=None,
- textinfo=None,
- textposition=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- tiling=None,
- uid=None,
- uirevision=None,
- values=None,
- valuessrc=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Treemap object
-
- Visualize hierarchal data from leaves (and/or outer branches)
- towards root with rectangles. The treemap sectors are
- determined by the entries in "labels" or "ids" and in
- "parents".
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Treemap`
- branchvalues
- Determines how the items in `values` are summed. When
- set to "total", items in `values` are taken to be value
- of all its descendants. When set to "remainder", items
- in `values` corresponding to the root and the branches
- sectors are taken to be the extra part not part of the
- sum of the values at their leaves.
- count
- Determines default for `values` when it is not
- provided, by inferring a 1 for each of the "leaves"
- and/or "branches", otherwise 0.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.treemap.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.treemap.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `currentPath`, `root`,
- `entry`, `percentRoot`, `percentEntry` and
- `percentParent`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- labels
- Sets the labels of each of the sectors.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- level
- Sets the level from which this trace hierarchy is
- rendered. Set `level` to `''` to start from the root
- node in the hierarchy. Must be an "id" if `ids` is
- filled in, otherwise plotly attempts to find a matching
- item in `labels`.
- marker
- :class:`plotly.graph_objects.treemap.Marker` instance
- or dict with compatible properties
- maxdepth
- Sets the number of rendered sectors from any given
- `level`. Set `maxdepth` to "-1" to render all the
- levels in the hierarchy.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector. This option refers to the root of the hierarchy
- presented on top left corner of a treemap graph. Please
- note that if a hierarchy has multiple root nodes, this
- option won't have any effect and `insidetextfont` would
- be used.
- parents
- Sets the parent sectors for each of the sectors. Empty
- string items '' are understood to reference the root
- node in the hierarchy. If `ids` is filled, `parents`
- items are understood to be "ids" themselves. When `ids`
- is not set, plotly attempts to find matching items in
- `labels`, but beware they must be unique.
- parentssrc
- Sets the source reference on Chart Studio Cloud for
- parents .
- pathbar
- :class:`plotly.graph_objects.treemap.Pathbar` instance
- or dict with compatible properties
- stream
- :class:`plotly.graph_objects.treemap.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Sets the positions of the `text` elements.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry`, `percentParent`, `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tiling
- :class:`plotly.graph_objects.treemap.Tiling` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values associated with each of the sectors.
- Use with `branchvalues` to determine how the values are
- summed.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Treemap
- """
- super(Treemap, self).__init__("treemap")
-
- # 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.Treemap
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Treemap`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import treemap as v_treemap
-
- # Initialize validators
- # ---------------------
- self._validators["branchvalues"] = v_treemap.BranchvaluesValidator()
- self._validators["count"] = v_treemap.CountValidator()
- self._validators["customdata"] = v_treemap.CustomdataValidator()
- self._validators["customdatasrc"] = v_treemap.CustomdatasrcValidator()
- self._validators["domain"] = v_treemap.DomainValidator()
- self._validators["hoverinfo"] = v_treemap.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_treemap.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_treemap.HoverlabelValidator()
- self._validators["hovertemplate"] = v_treemap.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_treemap.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_treemap.HovertextValidator()
- self._validators["hovertextsrc"] = v_treemap.HovertextsrcValidator()
- self._validators["ids"] = v_treemap.IdsValidator()
- self._validators["idssrc"] = v_treemap.IdssrcValidator()
- self._validators["insidetextfont"] = v_treemap.InsidetextfontValidator()
- self._validators["labels"] = v_treemap.LabelsValidator()
- self._validators["labelssrc"] = v_treemap.LabelssrcValidator()
- self._validators["level"] = v_treemap.LevelValidator()
- self._validators["marker"] = v_treemap.MarkerValidator()
- self._validators["maxdepth"] = v_treemap.MaxdepthValidator()
- self._validators["meta"] = v_treemap.MetaValidator()
- self._validators["metasrc"] = v_treemap.MetasrcValidator()
- self._validators["name"] = v_treemap.NameValidator()
- self._validators["opacity"] = v_treemap.OpacityValidator()
- self._validators["outsidetextfont"] = v_treemap.OutsidetextfontValidator()
- self._validators["parents"] = v_treemap.ParentsValidator()
- self._validators["parentssrc"] = v_treemap.ParentssrcValidator()
- self._validators["pathbar"] = v_treemap.PathbarValidator()
- self._validators["stream"] = v_treemap.StreamValidator()
- self._validators["text"] = v_treemap.TextValidator()
- self._validators["textfont"] = v_treemap.TextfontValidator()
- self._validators["textinfo"] = v_treemap.TextinfoValidator()
- self._validators["textposition"] = v_treemap.TextpositionValidator()
- self._validators["textsrc"] = v_treemap.TextsrcValidator()
- self._validators["texttemplate"] = v_treemap.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_treemap.TexttemplatesrcValidator()
- self._validators["tiling"] = v_treemap.TilingValidator()
- self._validators["uid"] = v_treemap.UidValidator()
- self._validators["uirevision"] = v_treemap.UirevisionValidator()
- self._validators["values"] = v_treemap.ValuesValidator()
- self._validators["valuessrc"] = v_treemap.ValuessrcValidator()
- self._validators["visible"] = v_treemap.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("branchvalues", None)
- self["branchvalues"] = branchvalues if branchvalues is not None else _v
- _v = arg.pop("count", None)
- self["count"] = count if count is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("labels", None)
- self["labels"] = labels if labels is not None else _v
- _v = arg.pop("labelssrc", None)
- self["labelssrc"] = labelssrc if labelssrc is not None else _v
- _v = arg.pop("level", None)
- self["level"] = level if level is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("maxdepth", None)
- self["maxdepth"] = maxdepth if maxdepth is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("parents", None)
- self["parents"] = parents if parents is not None else _v
- _v = arg.pop("parentssrc", None)
- self["parentssrc"] = parentssrc if parentssrc is not None else _v
- _v = arg.pop("pathbar", None)
- self["pathbar"] = pathbar if pathbar is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("tiling", None)
- self["tiling"] = tiling if tiling is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("values", None)
- self["values"] = values if values is not None else _v
- _v = arg.pop("valuessrc", None)
- self["valuessrc"] = valuessrc if valuessrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "treemap"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="treemap", val="treemap"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Table(_BaseTraceType):
-
- # cells
- # -----
- @property
- def cells(self):
- """
- The 'cells' property is an instance of Cells
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.table.Cells`
- - A dict of string/value properties that will be passed
- to the Cells constructor
-
- Supported dict properties:
-
- align
- Sets the horizontal alignment of the `text`
- within the box. Has an effect only if `text`
- spans two or more lines (i.e. `text` contains
- one or more
HTML tags) or if an explicit
- width is set to override the text width.
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- fill
- :class:`plotly.graph_objects.table.cells.Fill`
- instance or dict with compatible properties
- font
- :class:`plotly.graph_objects.table.cells.Font`
- instance or dict with compatible properties
- format
- Sets the cell value formatting rule using d3
- formatting mini-language which is similar to
- those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- formatsrc
- Sets the source reference on Chart Studio Cloud
- for format .
- height
- The height of cells.
- line
- :class:`plotly.graph_objects.table.cells.Line`
- instance or dict with compatible properties
- prefix
- Prefix for cell values.
- prefixsrc
- Sets the source reference on Chart Studio Cloud
- for prefix .
- suffix
- Suffix for cell values.
- suffixsrc
- Sets the source reference on Chart Studio Cloud
- for suffix .
- values
- Cell values. `values[m][n]` represents the
- value of the `n`th point in column `m`,
- therefore the `values[m]` vector length for all
- columns must be the same (longer vectors will
- be truncated). Each value must be a finite
- number or a string.
- valuessrc
- Sets the source reference on Chart Studio Cloud
- for values .
-
- Returns
- -------
- plotly.graph_objs.table.Cells
- """
- return self["cells"]
-
- @cells.setter
- def cells(self, val):
- self["cells"] = val
-
- # columnorder
- # -----------
- @property
- def columnorder(self):
- """
- Specifies the rendered order of the data columns; for example,
- a value `2` at position `0` means that column index `0` in the
- data will be rendered as the third column, as columns have an
- index base of zero.
-
- The 'columnorder' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["columnorder"]
-
- @columnorder.setter
- def columnorder(self, val):
- self["columnorder"] = val
-
- # columnordersrc
- # --------------
- @property
- def columnordersrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- columnorder .
-
- The 'columnordersrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["columnordersrc"]
-
- @columnordersrc.setter
- def columnordersrc(self, val):
- self["columnordersrc"] = val
-
- # columnwidth
- # -----------
- @property
- def columnwidth(self):
- """
- The width of columns expressed as a ratio. Columns fill the
- available width in proportion of their specified column widths.
-
- The 'columnwidth' property is a number and may be specified as:
- - An int or float
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["columnwidth"]
-
- @columnwidth.setter
- def columnwidth(self, val):
- self["columnwidth"] = val
-
- # columnwidthsrc
- # --------------
- @property
- def columnwidthsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- columnwidth .
-
- The 'columnwidthsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["columnwidthsrc"]
-
- @columnwidthsrc.setter
- def columnwidthsrc(self, val):
- self["columnwidthsrc"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = 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.table.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 table trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this table trace .
- x
- Sets the horizontal domain of this table trace
- (in plot fraction).
- y
- Sets the vertical domain of this table trace
- (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.table.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # header
- # ------
- @property
- def header(self):
- """
- The 'header' property is an instance of Header
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.table.Header`
- - A dict of string/value properties that will be passed
- to the Header constructor
-
- Supported dict properties:
-
- align
- Sets the horizontal alignment of the `text`
- within the box. Has an effect only if `text`
- spans two or more lines (i.e. `text` contains
- one or more
HTML tags) or if an explicit
- width is set to override the text width.
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- fill
- :class:`plotly.graph_objects.table.header.Fill`
- instance or dict with compatible properties
- font
- :class:`plotly.graph_objects.table.header.Font`
- instance or dict with compatible properties
- format
- Sets the cell value formatting rule using d3
- formatting mini-language which is similar to
- those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- formatsrc
- Sets the source reference on Chart Studio Cloud
- for format .
- height
- The height of cells.
- line
- :class:`plotly.graph_objects.table.header.Line`
- instance or dict with compatible properties
- prefix
- Prefix for cell values.
- prefixsrc
- Sets the source reference on Chart Studio Cloud
- for prefix .
- suffix
- Suffix for cell values.
- suffixsrc
- Sets the source reference on Chart Studio Cloud
- for suffix .
- values
- Header cell values. `values[m][n]` represents
- the value of the `n`th point in column `m`,
- therefore the `values[m]` vector length for all
- columns must be the same (longer vectors will
- be truncated). Each value must be a finite
- number or a string.
- valuessrc
- Sets the source reference on Chart Studio Cloud
- for values .
-
- Returns
- -------
- plotly.graph_objs.table.Header
- """
- return self["header"]
-
- @header.setter
- def header(self, val):
- self["header"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.table.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.table.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.table.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.table.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- cells
- :class:`plotly.graph_objects.table.Cells` instance or
- dict with compatible properties
- columnorder
- Specifies the rendered order of the data columns; for
- example, a value `2` at position `0` means that column
- index `0` in the data will be rendered as the third
- column, as columns have an index base of zero.
- columnordersrc
- Sets the source reference on Chart Studio Cloud for
- columnorder .
- columnwidth
- The width of columns expressed as a ratio. Columns fill
- the available width in proportion of their specified
- column widths.
- columnwidthsrc
- Sets the source reference on Chart Studio Cloud for
- columnwidth .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.table.Domain` instance or
- dict with compatible properties
- header
- :class:`plotly.graph_objects.table.Header` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.table.Hoverlabel` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- stream
- :class:`plotly.graph_objects.table.Stream` instance or
- dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- cells=None,
- columnorder=None,
- columnordersrc=None,
- columnwidth=None,
- columnwidthsrc=None,
- customdata=None,
- customdatasrc=None,
- domain=None,
- header=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- ids=None,
- idssrc=None,
- meta=None,
- metasrc=None,
- name=None,
- stream=None,
- uid=None,
- uirevision=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Table object
-
- Table view for detailed data viewing. The data are arranged in
- a grid of rows and columns. Most styling can be specified for
- columns, rows or individual cells. Table is using a column-
- major order, ie. the grid is represented as a vector of column
- vectors.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Table`
- cells
- :class:`plotly.graph_objects.table.Cells` instance or
- dict with compatible properties
- columnorder
- Specifies the rendered order of the data columns; for
- example, a value `2` at position `0` means that column
- index `0` in the data will be rendered as the third
- column, as columns have an index base of zero.
- columnordersrc
- Sets the source reference on Chart Studio Cloud for
- columnorder .
- columnwidth
- The width of columns expressed as a ratio. Columns fill
- the available width in proportion of their specified
- column widths.
- columnwidthsrc
- Sets the source reference on Chart Studio Cloud for
- columnwidth .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.table.Domain` instance or
- dict with compatible properties
- header
- :class:`plotly.graph_objects.table.Header` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.table.Hoverlabel` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- stream
- :class:`plotly.graph_objects.table.Stream` instance or
- dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Table
- """
- super(Table, self).__init__("table")
-
- # 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.Table
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Table`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import table as v_table
-
- # Initialize validators
- # ---------------------
- self._validators["cells"] = v_table.CellsValidator()
- self._validators["columnorder"] = v_table.ColumnorderValidator()
- self._validators["columnordersrc"] = v_table.ColumnordersrcValidator()
- self._validators["columnwidth"] = v_table.ColumnwidthValidator()
- self._validators["columnwidthsrc"] = v_table.ColumnwidthsrcValidator()
- self._validators["customdata"] = v_table.CustomdataValidator()
- self._validators["customdatasrc"] = v_table.CustomdatasrcValidator()
- self._validators["domain"] = v_table.DomainValidator()
- self._validators["header"] = v_table.HeaderValidator()
- self._validators["hoverinfo"] = v_table.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_table.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_table.HoverlabelValidator()
- self._validators["ids"] = v_table.IdsValidator()
- self._validators["idssrc"] = v_table.IdssrcValidator()
- self._validators["meta"] = v_table.MetaValidator()
- self._validators["metasrc"] = v_table.MetasrcValidator()
- self._validators["name"] = v_table.NameValidator()
- self._validators["stream"] = v_table.StreamValidator()
- self._validators["uid"] = v_table.UidValidator()
- self._validators["uirevision"] = v_table.UirevisionValidator()
- self._validators["visible"] = v_table.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("cells", None)
- self["cells"] = cells if cells is not None else _v
- _v = arg.pop("columnorder", None)
- self["columnorder"] = columnorder if columnorder is not None else _v
- _v = arg.pop("columnordersrc", None)
- self["columnordersrc"] = columnordersrc if columnordersrc is not None else _v
- _v = arg.pop("columnwidth", None)
- self["columnwidth"] = columnwidth if columnwidth is not None else _v
- _v = arg.pop("columnwidthsrc", None)
- self["columnwidthsrc"] = columnwidthsrc if columnwidthsrc is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("header", None)
- self["header"] = header if header is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "table"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="table", val="table"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Surface(_BaseTraceType):
-
- # 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 z or surfacecolor) 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 z or surfacecolor 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 z or surfacecolor. 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 z or surfacecolor 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.surface.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.surface
- .colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.surface.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of surface.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.surface.colorbar.T
- itle` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- surface.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
- surface.colorbar.title.side instead. Determines
- the location of color bar's title with respect
- to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.surface.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the `z` data are filled in.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # contours
- # --------
- @property
- def contours(self):
- """
- The 'contours' property is an instance of Contours
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.surface.Contours`
- - A dict of string/value properties that will be passed
- to the Contours constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.surface.contours.X
- ` instance or dict with compatible properties
- y
- :class:`plotly.graph_objects.surface.contours.Y
- ` instance or dict with compatible properties
- z
- :class:`plotly.graph_objects.surface.contours.Z
- ` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.surface.Contours
- """
- return self["contours"]
-
- @contours.setter
- def contours(self, val):
- self["contours"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hidesurface
- # -----------
- @property
- def hidesurface(self):
- """
- Determines whether or not a surface is drawn. For example, set
- `hidesurface` to False `contours.x.show` to True and
- `contours.y.show` to True to draw a wire frame plot.
-
- The 'hidesurface' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["hidesurface"]
-
- @hidesurface.setter
- def hidesurface(self, val):
- self["hidesurface"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.surface.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.surface.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.surface.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
-
- Returns
- -------
- plotly.graph_objs.surface.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.surface.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.surface.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # opacityscale
- # ------------
- @property
- def opacityscale(self):
- """
- Sets the opacityscale. The opacityscale must be an array
- containing arrays mapping a normalized value to an opacity
- value. At minimum, a mapping for the lowest (0) and highest (1)
- values are required. For example, `[[0, 1], [0.5, 0.2], [1,
- 1]]` means that higher/lower values would have higher opacity
- values and those in the middle would be more transparent
- Alternatively, `opacityscale` may be a palette name string of
- the following list: 'min', 'max', 'extremes' and 'uniform'. The
- default is 'uniform'.
-
- The 'opacityscale' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["opacityscale"]
-
- @opacityscale.setter
- def opacityscale(self, val):
- self["opacityscale"] = 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.surface.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.surface.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # surfacecolor
- # ------------
- @property
- def surfacecolor(self):
- """
- Sets the surface color values, used for setting a color scale
- independent of `z`.
-
- The 'surfacecolor' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["surfacecolor"]
-
- @surfacecolor.setter
- def surfacecolor(self, val):
- self["surfacecolor"] = val
-
- # surfacecolorsrc
- # ---------------
- @property
- def surfacecolorsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- surfacecolor .
-
- The 'surfacecolorsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["surfacecolorsrc"]
-
- @surfacecolorsrc.setter
- def surfacecolorsrc(self, val):
- self["surfacecolorsrc"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z coordinates.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zcalendar
- # ---------
- @property
- def zcalendar(self):
- """
- Sets the calendar system to use with `z` date data.
-
- The 'zcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["zcalendar"]
-
- @zcalendar.setter
- def zcalendar(self, val):
- self["zcalendar"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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 z or surfacecolor)
- 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 z or surfacecolor 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 z or surfacecolor.
- Has no effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as z or surfacecolor and if set,
- `cmax` must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.surface.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in.
- contours
- :class:`plotly.graph_objects.surface.Contours` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hidesurface
- Determines whether or not a surface is drawn. For
- example, set `hidesurface` to False `contours.x.show`
- to True and `contours.y.show` to True to draw a wire
- frame plot.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.surface.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.surface.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.surface.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- opacityscale
- Sets the opacityscale. The opacityscale must be an
- array containing arrays mapping a normalized value to
- an opacity value. At minimum, a mapping for the lowest
- (0) and highest (1) values are required. For example,
- `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower
- values would have higher opacity values and those in
- the middle would be more transparent Alternatively,
- `opacityscale` may be a palette name string of the
- following list: 'min', 'max', 'extremes' and 'uniform'.
- The default is 'uniform'.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.surface.Stream` instance
- or dict with compatible properties
- surfacecolor
- Sets the surface color values, used for setting a color
- scale independent of `z`.
- surfacecolorsrc
- Sets the source reference on Chart Studio Cloud for
- surfacecolor .
- text
- Sets the text elements associated with each z value. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- connectgaps=None,
- contours=None,
- customdata=None,
- customdatasrc=None,
- hidesurface=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- opacityscale=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- stream=None,
- surfacecolor=None,
- surfacecolorsrc=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- ycalendar=None,
- ysrc=None,
- z=None,
- zcalendar=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Surface object
-
- The data the describes the coordinates of the surface is set in
- `z`. Data in `z` should be a 2D list. Coordinates in `x` and
- `y` can either be 1D lists or 2D lists (e.g. to graph
- parametric surfaces). If not provided in `x` and `y`, the x and
- y coordinates are assumed to be linear starting at 0 with a
- unit step. The color scale corresponds to the `z` values by
- default. For custom color scales, use `surfacecolor` which
- should be a 2D list, where its bounds can be controlled using
- `cmin` and `cmax`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Surface`
- 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 z or surfacecolor)
- 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 z or surfacecolor 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 z or surfacecolor.
- Has no effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as z or surfacecolor and if set,
- `cmax` must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.surface.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in.
- contours
- :class:`plotly.graph_objects.surface.Contours` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hidesurface
- Determines whether or not a surface is drawn. For
- example, set `hidesurface` to False `contours.x.show`
- to True and `contours.y.show` to True to draw a wire
- frame plot.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.surface.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.surface.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.surface.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- opacityscale
- Sets the opacityscale. The opacityscale must be an
- array containing arrays mapping a normalized value to
- an opacity value. At minimum, a mapping for the lowest
- (0) and highest (1) values are required. For example,
- `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower
- values would have higher opacity values and those in
- the middle would be more transparent Alternatively,
- `opacityscale` may be a palette name string of the
- following list: 'min', 'max', 'extremes' and 'uniform'.
- The default is 'uniform'.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.surface.Stream` instance
- or dict with compatible properties
- surfacecolor
- Sets the surface color values, used for setting a color
- scale independent of `z`.
- surfacecolorsrc
- Sets the source reference on Chart Studio Cloud for
- surfacecolor .
- text
- Sets the text elements associated with each z value. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Surface
- """
- super(Surface, self).__init__("surface")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Surface
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Surface`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import surface as v_surface
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_surface.AutocolorscaleValidator()
- self._validators["cauto"] = v_surface.CautoValidator()
- self._validators["cmax"] = v_surface.CmaxValidator()
- self._validators["cmid"] = v_surface.CmidValidator()
- self._validators["cmin"] = v_surface.CminValidator()
- self._validators["coloraxis"] = v_surface.ColoraxisValidator()
- self._validators["colorbar"] = v_surface.ColorBarValidator()
- self._validators["colorscale"] = v_surface.ColorscaleValidator()
- self._validators["connectgaps"] = v_surface.ConnectgapsValidator()
- self._validators["contours"] = v_surface.ContoursValidator()
- self._validators["customdata"] = v_surface.CustomdataValidator()
- self._validators["customdatasrc"] = v_surface.CustomdatasrcValidator()
- self._validators["hidesurface"] = v_surface.HidesurfaceValidator()
- self._validators["hoverinfo"] = v_surface.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_surface.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_surface.HoverlabelValidator()
- self._validators["hovertemplate"] = v_surface.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_surface.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_surface.HovertextValidator()
- self._validators["hovertextsrc"] = v_surface.HovertextsrcValidator()
- self._validators["ids"] = v_surface.IdsValidator()
- self._validators["idssrc"] = v_surface.IdssrcValidator()
- self._validators["legendgroup"] = v_surface.LegendgroupValidator()
- self._validators["lighting"] = v_surface.LightingValidator()
- self._validators["lightposition"] = v_surface.LightpositionValidator()
- self._validators["meta"] = v_surface.MetaValidator()
- self._validators["metasrc"] = v_surface.MetasrcValidator()
- self._validators["name"] = v_surface.NameValidator()
- self._validators["opacity"] = v_surface.OpacityValidator()
- self._validators["opacityscale"] = v_surface.OpacityscaleValidator()
- self._validators["reversescale"] = v_surface.ReversescaleValidator()
- self._validators["scene"] = v_surface.SceneValidator()
- self._validators["showlegend"] = v_surface.ShowlegendValidator()
- self._validators["showscale"] = v_surface.ShowscaleValidator()
- self._validators["stream"] = v_surface.StreamValidator()
- self._validators["surfacecolor"] = v_surface.SurfacecolorValidator()
- self._validators["surfacecolorsrc"] = v_surface.SurfacecolorsrcValidator()
- self._validators["text"] = v_surface.TextValidator()
- self._validators["textsrc"] = v_surface.TextsrcValidator()
- self._validators["uid"] = v_surface.UidValidator()
- self._validators["uirevision"] = v_surface.UirevisionValidator()
- self._validators["visible"] = v_surface.VisibleValidator()
- self._validators["x"] = v_surface.XValidator()
- self._validators["xcalendar"] = v_surface.XcalendarValidator()
- self._validators["xsrc"] = v_surface.XsrcValidator()
- self._validators["y"] = v_surface.YValidator()
- self._validators["ycalendar"] = v_surface.YcalendarValidator()
- self._validators["ysrc"] = v_surface.YsrcValidator()
- self._validators["z"] = v_surface.ZValidator()
- self._validators["zcalendar"] = v_surface.ZcalendarValidator()
- self._validators["zsrc"] = v_surface.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("contours", None)
- self["contours"] = contours if contours is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hidesurface", None)
- self["hidesurface"] = hidesurface if hidesurface is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("opacityscale", None)
- self["opacityscale"] = opacityscale if opacityscale is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("surfacecolor", None)
- self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v
- _v = arg.pop("surfacecolorsrc", None)
- self["surfacecolorsrc"] = surfacecolorsrc if surfacecolorsrc is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zcalendar", None)
- self["zcalendar"] = zcalendar if zcalendar is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "surface"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="surface", val="surface"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Sunburst(_BaseTraceType):
-
- # branchvalues
- # ------------
- @property
- def branchvalues(self):
- """
- Determines how the items in `values` are summed. When set to
- "total", items in `values` are taken to be value of all its
- descendants. When set to "remainder", items in `values`
- corresponding to the root and the branches sectors are taken to
- be the extra part not part of the sum of the values at their
- leaves.
-
- The 'branchvalues' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['remainder', 'total']
-
- Returns
- -------
- Any
- """
- return self["branchvalues"]
-
- @branchvalues.setter
- def branchvalues(self, val):
- self["branchvalues"] = val
-
- # count
- # -----
- @property
- def count(self):
- """
- Determines default for `values` when it is not provided, by
- inferring a 1 for each of the "leaves" and/or "branches",
- otherwise 0.
-
- The 'count' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['branches', 'leaves'] joined with '+' characters
- (e.g. 'branches+leaves')
-
- Returns
- -------
- Any
- """
- return self["count"]
-
- @count.setter
- def count(self, val):
- self["count"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = 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.sunburst.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 sunburst trace
- .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this sunburst trace .
- x
- Sets the horizontal domain of this sunburst
- trace (in plot fraction).
- y
- Sets the vertical domain of this sunburst trace
- (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.sunburst.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.sunburst.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry` and `percentParent`. Anything contained in tag
- `` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each sector. If a
- single string, the same string appears for all data points. If
- an array of string, the items are mapped in order of this
- trace's sectors. To be seen, trace `hoverinfo` must contain a
- "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `textinfo` lying inside the sector.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.sunburst.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # insidetextorientation
- # ---------------------
- @property
- def insidetextorientation(self):
- """
- Controls the orientation of the text inside chart sectors. When
- set to "auto", text may be oriented in any direction in order
- to be as big as possible in the middle of a sector. The
- "horizontal" option orients text to be parallel with the bottom
- of the chart, and may make text smaller in order to achieve
- that goal. The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text perpendicular
- to the radius of the sector.
-
- The 'insidetextorientation' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['horizontal', 'radial', 'tangential', 'auto']
-
- Returns
- -------
- Any
- """
- return self["insidetextorientation"]
-
- @insidetextorientation.setter
- def insidetextorientation(self, val):
- self["insidetextorientation"] = val
-
- # labels
- # ------
- @property
- def labels(self):
- """
- Sets the labels of each of the sectors.
-
- The 'labels' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["labels"]
-
- @labels.setter
- def labels(self, val):
- self["labels"] = val
-
- # labelssrc
- # ---------
- @property
- def labelssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for labels .
-
- The 'labelssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["labelssrc"]
-
- @labelssrc.setter
- def labelssrc(self, val):
- self["labelssrc"] = val
-
- # leaf
- # ----
- @property
- def leaf(self):
- """
- The 'leaf' property is an instance of Leaf
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Leaf`
- - A dict of string/value properties that will be passed
- to the Leaf constructor
-
- Supported dict properties:
-
- opacity
- Sets the opacity of the leaves. With colorscale
- it is defaulted to 1; otherwise it is defaulted
- to 0.7
-
- Returns
- -------
- plotly.graph_objs.sunburst.Leaf
- """
- return self["leaf"]
-
- @leaf.setter
- def leaf(self, val):
- self["leaf"] = val
-
- # level
- # -----
- @property
- def level(self):
- """
- Sets the level from which this trace hierarchy is rendered. Set
- `level` to `''` to start from the root node in the hierarchy.
- Must be an "id" if `ids` is filled in, otherwise plotly
- attempts to find a matching item in `labels`.
-
- The 'level' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["level"]
-
- @level.setter
- def level(self, val):
- self["level"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if colorsis set to a numerical
- array. 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
- colors) or the bounds set in `marker.cmin` and
- `marker.cmax` Has an effect only if colorsis
- set to a numerical array. Defaults to `false`
- when `marker.cmin` and `marker.cmax` are set by
- the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if colorsis set to a numerical
- array. Value should have the same units as
- colors and if set, `marker.cmin` must be set as
- well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if colorsis set to a numerical array.
- Value should have the same units as colors. Has
- no effect when `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if colorsis set to a numerical
- array. Value should have the same units as
- colors and if set, `marker.cmax` must be set as
- well.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.sunburst.marker.Co
- lorBar` instance or dict with compatible
- properties
- colors
- Sets the color of each sector of this trace. If
- not specified, the default trace color set is
- used to pick the sector colors.
- colorscale
- Sets the colorscale. Has an effect only if
- colorsis set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorssrc
- Sets the source reference on Chart Studio Cloud
- for colors .
- line
- :class:`plotly.graph_objects.sunburst.marker.Li
- ne` instance or dict with compatible properties
- reversescale
- Reverses the color mapping if true. Has an
- effect only if colorsis set to a numerical
- array. If true, `marker.cmin` will correspond
- to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- colorsis set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.sunburst.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # maxdepth
- # --------
- @property
- def maxdepth(self):
- """
- Sets the number of rendered sectors from any given `level`. Set
- `maxdepth` to "-1" to render all the levels in the hierarchy.
-
- The 'maxdepth' property is a integer and may be specified as:
- - An int (or float that will be cast to an int)
-
- Returns
- -------
- int
- """
- return self["maxdepth"]
-
- @maxdepth.setter
- def maxdepth(self, val):
- self["maxdepth"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `textinfo` lying outside the sector.
- This option refers to the root of the hierarchy presented at
- the center of a sunburst graph. Please note that if a hierarchy
- has multiple root nodes, this option won't have any effect and
- `insidetextfont` would be used.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.sunburst.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # parents
- # -------
- @property
- def parents(self):
- """
- Sets the parent sectors for each of the sectors. Empty string
- items '' are understood to reference the root node in the
- hierarchy. If `ids` is filled, `parents` items are understood
- to be "ids" themselves. When `ids` is not set, plotly attempts
- to find matching items in `labels`, but beware they must be
- unique.
-
- The 'parents' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["parents"]
-
- @parents.setter
- def parents(self, val):
- self["parents"] = val
-
- # parentssrc
- # ----------
- @property
- def parentssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for parents .
-
- The 'parentssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["parentssrc"]
-
- @parentssrc.setter
- def parentssrc(self, val):
- self["parentssrc"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.sunburst.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each sector. If trace
- `textinfo` contains a "text" flag, these elements will be seen
- on the chart. If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in the
- hover labels.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `textinfo`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sunburst.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.sunburst.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph.
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `currentPath`, `root`, `entry`,
- `percentRoot`, `percentEntry`, `percentParent`, `label` and
- `value`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # values
- # ------
- @property
- def values(self):
- """
- Sets the values associated with each of the sectors. Use with
- `branchvalues` to determine how the values are summed.
-
- The 'values' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["values"]
-
- @values.setter
- def values(self, val):
- self["values"] = val
-
- # valuessrc
- # ---------
- @property
- def valuessrc(self):
- """
- Sets the source reference on Chart Studio Cloud for values .
-
- The 'valuessrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuessrc"]
-
- @valuessrc.setter
- def valuessrc(self, val):
- self["valuessrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- branchvalues
- Determines how the items in `values` are summed. When
- set to "total", items in `values` are taken to be value
- of all its descendants. When set to "remainder", items
- in `values` corresponding to the root and the branches
- sectors are taken to be the extra part not part of the
- sum of the values at their leaves.
- count
- Determines default for `values` when it is not
- provided, by inferring a 1 for each of the "leaves"
- and/or "branches", otherwise 0.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.sunburst.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.sunburst.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `currentPath`, `root`,
- `entry`, `percentRoot`, `percentEntry` and
- `percentParent`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- insidetextorientation
- Controls the orientation of the text inside chart
- sectors. When set to "auto", text may be oriented in
- any direction in order to be as big as possible in the
- middle of a sector. The "horizontal" option orients
- text to be parallel with the bottom of the chart, and
- may make text smaller in order to achieve that goal.
- The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text
- perpendicular to the radius of the sector.
- labels
- Sets the labels of each of the sectors.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- leaf
- :class:`plotly.graph_objects.sunburst.Leaf` instance or
- dict with compatible properties
- level
- Sets the level from which this trace hierarchy is
- rendered. Set `level` to `''` to start from the root
- node in the hierarchy. Must be an "id" if `ids` is
- filled in, otherwise plotly attempts to find a matching
- item in `labels`.
- marker
- :class:`plotly.graph_objects.sunburst.Marker` instance
- or dict with compatible properties
- maxdepth
- Sets the number of rendered sectors from any given
- `level`. Set `maxdepth` to "-1" to render all the
- levels in the hierarchy.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector. This option refers to the root of the hierarchy
- presented at the center of a sunburst graph. Please
- note that if a hierarchy has multiple root nodes, this
- option won't have any effect and `insidetextfont` would
- be used.
- parents
- Sets the parent sectors for each of the sectors. Empty
- string items '' are understood to reference the root
- node in the hierarchy. If `ids` is filled, `parents`
- items are understood to be "ids" themselves. When `ids`
- is not set, plotly attempts to find matching items in
- `labels`, but beware they must be unique.
- parentssrc
- Sets the source reference on Chart Studio Cloud for
- parents .
- stream
- :class:`plotly.graph_objects.sunburst.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry`, `percentParent`, `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values associated with each of the sectors.
- Use with `branchvalues` to determine how the values are
- summed.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- branchvalues=None,
- count=None,
- customdata=None,
- customdatasrc=None,
- domain=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextfont=None,
- insidetextorientation=None,
- labels=None,
- labelssrc=None,
- leaf=None,
- level=None,
- marker=None,
- maxdepth=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- outsidetextfont=None,
- parents=None,
- parentssrc=None,
- stream=None,
- text=None,
- textfont=None,
- textinfo=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- values=None,
- valuessrc=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Sunburst object
-
- Visualize hierarchal data spanning outward radially from root
- to leaves. The sunburst sectors are determined by the entries
- in "labels" or "ids" and in "parents".
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Sunburst`
- branchvalues
- Determines how the items in `values` are summed. When
- set to "total", items in `values` are taken to be value
- of all its descendants. When set to "remainder", items
- in `values` corresponding to the root and the branches
- sectors are taken to be the extra part not part of the
- sum of the values at their leaves.
- count
- Determines default for `values` when it is not
- provided, by inferring a 1 for each of the "leaves"
- and/or "branches", otherwise 0.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.sunburst.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.sunburst.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `currentPath`, `root`,
- `entry`, `percentRoot`, `percentEntry` and
- `percentParent`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- insidetextorientation
- Controls the orientation of the text inside chart
- sectors. When set to "auto", text may be oriented in
- any direction in order to be as big as possible in the
- middle of a sector. The "horizontal" option orients
- text to be parallel with the bottom of the chart, and
- may make text smaller in order to achieve that goal.
- The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text
- perpendicular to the radius of the sector.
- labels
- Sets the labels of each of the sectors.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- leaf
- :class:`plotly.graph_objects.sunburst.Leaf` instance or
- dict with compatible properties
- level
- Sets the level from which this trace hierarchy is
- rendered. Set `level` to `''` to start from the root
- node in the hierarchy. Must be an "id" if `ids` is
- filled in, otherwise plotly attempts to find a matching
- item in `labels`.
- marker
- :class:`plotly.graph_objects.sunburst.Marker` instance
- or dict with compatible properties
- maxdepth
- Sets the number of rendered sectors from any given
- `level`. Set `maxdepth` to "-1" to render all the
- levels in the hierarchy.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector. This option refers to the root of the hierarchy
- presented at the center of a sunburst graph. Please
- note that if a hierarchy has multiple root nodes, this
- option won't have any effect and `insidetextfont` would
- be used.
- parents
- Sets the parent sectors for each of the sectors. Empty
- string items '' are understood to reference the root
- node in the hierarchy. If `ids` is filled, `parents`
- items are understood to be "ids" themselves. When `ids`
- is not set, plotly attempts to find matching items in
- `labels`, but beware they must be unique.
- parentssrc
- Sets the source reference on Chart Studio Cloud for
- parents .
- stream
- :class:`plotly.graph_objects.sunburst.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `currentPath`, `root`, `entry`, `percentRoot`,
- `percentEntry`, `percentParent`, `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values associated with each of the sectors.
- Use with `branchvalues` to determine how the values are
- summed.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Sunburst
- """
- super(Sunburst, self).__init__("sunburst")
-
- # 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.Sunburst
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Sunburst`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import sunburst as v_sunburst
-
- # Initialize validators
- # ---------------------
- self._validators["branchvalues"] = v_sunburst.BranchvaluesValidator()
- self._validators["count"] = v_sunburst.CountValidator()
- self._validators["customdata"] = v_sunburst.CustomdataValidator()
- self._validators["customdatasrc"] = v_sunburst.CustomdatasrcValidator()
- self._validators["domain"] = v_sunburst.DomainValidator()
- self._validators["hoverinfo"] = v_sunburst.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_sunburst.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_sunburst.HoverlabelValidator()
- self._validators["hovertemplate"] = v_sunburst.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_sunburst.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_sunburst.HovertextValidator()
- self._validators["hovertextsrc"] = v_sunburst.HovertextsrcValidator()
- self._validators["ids"] = v_sunburst.IdsValidator()
- self._validators["idssrc"] = v_sunburst.IdssrcValidator()
- self._validators["insidetextfont"] = v_sunburst.InsidetextfontValidator()
- self._validators[
- "insidetextorientation"
- ] = v_sunburst.InsidetextorientationValidator()
- self._validators["labels"] = v_sunburst.LabelsValidator()
- self._validators["labelssrc"] = v_sunburst.LabelssrcValidator()
- self._validators["leaf"] = v_sunburst.LeafValidator()
- self._validators["level"] = v_sunburst.LevelValidator()
- self._validators["marker"] = v_sunburst.MarkerValidator()
- self._validators["maxdepth"] = v_sunburst.MaxdepthValidator()
- self._validators["meta"] = v_sunburst.MetaValidator()
- self._validators["metasrc"] = v_sunburst.MetasrcValidator()
- self._validators["name"] = v_sunburst.NameValidator()
- self._validators["opacity"] = v_sunburst.OpacityValidator()
- self._validators["outsidetextfont"] = v_sunburst.OutsidetextfontValidator()
- self._validators["parents"] = v_sunburst.ParentsValidator()
- self._validators["parentssrc"] = v_sunburst.ParentssrcValidator()
- self._validators["stream"] = v_sunburst.StreamValidator()
- self._validators["text"] = v_sunburst.TextValidator()
- self._validators["textfont"] = v_sunburst.TextfontValidator()
- self._validators["textinfo"] = v_sunburst.TextinfoValidator()
- self._validators["textsrc"] = v_sunburst.TextsrcValidator()
- self._validators["texttemplate"] = v_sunburst.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_sunburst.TexttemplatesrcValidator()
- self._validators["uid"] = v_sunburst.UidValidator()
- self._validators["uirevision"] = v_sunburst.UirevisionValidator()
- self._validators["values"] = v_sunburst.ValuesValidator()
- self._validators["valuessrc"] = v_sunburst.ValuessrcValidator()
- self._validators["visible"] = v_sunburst.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("branchvalues", None)
- self["branchvalues"] = branchvalues if branchvalues is not None else _v
- _v = arg.pop("count", None)
- self["count"] = count if count is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("insidetextorientation", None)
- self["insidetextorientation"] = (
- insidetextorientation if insidetextorientation is not None else _v
- )
- _v = arg.pop("labels", None)
- self["labels"] = labels if labels is not None else _v
- _v = arg.pop("labelssrc", None)
- self["labelssrc"] = labelssrc if labelssrc is not None else _v
- _v = arg.pop("leaf", None)
- self["leaf"] = leaf if leaf is not None else _v
- _v = arg.pop("level", None)
- self["level"] = level if level is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("maxdepth", None)
- self["maxdepth"] = maxdepth if maxdepth is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("parents", None)
- self["parents"] = parents if parents is not None else _v
- _v = arg.pop("parentssrc", None)
- self["parentssrc"] = parentssrc if parentssrc is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("values", None)
- self["values"] = values if values is not None else _v
- _v = arg.pop("valuessrc", None)
- self["valuessrc"] = valuessrc if valuessrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "sunburst"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="sunburst", val="sunburst"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Streamtube(_BaseTraceType):
-
- # 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. 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 u/v/w norm 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.streamtube.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.streamt
- ube.colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.streamtube.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of streamtube.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.streamtube.colorba
- r.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- streamtube.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
- streamtube.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.streamtube.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.streamtube.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.streamtube.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `tubex`, `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`,
- `norm` and `divergence`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.streamtube.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- facenormalsepsilon
- Epsilon for face normals calculation avoids
- math issues arising from degenerate geometry.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
- vertexnormalsepsilon
- Epsilon for vertex normals calculation avoids
- math issues arising from degenerate geometry.
-
- Returns
- -------
- plotly.graph_objs.streamtube.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.streamtube.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.streamtube.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # maxdisplayed
- # ------------
- @property
- def maxdisplayed(self):
- """
- The maximum number of displayed segments in a streamtube.
-
- The 'maxdisplayed' 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["maxdisplayed"]
-
- @maxdisplayed.setter
- def maxdisplayed(self, val):
- self["maxdisplayed"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # sizeref
- # -------
- @property
- def sizeref(self):
- """
- The scaling factor for the streamtubes. The default is 1, which
- avoids two max divergence tubes from touching at adjacent
- starting positions.
-
- The 'sizeref' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["sizeref"]
-
- @sizeref.setter
- def sizeref(self, val):
- self["sizeref"] = val
-
- # starts
- # ------
- @property
- def starts(self):
- """
- The 'starts' property is an instance of Starts
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.streamtube.Starts`
- - A dict of string/value properties that will be passed
- to the Starts constructor
-
- Supported dict properties:
-
- x
- Sets the x components of the starting position
- of the streamtubes
- xsrc
- Sets the source reference on Chart Studio Cloud
- for x .
- y
- Sets the y components of the starting position
- of the streamtubes
- ysrc
- Sets the source reference on Chart Studio Cloud
- for y .
- z
- Sets the z components of the starting position
- of the streamtubes
- zsrc
- Sets the source reference on Chart Studio Cloud
- for z .
-
- Returns
- -------
- plotly.graph_objs.streamtube.Starts
- """
- return self["starts"]
-
- @starts.setter
- def starts(self, val):
- self["starts"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.streamtube.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.streamtube.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets a text element associated with this trace. If trace
- `hoverinfo` contains a "text" flag, this text element will be
- seen in all hover labels. Note that streamtube traces do not
- support array `text` values.
-
- 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
-
- # u
- # -
- @property
- def u(self):
- """
- Sets the x components of the vector field.
-
- The 'u' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["u"]
-
- @u.setter
- def u(self, val):
- self["u"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # usrc
- # ----
- @property
- def usrc(self):
- """
- Sets the source reference on Chart Studio Cloud for u .
-
- The 'usrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["usrc"]
-
- @usrc.setter
- def usrc(self, val):
- self["usrc"] = val
-
- # v
- # -
- @property
- def v(self):
- """
- Sets the y components of the vector field.
-
- The 'v' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["v"]
-
- @v.setter
- def v(self, val):
- self["v"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # vsrc
- # ----
- @property
- def vsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for v .
-
- The 'vsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["vsrc"]
-
- @vsrc.setter
- def vsrc(self, val):
- self["vsrc"] = val
-
- # w
- # -
- @property
- def w(self):
- """
- Sets the z components of the vector field.
-
- The 'w' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["w"]
-
- @w.setter
- def w(self, val):
- self["w"] = val
-
- # wsrc
- # ----
- @property
- def wsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for w .
-
- The 'wsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["wsrc"]
-
- @wsrc.setter
- def wsrc(self, val):
- self["wsrc"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates of the vector field.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates of the vector field.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z coordinates of the vector field.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as u/v/w norm and if set, `cmax`
- must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.streamtube.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.streamtube.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `tubex`, `tubey`, `tubez`,
- `tubeu`, `tubev`, `tubew`, `norm` and `divergence`.
- Anything contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.streamtube.Lighting`
- instance or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.streamtube.Lightposition`
- instance or dict with compatible properties
- maxdisplayed
- The maximum number of displayed segments in a
- streamtube.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- sizeref
- The scaling factor for the streamtubes. The default is
- 1, which avoids two max divergence tubes from touching
- at adjacent starting positions.
- starts
- :class:`plotly.graph_objects.streamtube.Starts`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.streamtube.Stream`
- instance or dict with compatible properties
- text
- Sets a text element associated with this trace. If
- trace `hoverinfo` contains a "text" flag, this text
- element will be seen in all hover labels. Note that
- streamtube traces do not support array `text` values.
- u
- Sets the x components of the vector field.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- usrc
- Sets the source reference on Chart Studio Cloud for u
- .
- v
- Sets the y components of the vector field.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- vsrc
- Sets the source reference on Chart Studio Cloud for v
- .
- w
- Sets the z components of the vector field.
- wsrc
- Sets the source reference on Chart Studio Cloud for w
- .
- x
- Sets the x coordinates of the vector field.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates of the vector field.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates of the vector field.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- maxdisplayed=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- sizeref=None,
- starts=None,
- stream=None,
- text=None,
- u=None,
- uid=None,
- uirevision=None,
- usrc=None,
- v=None,
- visible=None,
- vsrc=None,
- w=None,
- wsrc=None,
- x=None,
- xsrc=None,
- y=None,
- ysrc=None,
- z=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Streamtube object
-
- Use a streamtube trace to visualize flow in a vector field.
- Specify a vector field using 6 1D arrays of equal length, 3
- position arrays `x`, `y` and `z` and 3 vector component arrays
- `u`, `v`, and `w`. By default, the tubes' starting positions
- will be cut from the vector field's x-z plane at its minimum y
- value. To specify your own starting position, use attributes
- `starts.x`, `starts.y` and `starts.z`. The color is encoded by
- the norm of (u, v, w), and the local radius by the divergence
- of (u, v, w).
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Streamtube`
- 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as u/v/w norm and if set, `cmax`
- must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.streamtube.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.streamtube.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `tubex`, `tubey`, `tubez`,
- `tubeu`, `tubev`, `tubew`, `norm` and `divergence`.
- Anything contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.streamtube.Lighting`
- instance or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.streamtube.Lightposition`
- instance or dict with compatible properties
- maxdisplayed
- The maximum number of displayed segments in a
- streamtube.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- sizeref
- The scaling factor for the streamtubes. The default is
- 1, which avoids two max divergence tubes from touching
- at adjacent starting positions.
- starts
- :class:`plotly.graph_objects.streamtube.Starts`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.streamtube.Stream`
- instance or dict with compatible properties
- text
- Sets a text element associated with this trace. If
- trace `hoverinfo` contains a "text" flag, this text
- element will be seen in all hover labels. Note that
- streamtube traces do not support array `text` values.
- u
- Sets the x components of the vector field.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- usrc
- Sets the source reference on Chart Studio Cloud for u
- .
- v
- Sets the y components of the vector field.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- vsrc
- Sets the source reference on Chart Studio Cloud for v
- .
- w
- Sets the z components of the vector field.
- wsrc
- Sets the source reference on Chart Studio Cloud for w
- .
- x
- Sets the x coordinates of the vector field.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates of the vector field.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates of the vector field.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Streamtube
- """
- super(Streamtube, self).__init__("streamtube")
-
- # 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.Streamtube
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Streamtube`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import streamtube as v_streamtube
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_streamtube.AutocolorscaleValidator()
- self._validators["cauto"] = v_streamtube.CautoValidator()
- self._validators["cmax"] = v_streamtube.CmaxValidator()
- self._validators["cmid"] = v_streamtube.CmidValidator()
- self._validators["cmin"] = v_streamtube.CminValidator()
- self._validators["coloraxis"] = v_streamtube.ColoraxisValidator()
- self._validators["colorbar"] = v_streamtube.ColorBarValidator()
- self._validators["colorscale"] = v_streamtube.ColorscaleValidator()
- self._validators["customdata"] = v_streamtube.CustomdataValidator()
- self._validators["customdatasrc"] = v_streamtube.CustomdatasrcValidator()
- self._validators["hoverinfo"] = v_streamtube.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_streamtube.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_streamtube.HoverlabelValidator()
- self._validators["hovertemplate"] = v_streamtube.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_streamtube.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_streamtube.HovertextValidator()
- self._validators["ids"] = v_streamtube.IdsValidator()
- self._validators["idssrc"] = v_streamtube.IdssrcValidator()
- self._validators["legendgroup"] = v_streamtube.LegendgroupValidator()
- self._validators["lighting"] = v_streamtube.LightingValidator()
- self._validators["lightposition"] = v_streamtube.LightpositionValidator()
- self._validators["maxdisplayed"] = v_streamtube.MaxdisplayedValidator()
- self._validators["meta"] = v_streamtube.MetaValidator()
- self._validators["metasrc"] = v_streamtube.MetasrcValidator()
- self._validators["name"] = v_streamtube.NameValidator()
- self._validators["opacity"] = v_streamtube.OpacityValidator()
- self._validators["reversescale"] = v_streamtube.ReversescaleValidator()
- self._validators["scene"] = v_streamtube.SceneValidator()
- self._validators["showlegend"] = v_streamtube.ShowlegendValidator()
- self._validators["showscale"] = v_streamtube.ShowscaleValidator()
- self._validators["sizeref"] = v_streamtube.SizerefValidator()
- self._validators["starts"] = v_streamtube.StartsValidator()
- self._validators["stream"] = v_streamtube.StreamValidator()
- self._validators["text"] = v_streamtube.TextValidator()
- self._validators["u"] = v_streamtube.UValidator()
- self._validators["uid"] = v_streamtube.UidValidator()
- self._validators["uirevision"] = v_streamtube.UirevisionValidator()
- self._validators["usrc"] = v_streamtube.UsrcValidator()
- self._validators["v"] = v_streamtube.VValidator()
- self._validators["visible"] = v_streamtube.VisibleValidator()
- self._validators["vsrc"] = v_streamtube.VsrcValidator()
- self._validators["w"] = v_streamtube.WValidator()
- self._validators["wsrc"] = v_streamtube.WsrcValidator()
- self._validators["x"] = v_streamtube.XValidator()
- self._validators["xsrc"] = v_streamtube.XsrcValidator()
- self._validators["y"] = v_streamtube.YValidator()
- self._validators["ysrc"] = v_streamtube.YsrcValidator()
- self._validators["z"] = v_streamtube.ZValidator()
- self._validators["zsrc"] = v_streamtube.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("maxdisplayed", None)
- self["maxdisplayed"] = maxdisplayed if maxdisplayed is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("sizeref", None)
- self["sizeref"] = sizeref if sizeref is not None else _v
- _v = arg.pop("starts", None)
- self["starts"] = starts if starts is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("u", None)
- self["u"] = u if u is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("usrc", None)
- self["usrc"] = usrc if usrc is not None else _v
- _v = arg.pop("v", None)
- self["v"] = v if v is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("vsrc", None)
- self["vsrc"] = vsrc if vsrc is not None else _v
- _v = arg.pop("w", None)
- self["w"] = w if w is not None else _v
- _v = arg.pop("wsrc", None)
- self["wsrc"] = wsrc if wsrc is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "streamtube"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="streamtube", val="streamtube"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Splom(_BaseTraceType):
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # diagonal
- # --------
- @property
- def diagonal(self):
- """
- The 'diagonal' property is an instance of Diagonal
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Diagonal`
- - A dict of string/value properties that will be passed
- to the Diagonal constructor
-
- Supported dict properties:
-
- visible
- Determines whether or not subplots on the
- diagonal are displayed.
-
- Returns
- -------
- plotly.graph_objs.splom.Diagonal
- """
- return self["diagonal"]
-
- @diagonal.setter
- def diagonal(self, val):
- self["diagonal"] = val
-
- # dimensions
- # ----------
- @property
- def dimensions(self):
- """
- The 'dimensions' property is a tuple of instances of
- Dimension that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.splom.Dimension
- - A list or tuple of dicts of string/value properties that
- will be passed to the Dimension constructor
-
- Supported dict properties:
-
- axis
- :class:`plotly.graph_objects.splom.dimension.Ax
- is` instance or dict with compatible properties
- label
- Sets the label corresponding to this splom
- dimension.
- 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`.
- values
- Sets the dimension values to be plotted.
- valuessrc
- Sets the source reference on Chart Studio Cloud
- for values .
- visible
- Determines whether or not this dimension is
- shown on the graph. Note that even visible
- false dimension contribute to the default grid
- generate by this splom trace.
-
- Returns
- -------
- tuple[plotly.graph_objs.splom.Dimension]
- """
- return self["dimensions"]
-
- @dimensions.setter
- def dimensions(self, val):
- self["dimensions"] = val
-
- # dimensiondefaults
- # -----------------
- @property
- def dimensiondefaults(self):
- """
- When used in a template (as
- layout.template.data.splom.dimensiondefaults), sets the default
- property values to use for elements of splom.dimensions
-
- The 'dimensiondefaults' property is an instance of Dimension
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Dimension`
- - A dict of string/value properties that will be passed
- to the Dimension constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.splom.Dimension
- """
- return self["dimensiondefaults"]
-
- @dimensiondefaults.setter
- def dimensiondefaults(self, val):
- self["dimensiondefaults"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.splom.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.splom.marker.Color
- Bar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.splom.marker.Line`
- instance or dict with compatible properties
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.splom.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.splom.selected.Mar
- ker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.splom.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # showlowerhalf
- # -------------
- @property
- def showlowerhalf(self):
- """
- Determines whether or not subplots on the lower half from the
- diagonal are displayed.
-
- The 'showlowerhalf' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlowerhalf"]
-
- @showlowerhalf.setter
- def showlowerhalf(self, val):
- self["showlowerhalf"] = val
-
- # showupperhalf
- # -------------
- @property
- def showupperhalf(self):
- """
- Determines whether or not subplots on the upper half from the
- diagonal are displayed.
-
- The 'showupperhalf' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showupperhalf"]
-
- @showupperhalf.setter
- def showupperhalf(self, val):
- self["showupperhalf"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.splom.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair to appear on
- hover. If a single string, the same string appears over all the
- data points. If an array of string, the items are mapped in
- order to the this trace's (x,y) coordinates.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.splom.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.splom.unselected.M
- arker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.splom.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # xaxes
- # -----
- @property
- def xaxes(self):
- """
- Sets the list of x axes corresponding to dimensions of this
- splom trace. By default, a splom will match the first N xaxes
- where N is the number of input dimensions. Note that, in case
- where `diagonal.visible` is false and `showupperhalf` or
- `showlowerhalf` is false, this splom trace will generate one
- less x-axis and one less y-axis.
-
- The 'xaxes' property is an info array that may be specified as:
- * a list of elements where:
- The 'xaxes[i]' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- list
- """
- return self["xaxes"]
-
- @xaxes.setter
- def xaxes(self, val):
- self["xaxes"] = val
-
- # yaxes
- # -----
- @property
- def yaxes(self):
- """
- Sets the list of y axes corresponding to dimensions of this
- splom trace. By default, a splom will match the first N yaxes
- where N is the number of input dimensions. Note that, in case
- where `diagonal.visible` is false and `showupperhalf` or
- `showlowerhalf` is false, this splom trace will generate one
- less x-axis and one less y-axis.
-
- The 'yaxes' property is an info array that may be specified as:
- * a list of elements where:
- The 'yaxes[i]' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- list
- """
- return self["yaxes"]
-
- @yaxes.setter
- def yaxes(self, val):
- self["yaxes"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- diagonal
- :class:`plotly.graph_objects.splom.Diagonal` instance
- or dict with compatible properties
- dimensions
- A tuple of
- :class:`plotly.graph_objects.splom.Dimension` instances
- or dicts with compatible properties
- dimensiondefaults
- When used in a template (as
- layout.template.data.splom.dimensiondefaults), sets the
- default property values to use for elements of
- splom.dimensions
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.splom.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.splom.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.splom.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showlowerhalf
- Determines whether or not subplots on the lower half
- from the diagonal are displayed.
- showupperhalf
- Determines whether or not subplots on the upper half
- from the diagonal are displayed.
- stream
- :class:`plotly.graph_objects.splom.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair to
- appear on hover. If a single string, the same string
- appears over all the data points. If an array of
- string, the items are mapped in order to the this
- trace's (x,y) coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.splom.Unselected` instance
- or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxes
- Sets the list of x axes corresponding to dimensions of
- this splom trace. By default, a splom will match the
- first N xaxes where N is the number of input
- dimensions. Note that, in case where `diagonal.visible`
- is false and `showupperhalf` or `showlowerhalf` is
- false, this splom trace will generate one less x-axis
- and one less y-axis.
- yaxes
- Sets the list of y axes corresponding to dimensions of
- this splom trace. By default, a splom will match the
- first N yaxes where N is the number of input
- dimensions. Note that, in case where `diagonal.visible`
- is false and `showupperhalf` or `showlowerhalf` is
- false, this splom trace will generate one less x-axis
- and one less y-axis.
- """
-
- def __init__(
- self,
- arg=None,
- customdata=None,
- customdatasrc=None,
- diagonal=None,
- dimensions=None,
- dimensiondefaults=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- showlowerhalf=None,
- showupperhalf=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- xaxes=None,
- yaxes=None,
- **kwargs
- ):
- """
- Construct a new Splom object
-
- Splom traces generate scatter plot matrix visualizations. Each
- splom `dimensions` items correspond to a generated axis. Values
- for each of those dimensions are set in `dimensions[i].values`.
- Splom traces support all `scattergl` marker style attributes.
- Specify `layout.grid` attributes and/or layout x-axis and
- y-axis attributes for more control over the axis positioning
- and style.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Splom`
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- diagonal
- :class:`plotly.graph_objects.splom.Diagonal` instance
- or dict with compatible properties
- dimensions
- A tuple of
- :class:`plotly.graph_objects.splom.Dimension` instances
- or dicts with compatible properties
- dimensiondefaults
- When used in a template (as
- layout.template.data.splom.dimensiondefaults), sets the
- default property values to use for elements of
- splom.dimensions
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.splom.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.splom.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.splom.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showlowerhalf
- Determines whether or not subplots on the lower half
- from the diagonal are displayed.
- showupperhalf
- Determines whether or not subplots on the upper half
- from the diagonal are displayed.
- stream
- :class:`plotly.graph_objects.splom.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair to
- appear on hover. If a single string, the same string
- appears over all the data points. If an array of
- string, the items are mapped in order to the this
- trace's (x,y) coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.splom.Unselected` instance
- or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxes
- Sets the list of x axes corresponding to dimensions of
- this splom trace. By default, a splom will match the
- first N xaxes where N is the number of input
- dimensions. Note that, in case where `diagonal.visible`
- is false and `showupperhalf` or `showlowerhalf` is
- false, this splom trace will generate one less x-axis
- and one less y-axis.
- yaxes
- Sets the list of y axes corresponding to dimensions of
- this splom trace. By default, a splom will match the
- first N yaxes where N is the number of input
- dimensions. Note that, in case where `diagonal.visible`
- is false and `showupperhalf` or `showlowerhalf` is
- false, this splom trace will generate one less x-axis
- and one less y-axis.
-
- Returns
- -------
- Splom
- """
- super(Splom, self).__init__("splom")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Splom
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Splom`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import splom as v_splom
-
- # Initialize validators
- # ---------------------
- self._validators["customdata"] = v_splom.CustomdataValidator()
- self._validators["customdatasrc"] = v_splom.CustomdatasrcValidator()
- self._validators["diagonal"] = v_splom.DiagonalValidator()
- self._validators["dimensions"] = v_splom.DimensionsValidator()
- self._validators["dimensiondefaults"] = v_splom.DimensionValidator()
- self._validators["hoverinfo"] = v_splom.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_splom.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_splom.HoverlabelValidator()
- self._validators["hovertemplate"] = v_splom.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_splom.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_splom.HovertextValidator()
- self._validators["hovertextsrc"] = v_splom.HovertextsrcValidator()
- self._validators["ids"] = v_splom.IdsValidator()
- self._validators["idssrc"] = v_splom.IdssrcValidator()
- self._validators["legendgroup"] = v_splom.LegendgroupValidator()
- self._validators["marker"] = v_splom.MarkerValidator()
- self._validators["meta"] = v_splom.MetaValidator()
- self._validators["metasrc"] = v_splom.MetasrcValidator()
- self._validators["name"] = v_splom.NameValidator()
- self._validators["opacity"] = v_splom.OpacityValidator()
- self._validators["selected"] = v_splom.SelectedValidator()
- self._validators["selectedpoints"] = v_splom.SelectedpointsValidator()
- self._validators["showlegend"] = v_splom.ShowlegendValidator()
- self._validators["showlowerhalf"] = v_splom.ShowlowerhalfValidator()
- self._validators["showupperhalf"] = v_splom.ShowupperhalfValidator()
- self._validators["stream"] = v_splom.StreamValidator()
- self._validators["text"] = v_splom.TextValidator()
- self._validators["textsrc"] = v_splom.TextsrcValidator()
- self._validators["uid"] = v_splom.UidValidator()
- self._validators["uirevision"] = v_splom.UirevisionValidator()
- self._validators["unselected"] = v_splom.UnselectedValidator()
- self._validators["visible"] = v_splom.VisibleValidator()
- self._validators["xaxes"] = v_splom.XaxesValidator()
- self._validators["yaxes"] = v_splom.YaxesValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("diagonal", None)
- self["diagonal"] = diagonal if diagonal is not None else _v
- _v = arg.pop("dimensions", None)
- self["dimensions"] = dimensions if dimensions is not None else _v
- _v = arg.pop("dimensiondefaults", None)
- self["dimensiondefaults"] = (
- dimensiondefaults if dimensiondefaults is not None else _v
- )
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showlowerhalf", None)
- self["showlowerhalf"] = showlowerhalf if showlowerhalf is not None else _v
- _v = arg.pop("showupperhalf", None)
- self["showupperhalf"] = showupperhalf if showupperhalf is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("xaxes", None)
- self["xaxes"] = xaxes if xaxes is not None else _v
- _v = arg.pop("yaxes", None)
- self["yaxes"] = yaxes if yaxes is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "splom"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="splom", val="splom"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scatterternary(_BaseTraceType):
-
- # a
- # -
- @property
- def a(self):
- """
- Sets the quantity of component `a` in each data point. If `a`,
- `b`, and `c` are all provided, they need not be normalized,
- only the relative values matter. If only two arrays are
- provided they must be normalized to match `ternary.sum`.
-
- The 'a' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["a"]
-
- @a.setter
- def a(self, val):
- self["a"] = val
-
- # asrc
- # ----
- @property
- def asrc(self):
- """
- Sets the source reference on Chart Studio Cloud for a .
-
- The 'asrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["asrc"]
-
- @asrc.setter
- def asrc(self, val):
- self["asrc"] = val
-
- # b
- # -
- @property
- def b(self):
- """
- Sets the quantity of component `a` in each data point. If `a`,
- `b`, and `c` are all provided, they need not be normalized,
- only the relative values matter. If only two arrays are
- provided they must be normalized to match `ternary.sum`.
-
- The 'b' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["b"]
-
- @b.setter
- def b(self, val):
- self["b"] = val
-
- # bsrc
- # ----
- @property
- def bsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for b .
-
- The 'bsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["bsrc"]
-
- @bsrc.setter
- def bsrc(self, val):
- self["bsrc"] = val
-
- # c
- # -
- @property
- def c(self):
- """
- Sets the quantity of component `a` in each data point. If `a`,
- `b`, and `c` are all provided, they need not be normalized,
- only the relative values matter. If only two arrays are
- provided they must be normalized to match `ternary.sum`.
-
- The 'c' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["c"]
-
- @c.setter
- def c(self, val):
- self["c"] = val
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether or not markers and text nodes are clipped
- about the subplot axes. To show markers and text nodes above
- axis lines and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # csrc
- # ----
- @property
- def csrc(self):
- """
- Sets the source reference on Chart Studio Cloud for c .
-
- The 'csrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["csrc"]
-
- @csrc.setter
- def csrc(self, val):
- self["csrc"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Use with `fillcolor`
- if not "none". scatterternary has a subset of the options
- available to scatter. "toself" connects the endpoints of the
- trace (or each segment of the trace if it has gaps) into a
- closed shape. "tonext" fills the space between two traces if
- one completely encloses the other (eg consecutive contour
- lines), and behaves like "toself" if there is no trace before
- it. "tonext" should not be used if one trace does not enclose
- the other.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters
- (e.g. 'a+b')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scatterternary.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual points (markers or
- line points) or do they highlight filled regions? If the fill
- is "toself" or "tonext" and there are no markers or text, then
- the default is "fills", otherwise it is "points".
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['points', 'fills'] joined with '+' characters
- (e.g. 'points+fills')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (a,b,c) point. If
- a single string, the same string appears over all the data
- points. If an array of strings, the items are mapped in order
- to the the data points in (a,b,c). To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scatterternary.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line 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").
- shape
- Determines the line shape. With "spline" the
- lines are drawn using spline interpolation. The
- other available values correspond to step-wise
- line shapes.
- smoothing
- Has an effect only if `shape` is set to
- "spline" Sets the amount of smoothing. 0
- corresponds to no smoothing (equivalent to a
- "linear" shape).
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scatterternary.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatterternary.mar
- ker.ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- gradient
- :class:`plotly.graph_objects.scatterternary.mar
- ker.Gradient` instance or dict with compatible
- properties
- line
- :class:`plotly.graph_objects.scatterternary.mar
- ker.Line` instance or dict with compatible
- properties
- maxdisplayed
- Sets a maximum number of points to be drawn on
- the graph. 0 corresponds to no limit.
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scatterternary.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterternary.sel
- ected.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatterternary.sel
- ected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scatterternary.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scatterternary.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- ternary subplot. If "ternary" (the default value), the data
- refer to `layout.ternary`. If "ternary2", the data refer to
- `layout.ternary2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'ternary', that may be specified as the string 'ternary'
- optionally followed by an integer >= 1
- (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # sum
- # ---
- @property
- def sum(self):
- """
- The number each triplet should sum to, if only two of `a`, `b`,
- and `c` are provided. This overrides `ternary.sum` to
- normalize this specific trace, but does not affect the values
- displayed on the axes. 0 (or missing) means to use
- ternary.sum
-
- The 'sum' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["sum"]
-
- @sum.setter
- def sum(self, val):
- self["sum"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (a,b,c) point. If a
- single string, the same string appears over all the data
- points. If an array of strings, the items are mapped in order
- to the the data points in (a,b,c). If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set, these
- elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scatterternary.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `a`, `b`, `c` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterternary.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterternary.uns
- elected.Marker` instance or dict with
- compatible properties
- textfont
- :class:`plotly.graph_objects.scatterternary.uns
- elected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scatterternary.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- a
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- c
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- csrc
- Sets the source reference on Chart Studio Cloud for c
- .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterternary has a subset
- of the options available to scatter. "toself" connects
- the endpoints of the trace (or each segment of the
- trace if it has gaps) into a closed shape. "tonext"
- fills the space between two traces if one completely
- encloses the other (eg consecutive contour lines), and
- behaves like "toself" if there is no trace before it.
- "tonext" should not be used if one trace does not
- enclose the other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterternary.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (a,b,c)
- point. If a single string, the same string appears over
- all the data points. If an array of strings, the items
- are mapped in order to the the data points in (a,b,c).
- To be seen, trace `hoverinfo` must contain a "text"
- flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterternary.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterternary.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scatterternary.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterternary.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a ternary subplot. If "ternary" (the default
- value), the data refer to `layout.ternary`. If
- "ternary2", the data refer to `layout.ternary2`, and so
- on.
- sum
- The number each triplet should sum to, if only two of
- `a`, `b`, and `c` are provided. This overrides
- `ternary.sum` to normalize this specific trace, but
- does not affect the values displayed on the axes. 0 (or
- missing) means to use ternary.sum
- text
- Sets text elements associated with each (a,b,c) point.
- If a single string, the same string appears over all
- the data points. If an array of strings, the items are
- mapped in order to the the data points in (a,b,c). If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `a`, `b`, `c`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterternary.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- a=None,
- asrc=None,
- b=None,
- bsrc=None,
- c=None,
- cliponaxis=None,
- connectgaps=None,
- csrc=None,
- customdata=None,
- customdatasrc=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- subplot=None,
- sum=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Scatterternary object
-
- Provides similar functionality to the "scatter" type but on a
- ternary phase diagram. The data is provided by at least two
- arrays out of `a`, `b`, `c` triplets.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of
- :class:`plotly.graph_objs.Scatterternary`
- a
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- c
- Sets the quantity of component `a` in each data point.
- If `a`, `b`, and `c` are all provided, they need not be
- normalized, only the relative values matter. If only
- two arrays are provided they must be normalized to
- match `ternary.sum`.
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- csrc
- Sets the source reference on Chart Studio Cloud for c
- .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterternary has a subset
- of the options available to scatter. "toself" connects
- the endpoints of the trace (or each segment of the
- trace if it has gaps) into a closed shape. "tonext"
- fills the space between two traces if one completely
- encloses the other (eg consecutive contour lines), and
- behaves like "toself" if there is no trace before it.
- "tonext" should not be used if one trace does not
- enclose the other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterternary.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (a,b,c)
- point. If a single string, the same string appears over
- all the data points. If an array of strings, the items
- are mapped in order to the the data points in (a,b,c).
- To be seen, trace `hoverinfo` must contain a "text"
- flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterternary.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterternary.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scatterternary.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterternary.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a ternary subplot. If "ternary" (the default
- value), the data refer to `layout.ternary`. If
- "ternary2", the data refer to `layout.ternary2`, and so
- on.
- sum
- The number each triplet should sum to, if only two of
- `a`, `b`, and `c` are provided. This overrides
- `ternary.sum` to normalize this specific trace, but
- does not affect the values displayed on the axes. 0 (or
- missing) means to use ternary.sum
- text
- Sets text elements associated with each (a,b,c) point.
- If a single string, the same string appears over all
- the data points. If an array of strings, the items are
- mapped in order to the the data points in (a,b,c). If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `a`, `b`, `c`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterternary.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Scatterternary
- """
- super(Scatterternary, self).__init__("scatterternary")
-
- # 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.Scatterternary
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scatterternary`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scatterternary as v_scatterternary
-
- # Initialize validators
- # ---------------------
- self._validators["a"] = v_scatterternary.AValidator()
- self._validators["asrc"] = v_scatterternary.AsrcValidator()
- self._validators["b"] = v_scatterternary.BValidator()
- self._validators["bsrc"] = v_scatterternary.BsrcValidator()
- self._validators["c"] = v_scatterternary.CValidator()
- self._validators["cliponaxis"] = v_scatterternary.CliponaxisValidator()
- self._validators["connectgaps"] = v_scatterternary.ConnectgapsValidator()
- self._validators["csrc"] = v_scatterternary.CsrcValidator()
- self._validators["customdata"] = v_scatterternary.CustomdataValidator()
- self._validators["customdatasrc"] = v_scatterternary.CustomdatasrcValidator()
- self._validators["fill"] = v_scatterternary.FillValidator()
- self._validators["fillcolor"] = v_scatterternary.FillcolorValidator()
- self._validators["hoverinfo"] = v_scatterternary.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scatterternary.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scatterternary.HoverlabelValidator()
- self._validators["hoveron"] = v_scatterternary.HoveronValidator()
- self._validators["hovertemplate"] = v_scatterternary.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_scatterternary.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scatterternary.HovertextValidator()
- self._validators["hovertextsrc"] = v_scatterternary.HovertextsrcValidator()
- self._validators["ids"] = v_scatterternary.IdsValidator()
- self._validators["idssrc"] = v_scatterternary.IdssrcValidator()
- self._validators["legendgroup"] = v_scatterternary.LegendgroupValidator()
- self._validators["line"] = v_scatterternary.LineValidator()
- self._validators["marker"] = v_scatterternary.MarkerValidator()
- self._validators["meta"] = v_scatterternary.MetaValidator()
- self._validators["metasrc"] = v_scatterternary.MetasrcValidator()
- self._validators["mode"] = v_scatterternary.ModeValidator()
- self._validators["name"] = v_scatterternary.NameValidator()
- self._validators["opacity"] = v_scatterternary.OpacityValidator()
- self._validators["selected"] = v_scatterternary.SelectedValidator()
- self._validators["selectedpoints"] = v_scatterternary.SelectedpointsValidator()
- self._validators["showlegend"] = v_scatterternary.ShowlegendValidator()
- self._validators["stream"] = v_scatterternary.StreamValidator()
- self._validators["subplot"] = v_scatterternary.SubplotValidator()
- self._validators["sum"] = v_scatterternary.SumValidator()
- self._validators["text"] = v_scatterternary.TextValidator()
- self._validators["textfont"] = v_scatterternary.TextfontValidator()
- self._validators["textposition"] = v_scatterternary.TextpositionValidator()
- self._validators[
- "textpositionsrc"
- ] = v_scatterternary.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scatterternary.TextsrcValidator()
- self._validators["texttemplate"] = v_scatterternary.TexttemplateValidator()
- self._validators[
- "texttemplatesrc"
- ] = v_scatterternary.TexttemplatesrcValidator()
- self._validators["uid"] = v_scatterternary.UidValidator()
- self._validators["uirevision"] = v_scatterternary.UirevisionValidator()
- self._validators["unselected"] = v_scatterternary.UnselectedValidator()
- self._validators["visible"] = v_scatterternary.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("a", None)
- self["a"] = a if a is not None else _v
- _v = arg.pop("asrc", None)
- self["asrc"] = asrc if asrc is not None else _v
- _v = arg.pop("b", None)
- self["b"] = b if b is not None else _v
- _v = arg.pop("bsrc", None)
- self["bsrc"] = bsrc if bsrc is not None else _v
- _v = arg.pop("c", None)
- self["c"] = c if c is not None else _v
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("csrc", None)
- self["csrc"] = csrc if csrc is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("sum", None)
- self["sum"] = sum if sum is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scatterternary"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scatterternary", val="scatterternary"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scatterpolargl(_BaseTraceType):
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dr
- # --
- @property
- def dr(self):
- """
- Sets the r coordinate step.
-
- The 'dr' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dr"]
-
- @dr.setter
- def dr(self, val):
- self["dr"] = val
-
- # dtheta
- # ------
- @property
- def dtheta(self):
- """
- Sets the theta coordinate step. By default, the `dtheta` step
- equals the subplot's period divided by the length of the `r`
- coordinates.
-
- The 'dtheta' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dtheta"]
-
- @dtheta.setter
- def dtheta(self, val):
- self["dtheta"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Defaults to "none"
- unless this trace is stacked, then it gets "tonexty"
- ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor`
- if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0
- respectively. "tonextx" and "tonexty" fill between the
- endpoints of this trace and the endpoints of the trace before
- it, connecting those endpoints with straight lines (to make a
- stacked area graph); if there is no trace before it, they
- behave like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if it has
- gaps) into a closed shape. "tonext" fills the space between two
- traces if one completely encloses the other (eg consecutive
- contour lines), and behaves like "toself" if there is no trace
- before it. "tonext" should not be used if one trace does not
- enclose the other. Traces in a `stackgroup` will only fill to
- (or be filled to) other traces in the same group. With multiple
- `stackgroup`s or some traces stacked and some not, if fill-
- linked traces are not already consecutive, the later ones will
- be pushed down in the drawing order.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx',
- 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
- (e.g. 'r+theta')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scatterpolargl.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line color.
- dash
- Sets the style of the lines.
- shape
- Determines the line shape. The values
- correspond to step-wise line shapes.
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatterpolargl.mar
- ker.ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.scatterpolargl.mar
- ker.Line` instance or dict with compatible
- properties
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # r
- # -
- @property
- def r(self):
- """
- Sets the radial coordinates
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # r0
- # --
- @property
- def r0(self):
- """
- Alternate to `r`. Builds a linear space of r coordinates. Use
- with `dr` where `r0` is the starting coordinate and `dr` the
- step.
-
- The 'r0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["r0"]
-
- @r0.setter
- def r0(self, val):
- self["r0"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterpolargl.sel
- ected.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatterpolargl.sel
- ected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scatterpolargl.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- polar subplot. If "polar" (the default value), the data refer
- to `layout.polar`. If "polar2", the data refer to
- `layout.polar2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'polar', that may be specified as the string 'polar'
- optionally followed by an integer >= 1
- (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `r`, `theta` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # theta
- # -----
- @property
- def theta(self):
- """
- Sets the angular coordinates
-
- The 'theta' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["theta"]
-
- @theta.setter
- def theta(self, val):
- self["theta"] = val
-
- # theta0
- # ------
- @property
- def theta0(self):
- """
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the starting
- coordinate and `dtheta` the step.
-
- The 'theta0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["theta0"]
-
- @theta0.setter
- def theta0(self, val):
- self["theta0"] = val
-
- # thetasrc
- # --------
- @property
- def thetasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for theta .
-
- The 'thetasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["thetasrc"]
-
- @thetasrc.setter
- def thetasrc(self, val):
- self["thetasrc"] = val
-
- # thetaunit
- # ---------
- @property
- def thetaunit(self):
- """
- Sets the unit of input "theta" values. Has an effect only when
- on "linear" angular axes.
-
- The 'thetaunit' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['radians', 'degrees', 'gradians']
-
- Returns
- -------
- Any
- """
- return self["thetaunit"]
-
- @thetaunit.setter
- def thetaunit(self, val):
- self["thetaunit"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterpolargl.uns
- elected.Marker` instance or dict with
- compatible properties
- textfont
- :class:`plotly.graph_objects.scatterpolargl.uns
- elected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scatterpolargl.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterpolargl.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterpolargl.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterpolargl.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatterpolargl.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterpolargl.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `r`, `theta`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterpolargl.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- dr=None,
- dtheta=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- r=None,
- r0=None,
- rsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- subplot=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- theta=None,
- theta0=None,
- thetasrc=None,
- thetaunit=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Scatterpolargl object
-
- The scatterpolargl trace type encompasses line charts, scatter
- charts, and bubble charts in polar coordinates using the WebGL
- plotting engine. The data visualized as scatter point or lines
- is set in `r` (radial) and `theta` (angular) coordinates Bubble
- charts are achieved by setting `marker.size` and/or
- `marker.color` to numerical arrays.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of
- :class:`plotly.graph_objs.Scatterpolargl`
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterpolargl.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterpolargl.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterpolargl.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatterpolargl.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterpolargl.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `r`, `theta`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterpolargl.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Scatterpolargl
- """
- super(Scatterpolargl, self).__init__("scatterpolargl")
-
- # 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.Scatterpolargl
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scatterpolargl`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scatterpolargl as v_scatterpolargl
-
- # Initialize validators
- # ---------------------
- self._validators["connectgaps"] = v_scatterpolargl.ConnectgapsValidator()
- self._validators["customdata"] = v_scatterpolargl.CustomdataValidator()
- self._validators["customdatasrc"] = v_scatterpolargl.CustomdatasrcValidator()
- self._validators["dr"] = v_scatterpolargl.DrValidator()
- self._validators["dtheta"] = v_scatterpolargl.DthetaValidator()
- self._validators["fill"] = v_scatterpolargl.FillValidator()
- self._validators["fillcolor"] = v_scatterpolargl.FillcolorValidator()
- self._validators["hoverinfo"] = v_scatterpolargl.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scatterpolargl.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scatterpolargl.HoverlabelValidator()
- self._validators["hovertemplate"] = v_scatterpolargl.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_scatterpolargl.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scatterpolargl.HovertextValidator()
- self._validators["hovertextsrc"] = v_scatterpolargl.HovertextsrcValidator()
- self._validators["ids"] = v_scatterpolargl.IdsValidator()
- self._validators["idssrc"] = v_scatterpolargl.IdssrcValidator()
- self._validators["legendgroup"] = v_scatterpolargl.LegendgroupValidator()
- self._validators["line"] = v_scatterpolargl.LineValidator()
- self._validators["marker"] = v_scatterpolargl.MarkerValidator()
- self._validators["meta"] = v_scatterpolargl.MetaValidator()
- self._validators["metasrc"] = v_scatterpolargl.MetasrcValidator()
- self._validators["mode"] = v_scatterpolargl.ModeValidator()
- self._validators["name"] = v_scatterpolargl.NameValidator()
- self._validators["opacity"] = v_scatterpolargl.OpacityValidator()
- self._validators["r"] = v_scatterpolargl.RValidator()
- self._validators["r0"] = v_scatterpolargl.R0Validator()
- self._validators["rsrc"] = v_scatterpolargl.RsrcValidator()
- self._validators["selected"] = v_scatterpolargl.SelectedValidator()
- self._validators["selectedpoints"] = v_scatterpolargl.SelectedpointsValidator()
- self._validators["showlegend"] = v_scatterpolargl.ShowlegendValidator()
- self._validators["stream"] = v_scatterpolargl.StreamValidator()
- self._validators["subplot"] = v_scatterpolargl.SubplotValidator()
- self._validators["text"] = v_scatterpolargl.TextValidator()
- self._validators["textfont"] = v_scatterpolargl.TextfontValidator()
- self._validators["textposition"] = v_scatterpolargl.TextpositionValidator()
- self._validators[
- "textpositionsrc"
- ] = v_scatterpolargl.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scatterpolargl.TextsrcValidator()
- self._validators["texttemplate"] = v_scatterpolargl.TexttemplateValidator()
- self._validators[
- "texttemplatesrc"
- ] = v_scatterpolargl.TexttemplatesrcValidator()
- self._validators["theta"] = v_scatterpolargl.ThetaValidator()
- self._validators["theta0"] = v_scatterpolargl.Theta0Validator()
- self._validators["thetasrc"] = v_scatterpolargl.ThetasrcValidator()
- self._validators["thetaunit"] = v_scatterpolargl.ThetaunitValidator()
- self._validators["uid"] = v_scatterpolargl.UidValidator()
- self._validators["uirevision"] = v_scatterpolargl.UirevisionValidator()
- self._validators["unselected"] = v_scatterpolargl.UnselectedValidator()
- self._validators["visible"] = v_scatterpolargl.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dr", None)
- self["dr"] = dr if dr is not None else _v
- _v = arg.pop("dtheta", None)
- self["dtheta"] = dtheta if dtheta is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("r0", None)
- self["r0"] = r0 if r0 is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("theta", None)
- self["theta"] = theta if theta is not None else _v
- _v = arg.pop("theta0", None)
- self["theta0"] = theta0 if theta0 is not None else _v
- _v = arg.pop("thetasrc", None)
- self["thetasrc"] = thetasrc if thetasrc is not None else _v
- _v = arg.pop("thetaunit", None)
- self["thetaunit"] = thetaunit if thetaunit is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scatterpolargl"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scatterpolargl", val="scatterpolargl"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scatterpolar(_BaseTraceType):
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether or not markers and text nodes are clipped
- about the subplot axes. To show markers and text nodes above
- axis lines and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dr
- # --
- @property
- def dr(self):
- """
- Sets the r coordinate step.
-
- The 'dr' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dr"]
-
- @dr.setter
- def dr(self, val):
- self["dr"] = val
-
- # dtheta
- # ------
- @property
- def dtheta(self):
- """
- Sets the theta coordinate step. By default, the `dtheta` step
- equals the subplot's period divided by the length of the `r`
- coordinates.
-
- The 'dtheta' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dtheta"]
-
- @dtheta.setter
- def dtheta(self, val):
- self["dtheta"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Use with `fillcolor`
- if not "none". scatterpolar has a subset of the options
- available to scatter. "toself" connects the endpoints of the
- trace (or each segment of the trace if it has gaps) into a
- closed shape. "tonext" fills the space between two traces if
- one completely encloses the other (eg consecutive contour
- lines), and behaves like "toself" if there is no trace before
- it. "tonext" should not be used if one trace does not enclose
- the other.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
- (e.g. 'r+theta')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual points (markers or
- line points) or do they highlight filled regions? If the fill
- is "toself" or "tonext" and there are no markers or text, then
- the default is "fills", otherwise it is "points".
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['points', 'fills'] joined with '+' characters
- (e.g. 'points+fills')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scatterpolar.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line 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").
- shape
- Determines the line shape. With "spline" the
- lines are drawn using spline interpolation. The
- other available values correspond to step-wise
- line shapes.
- smoothing
- Has an effect only if `shape` is set to
- "spline" Sets the amount of smoothing. 0
- corresponds to no smoothing (equivalent to a
- "linear" shape).
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatterpolar.marke
- r.ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- gradient
- :class:`plotly.graph_objects.scatterpolar.marke
- r.Gradient` instance or dict with compatible
- properties
- line
- :class:`plotly.graph_objects.scatterpolar.marke
- r.Line` instance or dict with compatible
- properties
- maxdisplayed
- Sets a maximum number of points to be drawn on
- the graph. 0 corresponds to no limit.
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # r
- # -
- @property
- def r(self):
- """
- Sets the radial coordinates
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # r0
- # --
- @property
- def r0(self):
- """
- Alternate to `r`. Builds a linear space of r coordinates. Use
- with `dr` where `r0` is the starting coordinate and `dr` the
- step.
-
- The 'r0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["r0"]
-
- @r0.setter
- def r0(self, val):
- self["r0"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterpolar.selec
- ted.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatterpolar.selec
- ted.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scatterpolar.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- polar subplot. If "polar" (the default value), the data refer
- to `layout.polar`. If "polar2", the data refer to
- `layout.polar2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'polar', that may be specified as the string 'polar'
- optionally followed by an integer >= 1
- (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `r`, `theta` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # theta
- # -----
- @property
- def theta(self):
- """
- Sets the angular coordinates
-
- The 'theta' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["theta"]
-
- @theta.setter
- def theta(self, val):
- self["theta"] = val
-
- # theta0
- # ------
- @property
- def theta0(self):
- """
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the starting
- coordinate and `dtheta` the step.
-
- The 'theta0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["theta0"]
-
- @theta0.setter
- def theta0(self, val):
- self["theta0"] = val
-
- # thetasrc
- # --------
- @property
- def thetasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for theta .
-
- The 'thetasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["thetasrc"]
-
- @thetasrc.setter
- def thetasrc(self, val):
- self["thetasrc"] = val
-
- # thetaunit
- # ---------
- @property
- def thetaunit(self):
- """
- Sets the unit of input "theta" values. Has an effect only when
- on "linear" angular axes.
-
- The 'thetaunit' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['radians', 'degrees', 'gradians']
-
- Returns
- -------
- Any
- """
- return self["thetaunit"]
-
- @thetaunit.setter
- def thetaunit(self, val):
- self["thetaunit"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatterpolar.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatterpolar.unsel
- ected.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatterpolar.unsel
- ected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scatterpolar.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterpolar has a subset of
- the options available to scatter. "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterpolar.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterpolar.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterpolar.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatterpolar.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterpolar.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `r`, `theta`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterpolar.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- cliponaxis=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- dr=None,
- dtheta=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- r=None,
- r0=None,
- rsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- subplot=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- theta=None,
- theta0=None,
- thetasrc=None,
- thetaunit=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Scatterpolar object
-
- The scatterpolar trace type encompasses line charts, scatter
- charts, text charts, and bubble charts in polar coordinates.
- The data visualized as scatter point or lines is set in `r`
- (radial) and `theta` (angular) coordinates Text (appearing
- either on the chart or on hover only) is via `text`. Bubble
- charts are achieved by setting `marker.size` and/or
- `marker.color` to numerical arrays.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scatterpolar`
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterpolar has a subset of
- the options available to scatter. "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatterpolar.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatterpolar.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatterpolar.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatterpolar.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatterpolar.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `r`, `theta`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatterpolar.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Scatterpolar
- """
- super(Scatterpolar, self).__init__("scatterpolar")
-
- # 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.Scatterpolar
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scatterpolar`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scatterpolar as v_scatterpolar
-
- # Initialize validators
- # ---------------------
- self._validators["cliponaxis"] = v_scatterpolar.CliponaxisValidator()
- self._validators["connectgaps"] = v_scatterpolar.ConnectgapsValidator()
- self._validators["customdata"] = v_scatterpolar.CustomdataValidator()
- self._validators["customdatasrc"] = v_scatterpolar.CustomdatasrcValidator()
- self._validators["dr"] = v_scatterpolar.DrValidator()
- self._validators["dtheta"] = v_scatterpolar.DthetaValidator()
- self._validators["fill"] = v_scatterpolar.FillValidator()
- self._validators["fillcolor"] = v_scatterpolar.FillcolorValidator()
- self._validators["hoverinfo"] = v_scatterpolar.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scatterpolar.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scatterpolar.HoverlabelValidator()
- self._validators["hoveron"] = v_scatterpolar.HoveronValidator()
- self._validators["hovertemplate"] = v_scatterpolar.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_scatterpolar.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scatterpolar.HovertextValidator()
- self._validators["hovertextsrc"] = v_scatterpolar.HovertextsrcValidator()
- self._validators["ids"] = v_scatterpolar.IdsValidator()
- self._validators["idssrc"] = v_scatterpolar.IdssrcValidator()
- self._validators["legendgroup"] = v_scatterpolar.LegendgroupValidator()
- self._validators["line"] = v_scatterpolar.LineValidator()
- self._validators["marker"] = v_scatterpolar.MarkerValidator()
- self._validators["meta"] = v_scatterpolar.MetaValidator()
- self._validators["metasrc"] = v_scatterpolar.MetasrcValidator()
- self._validators["mode"] = v_scatterpolar.ModeValidator()
- self._validators["name"] = v_scatterpolar.NameValidator()
- self._validators["opacity"] = v_scatterpolar.OpacityValidator()
- self._validators["r"] = v_scatterpolar.RValidator()
- self._validators["r0"] = v_scatterpolar.R0Validator()
- self._validators["rsrc"] = v_scatterpolar.RsrcValidator()
- self._validators["selected"] = v_scatterpolar.SelectedValidator()
- self._validators["selectedpoints"] = v_scatterpolar.SelectedpointsValidator()
- self._validators["showlegend"] = v_scatterpolar.ShowlegendValidator()
- self._validators["stream"] = v_scatterpolar.StreamValidator()
- self._validators["subplot"] = v_scatterpolar.SubplotValidator()
- self._validators["text"] = v_scatterpolar.TextValidator()
- self._validators["textfont"] = v_scatterpolar.TextfontValidator()
- self._validators["textposition"] = v_scatterpolar.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scatterpolar.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scatterpolar.TextsrcValidator()
- self._validators["texttemplate"] = v_scatterpolar.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scatterpolar.TexttemplatesrcValidator()
- self._validators["theta"] = v_scatterpolar.ThetaValidator()
- self._validators["theta0"] = v_scatterpolar.Theta0Validator()
- self._validators["thetasrc"] = v_scatterpolar.ThetasrcValidator()
- self._validators["thetaunit"] = v_scatterpolar.ThetaunitValidator()
- self._validators["uid"] = v_scatterpolar.UidValidator()
- self._validators["uirevision"] = v_scatterpolar.UirevisionValidator()
- self._validators["unselected"] = v_scatterpolar.UnselectedValidator()
- self._validators["visible"] = v_scatterpolar.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dr", None)
- self["dr"] = dr if dr is not None else _v
- _v = arg.pop("dtheta", None)
- self["dtheta"] = dtheta if dtheta is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("r0", None)
- self["r0"] = r0 if r0 is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("theta", None)
- self["theta"] = theta if theta is not None else _v
- _v = arg.pop("theta0", None)
- self["theta0"] = theta0 if theta0 is not None else _v
- _v = arg.pop("thetasrc", None)
- self["thetasrc"] = thetasrc if thetasrc is not None else _v
- _v = arg.pop("thetaunit", None)
- self["thetaunit"] = thetaunit if thetaunit is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scatterpolar"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scatterpolar", val="scatterpolar"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scattermapbox(_BaseTraceType):
-
- # below
- # -----
- @property
- def below(self):
- """
- Determines if this scattermapbox trace's layers are to be
- inserted before the layer with the specified ID. By default,
- scattermapbox layers are inserted above all the base layers. To
- place the scattermapbox layers above every other layer, set
- `below` to "''".
-
- 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
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Use with `fillcolor`
- if not "none". "toself" connects the endpoints of the trace (or
- each segment of the trace if it has gaps) into a closed shape.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'toself']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters
- (e.g. 'lon+lat')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scattermapbox.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (lon,lat) pair If
- a single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (lon,lat) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # lat
- # ---
- @property
- def lat(self):
- """
- Sets the latitude coordinates (in degrees North).
-
- The 'lat' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lat"]
-
- @lat.setter
- def lat(self, val):
- self["lat"] = val
-
- # latsrc
- # ------
- @property
- def latsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lat .
-
- The 'latsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["latsrc"]
-
- @latsrc.setter
- def latsrc(self, val):
- self["latsrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scattermapbox.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line color.
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scattermapbox.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # lon
- # ---
- @property
- def lon(self):
- """
- Sets the longitude coordinates (in degrees East).
-
- The 'lon' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lon"]
-
- @lon.setter
- def lon(self, val):
- self["lon"] = val
-
- # lonsrc
- # ------
- @property
- def lonsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lon .
-
- The 'lonsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lonsrc"]
-
- @lonsrc.setter
- def lonsrc(self, val):
- self["lonsrc"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattermapbox.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scattermapbox.mark
- er.ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol. Full list:
- https://www.mapbox.com/maki-icons/ Note that
- the array `marker.color` and `marker.size` are
- only available for "circle" symbols.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scattermapbox.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover.
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattermapbox.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattermapbox.sele
- cted.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattermapbox.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattermapbox.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scattermapbox.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- mapbox subplot. If "mapbox" (the default value), the data refer
- to `layout.mapbox`. If "mapbox2", the data refer to
- `layout.mapbox2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'mapbox', that may be specified as the string 'mapbox'
- optionally followed by an integer >= 1
- (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (lon,lat) pair If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (lon,lat) coordinates. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set, these
- elements will be seen in the hover labels.
-
- The 'text' 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["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.scattermapbox.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.scattermapbox.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
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `lat`, `lon` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattermapbox.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattermapbox.unse
- lected.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattermapbox.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- below
- Determines if this scattermapbox trace's layers are to
- be inserted before the layer with the specified ID. By
- default, scattermapbox layers are inserted above all
- the base layers. To place the scattermapbox layers
- above every other layer, set `below` to "''".
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattermapbox.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (lon,lat)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattermapbox.Line`
- instance or dict with compatible properties
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- marker
- :class:`plotly.graph_objects.scattermapbox.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattermapbox.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattermapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets text elements associated with each (lon,lat) pair
- If a single string, the same string appears over all
- the data points. If an array of string, the items are
- mapped in order to the this trace's (lon,lat)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- 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.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `lat`, `lon`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattermapbox.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- below=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- lat=None,
- latsrc=None,
- legendgroup=None,
- line=None,
- lon=None,
- lonsrc=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- subplot=None,
- text=None,
- textfont=None,
- textposition=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Scattermapbox object
-
- The data visualized as scatter point, lines or marker symbols
- on a Mapbox GL geographic map is provided by longitude/latitude
- pairs in `lon` and `lat`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scattermapbox`
- below
- Determines if this scattermapbox trace's layers are to
- be inserted before the layer with the specified ID. By
- default, scattermapbox layers are inserted above all
- the base layers. To place the scattermapbox layers
- above every other layer, set `below` to "''".
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattermapbox.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (lon,lat)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattermapbox.Line`
- instance or dict with compatible properties
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- marker
- :class:`plotly.graph_objects.scattermapbox.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattermapbox.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattermapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets text elements associated with each (lon,lat) pair
- If a single string, the same string appears over all
- the data points. If an array of string, the items are
- mapped in order to the this trace's (lon,lat)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- 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.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `lat`, `lon`
- and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattermapbox.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Scattermapbox
- """
- super(Scattermapbox, self).__init__("scattermapbox")
-
- # 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.Scattermapbox
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scattermapbox`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scattermapbox as v_scattermapbox
-
- # Initialize validators
- # ---------------------
- self._validators["below"] = v_scattermapbox.BelowValidator()
- self._validators["connectgaps"] = v_scattermapbox.ConnectgapsValidator()
- self._validators["customdata"] = v_scattermapbox.CustomdataValidator()
- self._validators["customdatasrc"] = v_scattermapbox.CustomdatasrcValidator()
- self._validators["fill"] = v_scattermapbox.FillValidator()
- self._validators["fillcolor"] = v_scattermapbox.FillcolorValidator()
- self._validators["hoverinfo"] = v_scattermapbox.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scattermapbox.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scattermapbox.HoverlabelValidator()
- self._validators["hovertemplate"] = v_scattermapbox.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_scattermapbox.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scattermapbox.HovertextValidator()
- self._validators["hovertextsrc"] = v_scattermapbox.HovertextsrcValidator()
- self._validators["ids"] = v_scattermapbox.IdsValidator()
- self._validators["idssrc"] = v_scattermapbox.IdssrcValidator()
- self._validators["lat"] = v_scattermapbox.LatValidator()
- self._validators["latsrc"] = v_scattermapbox.LatsrcValidator()
- self._validators["legendgroup"] = v_scattermapbox.LegendgroupValidator()
- self._validators["line"] = v_scattermapbox.LineValidator()
- self._validators["lon"] = v_scattermapbox.LonValidator()
- self._validators["lonsrc"] = v_scattermapbox.LonsrcValidator()
- self._validators["marker"] = v_scattermapbox.MarkerValidator()
- self._validators["meta"] = v_scattermapbox.MetaValidator()
- self._validators["metasrc"] = v_scattermapbox.MetasrcValidator()
- self._validators["mode"] = v_scattermapbox.ModeValidator()
- self._validators["name"] = v_scattermapbox.NameValidator()
- self._validators["opacity"] = v_scattermapbox.OpacityValidator()
- self._validators["selected"] = v_scattermapbox.SelectedValidator()
- self._validators["selectedpoints"] = v_scattermapbox.SelectedpointsValidator()
- self._validators["showlegend"] = v_scattermapbox.ShowlegendValidator()
- self._validators["stream"] = v_scattermapbox.StreamValidator()
- self._validators["subplot"] = v_scattermapbox.SubplotValidator()
- self._validators["text"] = v_scattermapbox.TextValidator()
- self._validators["textfont"] = v_scattermapbox.TextfontValidator()
- self._validators["textposition"] = v_scattermapbox.TextpositionValidator()
- self._validators["textsrc"] = v_scattermapbox.TextsrcValidator()
- self._validators["texttemplate"] = v_scattermapbox.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scattermapbox.TexttemplatesrcValidator()
- self._validators["uid"] = v_scattermapbox.UidValidator()
- self._validators["uirevision"] = v_scattermapbox.UirevisionValidator()
- self._validators["unselected"] = v_scattermapbox.UnselectedValidator()
- self._validators["visible"] = v_scattermapbox.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("below", None)
- self["below"] = below if below is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("lat", None)
- self["lat"] = lat if lat is not None else _v
- _v = arg.pop("latsrc", None)
- self["latsrc"] = latsrc if latsrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("lon", None)
- self["lon"] = lon if lon is not None else _v
- _v = arg.pop("lonsrc", None)
- self["lonsrc"] = lonsrc if lonsrc is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scattermapbox"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scattermapbox", val="scattermapbox"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scattergl(_BaseTraceType):
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # error_x
- # -------
- @property
- def error_x(self):
- """
- The 'error_x' property is an instance of ErrorX
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.ErrorX`
- - A dict of string/value properties that will be passed
- to the ErrorX constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_ystyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scattergl.ErrorX
- """
- return self["error_x"]
-
- @error_x.setter
- def error_x(self, val):
- self["error_x"] = val
-
- # error_y
- # -------
- @property
- def error_y(self):
- """
- The 'error_y' property is an instance of ErrorY
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.ErrorY`
- - A dict of string/value properties that will be passed
- to the ErrorY constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scattergl.ErrorY
- """
- return self["error_y"]
-
- @error_y.setter
- def error_y(self, val):
- self["error_y"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Defaults to "none"
- unless this trace is stacked, then it gets "tonexty"
- ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor`
- if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0
- respectively. "tonextx" and "tonexty" fill between the
- endpoints of this trace and the endpoints of the trace before
- it, connecting those endpoints with straight lines (to make a
- stacked area graph); if there is no trace before it, they
- behave like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if it has
- gaps) into a closed shape. "tonext" fills the space between two
- traces if one completely encloses the other (eg consecutive
- contour lines), and behaves like "toself" if there is no trace
- before it. "tonext" should not be used if one trace does not
- enclose the other. Traces in a `stackgroup` will only fill to
- (or be filled to) other traces in the same group. With multiple
- `stackgroup`s or some traces stacked and some not, if fill-
- linked traces are not already consecutive, the later ones will
- be pushed down in the drawing order.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx',
- 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scattergl.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scattergl.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line color.
- dash
- Sets the style of the lines.
- shape
- Determines the line shape. The values
- correspond to step-wise line shapes.
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scattergl.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scattergl.marker.C
- olorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.scattergl.marker.L
- ine` instance or dict with compatible
- properties
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scattergl.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace.
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattergl.selected
- .Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattergl.selected
- .Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattergl.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scattergl.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scattergl.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergl.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattergl.unselect
- ed.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattergl.unselect
- ed.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattergl.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.scattergl.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scattergl.ErrorY` instance
- or dict with compatible properties
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattergl.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattergl.Line` instance
- or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scattergl.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattergl.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattergl.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattergl.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- error_x=None,
- error_y=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Scattergl object
-
- The data visualized as scatter point or lines is set in `x` and
- `y` using the WebGL plotting engine. Bubble charts are achieved
- by setting `marker.size` and/or `marker.color` to a numerical
- arrays.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scattergl`
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.scattergl.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scattergl.ErrorY` instance
- or dict with compatible properties
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattergl.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattergl.Line` instance
- or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scattergl.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattergl.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattergl.Stream` instance
- or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattergl.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Scattergl
- """
- super(Scattergl, self).__init__("scattergl")
-
- # 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.Scattergl
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scattergl`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scattergl as v_scattergl
-
- # Initialize validators
- # ---------------------
- self._validators["connectgaps"] = v_scattergl.ConnectgapsValidator()
- self._validators["customdata"] = v_scattergl.CustomdataValidator()
- self._validators["customdatasrc"] = v_scattergl.CustomdatasrcValidator()
- self._validators["dx"] = v_scattergl.DxValidator()
- self._validators["dy"] = v_scattergl.DyValidator()
- self._validators["error_x"] = v_scattergl.ErrorXValidator()
- self._validators["error_y"] = v_scattergl.ErrorYValidator()
- self._validators["fill"] = v_scattergl.FillValidator()
- self._validators["fillcolor"] = v_scattergl.FillcolorValidator()
- self._validators["hoverinfo"] = v_scattergl.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scattergl.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scattergl.HoverlabelValidator()
- self._validators["hovertemplate"] = v_scattergl.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_scattergl.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scattergl.HovertextValidator()
- self._validators["hovertextsrc"] = v_scattergl.HovertextsrcValidator()
- self._validators["ids"] = v_scattergl.IdsValidator()
- self._validators["idssrc"] = v_scattergl.IdssrcValidator()
- self._validators["legendgroup"] = v_scattergl.LegendgroupValidator()
- self._validators["line"] = v_scattergl.LineValidator()
- self._validators["marker"] = v_scattergl.MarkerValidator()
- self._validators["meta"] = v_scattergl.MetaValidator()
- self._validators["metasrc"] = v_scattergl.MetasrcValidator()
- self._validators["mode"] = v_scattergl.ModeValidator()
- self._validators["name"] = v_scattergl.NameValidator()
- self._validators["opacity"] = v_scattergl.OpacityValidator()
- self._validators["selected"] = v_scattergl.SelectedValidator()
- self._validators["selectedpoints"] = v_scattergl.SelectedpointsValidator()
- self._validators["showlegend"] = v_scattergl.ShowlegendValidator()
- self._validators["stream"] = v_scattergl.StreamValidator()
- self._validators["text"] = v_scattergl.TextValidator()
- self._validators["textfont"] = v_scattergl.TextfontValidator()
- self._validators["textposition"] = v_scattergl.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scattergl.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scattergl.TextsrcValidator()
- self._validators["texttemplate"] = v_scattergl.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scattergl.TexttemplatesrcValidator()
- self._validators["uid"] = v_scattergl.UidValidator()
- self._validators["uirevision"] = v_scattergl.UirevisionValidator()
- self._validators["unselected"] = v_scattergl.UnselectedValidator()
- self._validators["visible"] = v_scattergl.VisibleValidator()
- self._validators["x"] = v_scattergl.XValidator()
- self._validators["x0"] = v_scattergl.X0Validator()
- self._validators["xaxis"] = v_scattergl.XAxisValidator()
- self._validators["xcalendar"] = v_scattergl.XcalendarValidator()
- self._validators["xsrc"] = v_scattergl.XsrcValidator()
- self._validators["y"] = v_scattergl.YValidator()
- self._validators["y0"] = v_scattergl.Y0Validator()
- self._validators["yaxis"] = v_scattergl.YAxisValidator()
- self._validators["ycalendar"] = v_scattergl.YcalendarValidator()
- self._validators["ysrc"] = v_scattergl.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("error_x", None)
- self["error_x"] = error_x if error_x is not None else _v
- _v = arg.pop("error_y", None)
- self["error_y"] = error_y if error_y is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scattergl"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scattergl", val="scattergl"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scattergeo(_BaseTraceType):
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # featureidkey
- # ------------
- @property
- def featureidkey(self):
- """
- Sets the key in GeoJSON features which is used as id to match
- the items included in the `locations` array. Only has an effect
- when `geojson` is set. Support nested property, for example
- "properties.name".
-
- The 'featureidkey' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["featureidkey"]
-
- @featureidkey.setter
- def featureidkey(self, val):
- self["featureidkey"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Use with `fillcolor`
- if not "none". "toself" connects the endpoints of the trace (or
- each segment of the trace if it has gaps) into a closed shape.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'toself']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # geo
- # ---
- @property
- def geo(self):
- """
- Sets a reference between this trace's geospatial coordinates
- and a geographic map. If "geo" (the default value), the
- geospatial coordinates refer to `layout.geo`. If "geo2", the
- geospatial coordinates refer to `layout.geo2`, and so on.
-
- The 'geo' property is an identifier of a particular
- subplot, of type 'geo', that may be specified as the string 'geo'
- optionally followed by an integer >= 1
- (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.)
-
- Returns
- -------
- str
- """
- return self["geo"]
-
- @geo.setter
- def geo(self, val):
- self["geo"] = val
-
- # geojson
- # -------
- @property
- def geojson(self):
- """
- Sets optional GeoJSON data associated with this trace. If not
- given, the features on the base map are used when `locations`
- is set. It can be set as a valid GeoJSON object or as a URL
- string. Note that we only accept GeoJSONs of type
- "FeatureCollection" or "Feature" with geometries of type
- "Polygon" or "MultiPolygon".
-
- The 'geojson' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["geojson"]
-
- @geojson.setter
- def geojson(self, val):
- self["geojson"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters
- (e.g. 'lon+lat')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scattergeo.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (lon,lat) pair or
- item in `locations`. If a single string, the same string
- appears over all the data points. If an array of string, the
- items are mapped in order to the this trace's (lon,lat) or
- `locations` coordinates. To be seen, trace `hoverinfo` must
- contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # lat
- # ---
- @property
- def lat(self):
- """
- Sets the latitude coordinates (in degrees North).
-
- The 'lat' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lat"]
-
- @lat.setter
- def lat(self, val):
- self["lat"] = val
-
- # latsrc
- # ------
- @property
- def latsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lat .
-
- The 'latsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["latsrc"]
-
- @latsrc.setter
- def latsrc(self, val):
- self["latsrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scattergeo.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line 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.scattergeo.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # locationmode
- # ------------
- @property
- def locationmode(self):
- """
- Determines the set of locations used to match entries in
- `locations` to regions on the map. Values "ISO-3", "USA-
- states", *country names* correspond to features on the base map
- and value "geojson-id" corresponds to features from a custom
- GeoJSON linked to the `geojson` attribute.
-
- The 'locationmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['ISO-3', 'USA-states', 'country names', 'geojson-id']
-
- Returns
- -------
- Any
- """
- return self["locationmode"]
-
- @locationmode.setter
- def locationmode(self, val):
- self["locationmode"] = val
-
- # locations
- # ---------
- @property
- def locations(self):
- """
- Sets the coordinates via location IDs or names. Coordinates
- correspond to the centroid of each location given. See
- `locationmode` for more info.
-
- The 'locations' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["locations"]
-
- @locations.setter
- def locations(self, val):
- self["locations"] = val
-
- # locationssrc
- # ------------
- @property
- def locationssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for locations
- .
-
- The 'locationssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["locationssrc"]
-
- @locationssrc.setter
- def locationssrc(self, val):
- self["locationssrc"] = val
-
- # lon
- # ---
- @property
- def lon(self):
- """
- Sets the longitude coordinates (in degrees East).
-
- The 'lon' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lon"]
-
- @lon.setter
- def lon(self, val):
- self["lon"] = val
-
- # lonsrc
- # ------
- @property
- def lonsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lon .
-
- The 'lonsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lonsrc"]
-
- @lonsrc.setter
- def lonsrc(self, val):
- self["lonsrc"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scattergeo.marker.
- ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- gradient
- :class:`plotly.graph_objects.scattergeo.marker.
- Gradient` instance or dict with compatible
- properties
- line
- :class:`plotly.graph_objects.scattergeo.marker.
- Line` instance or dict with compatible
- properties
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scattergeo.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattergeo.selecte
- d.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattergeo.selecte
- d.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattergeo.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scattergeo.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (lon,lat) pair or item
- in `locations`. If a single string, the same string appears
- over all the data points. If an array of string, the items are
- mapped in order to the this trace's (lon,lat) or `locations`
- coordinates. If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in the
- hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scattergeo.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `lat`, `lon`, `location` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattergeo.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattergeo.unselec
- ted.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattergeo.unselec
- ted.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattergeo.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array. Only
- has an effect when `geojson` is set. Support nested
- property, for example "properties.name".
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- geo
- Sets a reference between this trace's geospatial
- coordinates and a geographic map. If "geo" (the default
- value), the geospatial coordinates refer to
- `layout.geo`. If "geo2", the geospatial coordinates
- refer to `layout.geo2`, and so on.
- geojson
- Sets optional GeoJSON data associated with this trace.
- If not given, the features on the base map are used
- when `locations` is set. It can be set as a valid
- GeoJSON object or as a URL string. Note that we only
- accept GeoJSONs of type "FeatureCollection" or
- "Feature" with geometries of type "Polygon" or
- "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattergeo.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair or item in `locations`. If a single string, the
- same string appears over all the data points. If an
- array of string, the items are mapped in order to the
- this trace's (lon,lat) or `locations` coordinates. To
- be seen, trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattergeo.Line` instance
- or dict with compatible properties
- locationmode
- Determines the set of locations used to match entries
- in `locations` to regions on the map. Values "ISO-3",
- "USA-states", *country names* correspond to features on
- the base map and value "geojson-id" corresponds to
- features from a custom GeoJSON linked to the `geojson`
- attribute.
- locations
- Sets the coordinates via location IDs or names.
- Coordinates correspond to the centroid of each location
- given. See `locationmode` for more info.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- marker
- :class:`plotly.graph_objects.scattergeo.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattergeo.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattergeo.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (lon,lat) pair
- or item in `locations`. If a single string, the same
- string appears over all the data points. If an array of
- string, the items are mapped in order to the this
- trace's (lon,lat) or `locations` coordinates. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is
- not set, these elements will be seen in the hover
- labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `lat`, `lon`,
- `location` and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattergeo.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- featureidkey=None,
- fill=None,
- fillcolor=None,
- geo=None,
- geojson=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- lat=None,
- latsrc=None,
- legendgroup=None,
- line=None,
- locationmode=None,
- locations=None,
- locationssrc=None,
- lon=None,
- lonsrc=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Scattergeo object
-
- The data visualized as scatter point or lines on a geographic
- map is provided either by longitude/latitude pairs in `lon` and
- `lat` respectively or by geographic location IDs or names in
- `locations`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scattergeo`
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array. Only
- has an effect when `geojson` is set. Support nested
- property, for example "properties.name".
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- geo
- Sets a reference between this trace's geospatial
- coordinates and a geographic map. If "geo" (the default
- value), the geospatial coordinates refer to
- `layout.geo`. If "geo2", the geospatial coordinates
- refer to `layout.geo2`, and so on.
- geojson
- Sets optional GeoJSON data associated with this trace.
- If not given, the features on the base map are used
- when `locations` is set. It can be set as a valid
- GeoJSON object or as a URL string. Note that we only
- accept GeoJSONs of type "FeatureCollection" or
- "Feature" with geometries of type "Polygon" or
- "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattergeo.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair or item in `locations`. If a single string, the
- same string appears over all the data points. If an
- array of string, the items are mapped in order to the
- this trace's (lon,lat) or `locations` coordinates. To
- be seen, trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattergeo.Line` instance
- or dict with compatible properties
- locationmode
- Determines the set of locations used to match entries
- in `locations` to regions on the map. Values "ISO-3",
- "USA-states", *country names* correspond to features on
- the base map and value "geojson-id" corresponds to
- features from a custom GeoJSON linked to the `geojson`
- attribute.
- locations
- Sets the coordinates via location IDs or names.
- Coordinates correspond to the centroid of each location
- given. See `locationmode` for more info.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- marker
- :class:`plotly.graph_objects.scattergeo.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattergeo.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattergeo.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (lon,lat) pair
- or item in `locations`. If a single string, the same
- string appears over all the data points. If an array of
- string, the items are mapped in order to the this
- trace's (lon,lat) or `locations` coordinates. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is
- not set, these elements will be seen in the hover
- labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `lat`, `lon`,
- `location` and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattergeo.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Scattergeo
- """
- super(Scattergeo, self).__init__("scattergeo")
-
- # 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.Scattergeo
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scattergeo`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scattergeo as v_scattergeo
-
- # Initialize validators
- # ---------------------
- self._validators["connectgaps"] = v_scattergeo.ConnectgapsValidator()
- self._validators["customdata"] = v_scattergeo.CustomdataValidator()
- self._validators["customdatasrc"] = v_scattergeo.CustomdatasrcValidator()
- self._validators["featureidkey"] = v_scattergeo.FeatureidkeyValidator()
- self._validators["fill"] = v_scattergeo.FillValidator()
- self._validators["fillcolor"] = v_scattergeo.FillcolorValidator()
- self._validators["geo"] = v_scattergeo.GeoValidator()
- self._validators["geojson"] = v_scattergeo.GeojsonValidator()
- self._validators["hoverinfo"] = v_scattergeo.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scattergeo.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scattergeo.HoverlabelValidator()
- self._validators["hovertemplate"] = v_scattergeo.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_scattergeo.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scattergeo.HovertextValidator()
- self._validators["hovertextsrc"] = v_scattergeo.HovertextsrcValidator()
- self._validators["ids"] = v_scattergeo.IdsValidator()
- self._validators["idssrc"] = v_scattergeo.IdssrcValidator()
- self._validators["lat"] = v_scattergeo.LatValidator()
- self._validators["latsrc"] = v_scattergeo.LatsrcValidator()
- self._validators["legendgroup"] = v_scattergeo.LegendgroupValidator()
- self._validators["line"] = v_scattergeo.LineValidator()
- self._validators["locationmode"] = v_scattergeo.LocationmodeValidator()
- self._validators["locations"] = v_scattergeo.LocationsValidator()
- self._validators["locationssrc"] = v_scattergeo.LocationssrcValidator()
- self._validators["lon"] = v_scattergeo.LonValidator()
- self._validators["lonsrc"] = v_scattergeo.LonsrcValidator()
- self._validators["marker"] = v_scattergeo.MarkerValidator()
- self._validators["meta"] = v_scattergeo.MetaValidator()
- self._validators["metasrc"] = v_scattergeo.MetasrcValidator()
- self._validators["mode"] = v_scattergeo.ModeValidator()
- self._validators["name"] = v_scattergeo.NameValidator()
- self._validators["opacity"] = v_scattergeo.OpacityValidator()
- self._validators["selected"] = v_scattergeo.SelectedValidator()
- self._validators["selectedpoints"] = v_scattergeo.SelectedpointsValidator()
- self._validators["showlegend"] = v_scattergeo.ShowlegendValidator()
- self._validators["stream"] = v_scattergeo.StreamValidator()
- self._validators["text"] = v_scattergeo.TextValidator()
- self._validators["textfont"] = v_scattergeo.TextfontValidator()
- self._validators["textposition"] = v_scattergeo.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scattergeo.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scattergeo.TextsrcValidator()
- self._validators["texttemplate"] = v_scattergeo.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scattergeo.TexttemplatesrcValidator()
- self._validators["uid"] = v_scattergeo.UidValidator()
- self._validators["uirevision"] = v_scattergeo.UirevisionValidator()
- self._validators["unselected"] = v_scattergeo.UnselectedValidator()
- self._validators["visible"] = v_scattergeo.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("featureidkey", None)
- self["featureidkey"] = featureidkey if featureidkey is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("geo", None)
- self["geo"] = geo if geo is not None else _v
- _v = arg.pop("geojson", None)
- self["geojson"] = geojson if geojson is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("lat", None)
- self["lat"] = lat if lat is not None else _v
- _v = arg.pop("latsrc", None)
- self["latsrc"] = latsrc if latsrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("locationmode", None)
- self["locationmode"] = locationmode if locationmode is not None else _v
- _v = arg.pop("locations", None)
- self["locations"] = locations if locations is not None else _v
- _v = arg.pop("locationssrc", None)
- self["locationssrc"] = locationssrc if locationssrc is not None else _v
- _v = arg.pop("lon", None)
- self["lon"] = lon if lon is not None else _v
- _v = arg.pop("lonsrc", None)
- self["lonsrc"] = lonsrc if lonsrc is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scattergeo"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scattergeo", val="scattergeo"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scattercarpet(_BaseTraceType):
-
- # a
- # -
- @property
- def a(self):
- """
- Sets the a-axis coordinates.
-
- The 'a' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["a"]
-
- @a.setter
- def a(self, val):
- self["a"] = val
-
- # asrc
- # ----
- @property
- def asrc(self):
- """
- Sets the source reference on Chart Studio Cloud for a .
-
- The 'asrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["asrc"]
-
- @asrc.setter
- def asrc(self, val):
- self["asrc"] = val
-
- # b
- # -
- @property
- def b(self):
- """
- Sets the b-axis coordinates.
-
- The 'b' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["b"]
-
- @b.setter
- def b(self, val):
- self["b"] = val
-
- # bsrc
- # ----
- @property
- def bsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for b .
-
- The 'bsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["bsrc"]
-
- @bsrc.setter
- def bsrc(self, val):
- self["bsrc"] = val
-
- # carpet
- # ------
- @property
- def carpet(self):
- """
- An identifier for this carpet, so that `scattercarpet` and
- `contourcarpet` traces can specify a carpet plot on which they
- lie
-
- The 'carpet' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["carpet"]
-
- @carpet.setter
- def carpet(self, val):
- self["carpet"] = val
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Use with `fillcolor`
- if not "none". scatterternary has a subset of the options
- available to scatter. "toself" connects the endpoints of the
- trace (or each segment of the trace if it has gaps) into a
- closed shape. "tonext" fills the space between two traces if
- one completely encloses the other (eg consecutive contour
- lines), and behaves like "toself" if there is no trace before
- it. "tonext" should not be used if one trace does not enclose
- the other.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters
- (e.g. 'a+b')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual points (markers or
- line points) or do they highlight filled regions? If the fill
- is "toself" or "tonext" and there are no markers or text, then
- the default is "fills", otherwise it is "points".
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['points', 'fills'] joined with '+' characters
- (e.g. 'points+fills')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (a,b) point. If a
- single string, the same string appears over all the data
- points. If an array of strings, the items are mapped in order
- to the the data points in (a,b). To be seen, trace `hoverinfo`
- must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scattercarpet.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line 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").
- shape
- Determines the line shape. With "spline" the
- lines are drawn using spline interpolation. The
- other available values correspond to step-wise
- line shapes.
- smoothing
- Has an effect only if `shape` is set to
- "spline" Sets the amount of smoothing. 0
- corresponds to no smoothing (equivalent to a
- "linear" shape).
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scattercarpet.mark
- er.ColorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- gradient
- :class:`plotly.graph_objects.scattercarpet.mark
- er.Gradient` instance or dict with compatible
- properties
- line
- :class:`plotly.graph_objects.scattercarpet.mark
- er.Line` instance or dict with compatible
- properties
- maxdisplayed
- Sets a maximum number of points to be drawn on
- the graph. 0 corresponds to no limit.
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattercarpet.sele
- cted.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattercarpet.sele
- cted.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scattercarpet.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (a,b) point. If a
- single string, the same string appears over all the data
- points. If an array of strings, the items are mapped in order
- to the the data points in (a,b). If trace `hoverinfo` contains
- a "text" flag and "hovertext" is not set, these elements will
- be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `a`, `b` and `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scattercarpet.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scattercarpet.unse
- lected.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scattercarpet.unse
- lected.Textfont` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.scattercarpet.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- a
- Sets the a-axis coordinates.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- Sets the b-axis coordinates.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- carpet
- An identifier for this carpet, so that `scattercarpet`
- and `contourcarpet` traces can specify a carpet plot on
- which they lie
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterternary has a subset
- of the options available to scatter. "toself" connects
- the endpoints of the trace (or each segment of the
- trace if it has gaps) into a closed shape. "tonext"
- fills the space between two traces if one completely
- encloses the other (eg consecutive contour lines), and
- behaves like "toself" if there is no trace before it.
- "tonext" should not be used if one trace does not
- enclose the other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattercarpet.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (a,b)
- point. If a single string, the same string appears over
- all the data points. If an array of strings, the items
- are mapped in order to the the data points in (a,b). To
- be seen, trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattercarpet.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scattercarpet.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattercarpet.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattercarpet.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (a,b) point. If
- a single string, the same string appears over all the
- data points. If an array of strings, the items are
- mapped in order to the the data points in (a,b). If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `a`, `b` and
- `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattercarpet.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- """
-
- def __init__(
- self,
- arg=None,
- a=None,
- asrc=None,
- b=None,
- bsrc=None,
- carpet=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- fill=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- xaxis=None,
- yaxis=None,
- **kwargs
- ):
- """
- Construct a new Scattercarpet object
-
- Plots a scatter trace on either the first carpet axis or the
- carpet axis with a matching `carpet` attribute.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scattercarpet`
- a
- Sets the a-axis coordinates.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- Sets the b-axis coordinates.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- carpet
- An identifier for this carpet, so that `scattercarpet`
- and `contourcarpet` traces can specify a carpet plot on
- which they lie
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- fill
- Sets the area to fill with a solid color. Use with
- `fillcolor` if not "none". scatterternary has a subset
- of the options available to scatter. "toself" connects
- the endpoints of the trace (or each segment of the
- trace if it has gaps) into a closed shape. "tonext"
- fills the space between two traces if one completely
- encloses the other (eg consecutive contour lines), and
- behaves like "toself" if there is no trace before it.
- "tonext" should not be used if one trace does not
- enclose the other.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scattercarpet.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (a,b)
- point. If a single string, the same string appears over
- all the data points. If an array of strings, the items
- are mapped in order to the the data points in (a,b). To
- be seen, trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scattercarpet.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scattercarpet.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- selected
- :class:`plotly.graph_objects.scattercarpet.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scattercarpet.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (a,b) point. If
- a single string, the same string appears over all the
- data points. If an array of strings, the items are
- mapped in order to the the data points in (a,b). If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `a`, `b` and
- `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scattercarpet.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
-
- Returns
- -------
- Scattercarpet
- """
- super(Scattercarpet, self).__init__("scattercarpet")
-
- # 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.Scattercarpet
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scattercarpet`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scattercarpet as v_scattercarpet
-
- # Initialize validators
- # ---------------------
- self._validators["a"] = v_scattercarpet.AValidator()
- self._validators["asrc"] = v_scattercarpet.AsrcValidator()
- self._validators["b"] = v_scattercarpet.BValidator()
- self._validators["bsrc"] = v_scattercarpet.BsrcValidator()
- self._validators["carpet"] = v_scattercarpet.CarpetValidator()
- self._validators["connectgaps"] = v_scattercarpet.ConnectgapsValidator()
- self._validators["customdata"] = v_scattercarpet.CustomdataValidator()
- self._validators["customdatasrc"] = v_scattercarpet.CustomdatasrcValidator()
- self._validators["fill"] = v_scattercarpet.FillValidator()
- self._validators["fillcolor"] = v_scattercarpet.FillcolorValidator()
- self._validators["hoverinfo"] = v_scattercarpet.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scattercarpet.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scattercarpet.HoverlabelValidator()
- self._validators["hoveron"] = v_scattercarpet.HoveronValidator()
- self._validators["hovertemplate"] = v_scattercarpet.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_scattercarpet.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scattercarpet.HovertextValidator()
- self._validators["hovertextsrc"] = v_scattercarpet.HovertextsrcValidator()
- self._validators["ids"] = v_scattercarpet.IdsValidator()
- self._validators["idssrc"] = v_scattercarpet.IdssrcValidator()
- self._validators["legendgroup"] = v_scattercarpet.LegendgroupValidator()
- self._validators["line"] = v_scattercarpet.LineValidator()
- self._validators["marker"] = v_scattercarpet.MarkerValidator()
- self._validators["meta"] = v_scattercarpet.MetaValidator()
- self._validators["metasrc"] = v_scattercarpet.MetasrcValidator()
- self._validators["mode"] = v_scattercarpet.ModeValidator()
- self._validators["name"] = v_scattercarpet.NameValidator()
- self._validators["opacity"] = v_scattercarpet.OpacityValidator()
- self._validators["selected"] = v_scattercarpet.SelectedValidator()
- self._validators["selectedpoints"] = v_scattercarpet.SelectedpointsValidator()
- self._validators["showlegend"] = v_scattercarpet.ShowlegendValidator()
- self._validators["stream"] = v_scattercarpet.StreamValidator()
- self._validators["text"] = v_scattercarpet.TextValidator()
- self._validators["textfont"] = v_scattercarpet.TextfontValidator()
- self._validators["textposition"] = v_scattercarpet.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scattercarpet.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scattercarpet.TextsrcValidator()
- self._validators["texttemplate"] = v_scattercarpet.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scattercarpet.TexttemplatesrcValidator()
- self._validators["uid"] = v_scattercarpet.UidValidator()
- self._validators["uirevision"] = v_scattercarpet.UirevisionValidator()
- self._validators["unselected"] = v_scattercarpet.UnselectedValidator()
- self._validators["visible"] = v_scattercarpet.VisibleValidator()
- self._validators["xaxis"] = v_scattercarpet.XAxisValidator()
- self._validators["yaxis"] = v_scattercarpet.YAxisValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("a", None)
- self["a"] = a if a is not None else _v
- _v = arg.pop("asrc", None)
- self["asrc"] = asrc if asrc is not None else _v
- _v = arg.pop("b", None)
- self["b"] = b if b is not None else _v
- _v = arg.pop("bsrc", None)
- self["bsrc"] = bsrc if bsrc is not None else _v
- _v = arg.pop("carpet", None)
- self["carpet"] = carpet if carpet is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scattercarpet"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scattercarpet", val="scattercarpet"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scatter3d(_BaseTraceType):
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # error_x
- # -------
- @property
- def error_x(self):
- """
- The 'error_x' property is an instance of ErrorX
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.ErrorX`
- - A dict of string/value properties that will be passed
- to the ErrorX constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_zstyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scatter3d.ErrorX
- """
- return self["error_x"]
-
- @error_x.setter
- def error_x(self, val):
- self["error_x"] = val
-
- # error_y
- # -------
- @property
- def error_y(self):
- """
- The 'error_y' property is an instance of ErrorY
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.ErrorY`
- - A dict of string/value properties that will be passed
- to the ErrorY constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_zstyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scatter3d.ErrorY
- """
- return self["error_y"]
-
- @error_y.setter
- def error_y(self, val):
- self["error_y"] = val
-
- # error_z
- # -------
- @property
- def error_z(self):
- """
- The 'error_z' property is an instance of ErrorZ
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.ErrorZ`
- - A dict of string/value properties that will be passed
- to the ErrorZ constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scatter3d.ErrorZ
- """
- return self["error_z"]
-
- @error_z.setter
- def error_z(self, val):
- self["error_z"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scatter3d.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets text elements associated with each (x,y,z) triplet. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y,z) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scatter3d.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `line.colorscale`. Has an effect
- only if in `line.color`is set to a numerical
- array. 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
- in `line.color`) or the bounds set in
- `line.cmin` and `line.cmax` Has an effect only
- if in `line.color`is set to a numerical array.
- Defaults to `false` when `line.cmin` and
- `line.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `line.cmin` and/or `line.cmax` to be
- equidistant to this point. Has an effect only
- if in `line.color`is set to a numerical array.
- Value should have the same units as in
- `line.color`. Has no effect when `line.cauto`
- is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmax` must be set as well.
- color
- Sets thelinecolor. It accepts either a specific
- color or an array of numbers that are mapped to
- the colorscale relative to the max and min
- values of the array or relative to `line.cmin`
- and `line.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatter3d.line.Col
- orBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `line.color`is set to a numerical array. 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`line.cmin` and `line.cmax`.
- Alternatively, `colorscale` may be a palette
- name string of the following list: Greys,YlGnBu
- ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R
- ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri
- c,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- dash
- Sets the dash style of the lines.
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `line.color`is set to a
- numerical array. If true, `line.cmin` will
- correspond to the last color in the array and
- `line.cmax` will correspond to the first color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `line.color`is set to a numerical array.
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scatter3d.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatter3d.marker.C
- olorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.scatter3d.marker.L
- ine` instance or dict with compatible
- properties
- opacity
- Sets the marker opacity. Note that the marker
- opacity for scatter3d traces must be a scalar
- value for performance reasons. To set a
- blending opacity value (i.e. which is not
- transparent), set "marker.color" to an rgba
- color and use its alpha channel.
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scatter3d.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # 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.scatter3d.Projection`
- - A dict of string/value properties that will be passed
- to the Projection constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.scatter3d.projecti
- on.X` instance or dict with compatible
- properties
- y
- :class:`plotly.graph_objects.scatter3d.projecti
- on.Y` instance or dict with compatible
- properties
- z
- :class:`plotly.graph_objects.scatter3d.projecti
- on.Z` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scatter3d.Projection
- """
- return self["projection"]
-
- @projection.setter
- def projection(self, val):
- self["projection"] = val
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scatter3d.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # surfaceaxis
- # -----------
- @property
- def surfaceaxis(self):
- """
- If "-1", the scatter points are not fill with a surface If 0,
- 1, 2, the scatter points are filled with a Delaunay surface
- about the x, y, z respectively.
-
- The 'surfaceaxis' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [-1, 0, 1, 2]
-
- Returns
- -------
- Any
- """
- return self["surfaceaxis"]
-
- @surfaceaxis.setter
- def surfaceaxis(self, val):
- self["surfaceaxis"] = val
-
- # surfacecolor
- # ------------
- @property
- def surfacecolor(self):
- """
- Sets the surface fill color.
-
- The 'surfacecolor' 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["surfacecolor"]
-
- @surfacecolor.setter
- def surfacecolor(self, val):
- self["surfacecolor"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y,z) triplet. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y,z) coordinates. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set, these
- elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter3d.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scatter3d.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z coordinates.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zcalendar
- # ---------
- @property
- def zcalendar(self):
- """
- Sets the calendar system to use with `z` date data.
-
- The 'zcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["zcalendar"]
-
- @zcalendar.setter
- def zcalendar(self, val):
- self["zcalendar"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- error_x
- :class:`plotly.graph_objects.scatter3d.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scatter3d.ErrorY` instance
- or dict with compatible properties
- error_z
- :class:`plotly.graph_objects.scatter3d.ErrorZ` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatter3d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets text elements associated with each (x,y,z)
- triplet. If a single string, the same string appears
- over all the data points. If an array of string, the
- items are mapped in order to the this trace's (x,y,z)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatter3d.Line` instance
- or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatter3d.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- projection
- :class:`plotly.graph_objects.scatter3d.Projection`
- instance or dict with compatible properties
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatter3d.Stream` instance
- or dict with compatible properties
- surfaceaxis
- If "-1", the scatter points are not fill with a surface
- If 0, 1, 2, the scatter points are filled with a
- Delaunay surface about the x, y, z respectively.
- surfacecolor
- Sets the surface fill color.
- text
- Sets text elements associated with each (x,y,z)
- triplet. If a single string, the same string appears
- over all the data points. If an array of string, the
- items are mapped in order to the this trace's (x,y,z)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- textfont
- :class:`plotly.graph_objects.scatter3d.Textfont`
- instance or dict with compatible properties
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- error_x=None,
- error_y=None,
- error_z=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- projection=None,
- scene=None,
- showlegend=None,
- stream=None,
- surfaceaxis=None,
- surfacecolor=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- ycalendar=None,
- ysrc=None,
- z=None,
- zcalendar=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Scatter3d object
-
- The data visualized as scatter point or lines in 3D dimension
- is set in `x`, `y`, `z`. Text (appearing either on the chart or
- on hover only) is via `text`. Bubble charts are achieved by
- setting `marker.size` and/or `marker.color` Projections are
- achieved via `projection`. Surface fills are achieved via
- `surfaceaxis`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scatter3d`
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- error_x
- :class:`plotly.graph_objects.scatter3d.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scatter3d.ErrorY` instance
- or dict with compatible properties
- error_z
- :class:`plotly.graph_objects.scatter3d.ErrorZ` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatter3d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets text elements associated with each (x,y,z)
- triplet. If a single string, the same string appears
- over all the data points. If an array of string, the
- items are mapped in order to the this trace's (x,y,z)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatter3d.Line` instance
- or dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatter3d.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- projection
- :class:`plotly.graph_objects.scatter3d.Projection`
- instance or dict with compatible properties
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.scatter3d.Stream` instance
- or dict with compatible properties
- surfaceaxis
- If "-1", the scatter points are not fill with a surface
- If 0, 1, 2, the scatter points are filled with a
- Delaunay surface about the x, y, z respectively.
- surfacecolor
- Sets the surface fill color.
- text
- Sets text elements associated with each (x,y,z)
- triplet. If a single string, the same string appears
- over all the data points. If an array of string, the
- items are mapped in order to the this trace's (x,y,z)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- textfont
- :class:`plotly.graph_objects.scatter3d.Textfont`
- instance or dict with compatible properties
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Scatter3d
- """
- super(Scatter3d, self).__init__("scatter3d")
-
- # 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.Scatter3d
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scatter3d`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scatter3d as v_scatter3d
-
- # Initialize validators
- # ---------------------
- self._validators["connectgaps"] = v_scatter3d.ConnectgapsValidator()
- self._validators["customdata"] = v_scatter3d.CustomdataValidator()
- self._validators["customdatasrc"] = v_scatter3d.CustomdatasrcValidator()
- self._validators["error_x"] = v_scatter3d.ErrorXValidator()
- self._validators["error_y"] = v_scatter3d.ErrorYValidator()
- self._validators["error_z"] = v_scatter3d.ErrorZValidator()
- self._validators["hoverinfo"] = v_scatter3d.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scatter3d.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scatter3d.HoverlabelValidator()
- self._validators["hovertemplate"] = v_scatter3d.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_scatter3d.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scatter3d.HovertextValidator()
- self._validators["hovertextsrc"] = v_scatter3d.HovertextsrcValidator()
- self._validators["ids"] = v_scatter3d.IdsValidator()
- self._validators["idssrc"] = v_scatter3d.IdssrcValidator()
- self._validators["legendgroup"] = v_scatter3d.LegendgroupValidator()
- self._validators["line"] = v_scatter3d.LineValidator()
- self._validators["marker"] = v_scatter3d.MarkerValidator()
- self._validators["meta"] = v_scatter3d.MetaValidator()
- self._validators["metasrc"] = v_scatter3d.MetasrcValidator()
- self._validators["mode"] = v_scatter3d.ModeValidator()
- self._validators["name"] = v_scatter3d.NameValidator()
- self._validators["opacity"] = v_scatter3d.OpacityValidator()
- self._validators["projection"] = v_scatter3d.ProjectionValidator()
- self._validators["scene"] = v_scatter3d.SceneValidator()
- self._validators["showlegend"] = v_scatter3d.ShowlegendValidator()
- self._validators["stream"] = v_scatter3d.StreamValidator()
- self._validators["surfaceaxis"] = v_scatter3d.SurfaceaxisValidator()
- self._validators["surfacecolor"] = v_scatter3d.SurfacecolorValidator()
- self._validators["text"] = v_scatter3d.TextValidator()
- self._validators["textfont"] = v_scatter3d.TextfontValidator()
- self._validators["textposition"] = v_scatter3d.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scatter3d.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scatter3d.TextsrcValidator()
- self._validators["texttemplate"] = v_scatter3d.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scatter3d.TexttemplatesrcValidator()
- self._validators["uid"] = v_scatter3d.UidValidator()
- self._validators["uirevision"] = v_scatter3d.UirevisionValidator()
- self._validators["visible"] = v_scatter3d.VisibleValidator()
- self._validators["x"] = v_scatter3d.XValidator()
- self._validators["xcalendar"] = v_scatter3d.XcalendarValidator()
- self._validators["xsrc"] = v_scatter3d.XsrcValidator()
- self._validators["y"] = v_scatter3d.YValidator()
- self._validators["ycalendar"] = v_scatter3d.YcalendarValidator()
- self._validators["ysrc"] = v_scatter3d.YsrcValidator()
- self._validators["z"] = v_scatter3d.ZValidator()
- self._validators["zcalendar"] = v_scatter3d.ZcalendarValidator()
- self._validators["zsrc"] = v_scatter3d.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("error_x", None)
- self["error_x"] = error_x if error_x is not None else _v
- _v = arg.pop("error_y", None)
- self["error_y"] = error_y if error_y is not None else _v
- _v = arg.pop("error_z", None)
- self["error_z"] = error_z if error_z is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("projection", None)
- self["projection"] = projection if projection is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("surfaceaxis", None)
- self["surfaceaxis"] = surfaceaxis if surfaceaxis is not None else _v
- _v = arg.pop("surfacecolor", None)
- self["surfacecolor"] = surfacecolor if surfacecolor is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zcalendar", None)
- self["zcalendar"] = zcalendar if zcalendar is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scatter3d"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scatter3d", val="scatter3d"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Scatter(_BaseTraceType):
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether or not markers and text nodes are clipped
- about the subplot axes. To show markers and text nodes above
- axis lines and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the provided data arrays are connected.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # error_x
- # -------
- @property
- def error_x(self):
- """
- The 'error_x' property is an instance of ErrorX
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.ErrorX`
- - A dict of string/value properties that will be passed
- to the ErrorX constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_ystyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scatter.ErrorX
- """
- return self["error_x"]
-
- @error_x.setter
- def error_x(self, val):
- self["error_x"] = val
-
- # error_y
- # -------
- @property
- def error_y(self):
- """
- The 'error_y' property is an instance of ErrorY
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.ErrorY`
- - A dict of string/value properties that will be passed
- to the ErrorY constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.scatter.ErrorY
- """
- return self["error_y"]
-
- @error_y.setter
- def error_y(self, val):
- self["error_y"] = val
-
- # fill
- # ----
- @property
- def fill(self):
- """
- Sets the area to fill with a solid color. Defaults to "none"
- unless this trace is stacked, then it gets "tonexty"
- ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor`
- if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0
- respectively. "tonextx" and "tonexty" fill between the
- endpoints of this trace and the endpoints of the trace before
- it, connecting those endpoints with straight lines (to make a
- stacked area graph); if there is no trace before it, they
- behave like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if it has
- gaps) into a closed shape. "tonext" fills the space between two
- traces if one completely encloses the other (eg consecutive
- contour lines), and behaves like "toself" if there is no trace
- before it. "tonext" should not be used if one trace does not
- enclose the other. Traces in a `stackgroup` will only fill to
- (or be filled to) other traces in the same group. With multiple
- `stackgroup`s or some traces stacked and some not, if fill-
- linked traces are not already consecutive, the later ones will
- be pushed down in the drawing order.
-
- The 'fill' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx',
- 'toself', 'tonext']
-
- Returns
- -------
- Any
- """
- return self["fill"]
-
- @fill.setter
- def fill(self, val):
- self["fill"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # groupnorm
- # ---------
- @property
- def groupnorm(self):
- """
- Only relevant when `stackgroup` is used, and only the first
- `groupnorm` found in the `stackgroup` will be used - including
- if `visible` is "legendonly" but not if it is `false`. Sets the
- normalization for the sum of this `stackgroup`. With
- "fraction", the value of each trace at each location is divided
- by the sum of all trace values at that location. "percent" is
- the same but multiplied by 100 to show percentages. If there
- are multiple subplots, or multiple `stackgroup`s on one
- subplot, each will be normalized within its own set.
-
- The 'groupnorm' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['', 'fraction', 'percent']
-
- Returns
- -------
- Any
- """
- return self["groupnorm"]
-
- @groupnorm.setter
- def groupnorm(self, val):
- self["groupnorm"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.scatter.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual points (markers or
- line points) or do they highlight filled regions? If the fill
- is "toself" or "tonext" and there are no markers or text, then
- the default is "fills", otherwise it is "points".
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['points', 'fills'] joined with '+' characters
- (e.g. 'points+fills')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.scatter.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the line 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").
- shape
- Determines the line shape. With "spline" the
- lines are drawn using spline interpolation. The
- other available values correspond to step-wise
- line shapes.
- simplify
- Simplifies lines by removing nearly-collinear
- points. When transitioning lines, it may be
- desirable to disable this so that the number of
- points along the resulting SVG path is
- unaffected.
- smoothing
- Has an effect only if `shape` is set to
- "spline" Sets the amount of smoothing. 0
- corresponds to no smoothing (equivalent to a
- "linear" shape).
- width
- Sets the line width (in px).
-
- Returns
- -------
- plotly.graph_objs.scatter.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.scatter.marker.Col
- orBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- gradient
- :class:`plotly.graph_objects.scatter.marker.Gra
- dient` instance or dict with compatible
- properties
- line
- :class:`plotly.graph_objects.scatter.marker.Lin
- e` instance or dict with compatible properties
- maxdisplayed
- Sets a maximum number of points to be drawn on
- the graph. 0 corresponds to no limit.
- opacity
- Sets the marker opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
- size
- Sets the marker size (in px).
- sizemin
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the minimum size (in px)
- of the rendered marker points.
- sizemode
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the rule for which the
- data in `size` is converted to pixels.
- sizeref
- Has an effect only if `marker.size` is set to a
- numerical array. Sets the scale factor used to
- determine the rendered size of marker points.
- Use with `sizemin` and `sizemode`.
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.scatter.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines the drawing mode for this scatter trace. If the
- provided `mode` includes "text" then the `text` elements appear
- at the coordinates. Otherwise, the `text` elements appear on
- hover. If there are less than 20 points and the trace is not
- stacked then the default is "lines+markers". Otherwise,
- "lines".
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lines', 'markers', 'text'] joined with '+' characters
- (e.g. 'lines+markers')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Only relevant when `stackgroup` is used, and only the first
- `orientation` found in the `stackgroup` will be used -
- including if `visible` is "legendonly" but not if it is
- `false`. Sets the stacking direction. With "v" ("h"), the y (x)
- values of subsequent traces are added. Also affects the default
- value of `fill`.
-
- 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
-
- # r
- # -
- @property
- def r(self):
- """
- r coordinates in scatter traces are deprecated!Please switch to
- the "scatterpolar" trace type.Sets the radial coordinatesfor
- legacy polar chart only.
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatter.selected.M
- arker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatter.selected.T
- extfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scatter.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stackgaps
- # ---------
- @property
- def stackgaps(self):
- """
- Only relevant when `stackgroup` is used, and only the first
- `stackgaps` found in the `stackgroup` will be used - including
- if `visible` is "legendonly" but not if it is `false`.
- Determines how we handle locations at which other traces in
- this group have data but this one does not. With *infer zero*
- we insert a zero at these locations. With "interpolate" we
- linearly interpolate between existing values, and extrapolate a
- constant beyond the existing values.
-
- The 'stackgaps' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['infer zero', 'interpolate']
-
- Returns
- -------
- Any
- """
- return self["stackgaps"]
-
- @stackgaps.setter
- def stackgaps(self, val):
- self["stackgaps"] = val
-
- # stackgroup
- # ----------
- @property
- def stackgroup(self):
- """
- Set several scatter traces (on the same subplot) to the same
- stackgroup in order to add their y values (or their x values if
- `orientation` is "h"). If blank or omitted this trace will not
- be stacked. Stacking also turns `fill` on by default, using
- "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets
- the default `mode` to "lines" irrespective of point count. You
- can only stack on a numeric (linear or log) axis. Traces in a
- `stackgroup` will only fill to (or be filled to) other traces
- in the same group. With multiple `stackgroup`s or some traces
- stacked and some not, if fill-linked traces are not already
- consecutive, the later ones will be pushed down in the drawing
- order.
-
- The 'stackgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["stackgroup"]
-
- @stackgroup.setter
- def stackgroup(self, val):
- self["stackgroup"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.scatter.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # t
- # -
- @property
- def t(self):
- """
- t coordinates in scatter traces are deprecated!Please switch to
- the "scatterpolar" trace type.Sets the angular coordinatesfor
- legacy polar chart only.
-
- The 't' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["t"]
-
- @t.setter
- def t(self, val):
- self["t"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the text font.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.scatter.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']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # tsrc
- # ----
- @property
- def tsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for t .
-
- The 'tsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["tsrc"]
-
- @tsrc.setter
- def tsrc(self, val):
- self["tsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.scatter.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.scatter.unselected
- .Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.scatter.unselected
- .Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.scatter.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.scatter.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scatter.ErrorY` instance
- or dict with compatible properties
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- groupnorm
- Only relevant when `stackgroup` is used, and only the
- first `groupnorm` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Sets the normalization for the sum of
- this `stackgroup`. With "fraction", the value of each
- trace at each location is divided by the sum of all
- trace values at that location. "percent" is the same
- but multiplied by 100 to show percentages. If there are
- multiple subplots, or multiple `stackgroup`s on one
- subplot, each will be normalized within its own set.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatter.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatter.Line` instance or
- dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatter.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- orientation
- Only relevant when `stackgroup` is used, and only the
- first `orientation` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Sets the stacking direction. With "v"
- ("h"), the y (x) values of subsequent traces are added.
- Also affects the default value of `fill`.
- r
- r coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the radial
- coordinatesfor legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatter.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stackgaps
- Only relevant when `stackgroup` is used, and only the
- first `stackgaps` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Determines how we handle locations at
- which other traces in this group have data but this one
- does not. With *infer zero* we insert a zero at these
- locations. With "interpolate" we linearly interpolate
- between existing values, and extrapolate a constant
- beyond the existing values.
- stackgroup
- Set several scatter traces (on the same subplot) to the
- same stackgroup in order to add their y values (or
- their x values if `orientation` is "h"). If blank or
- omitted this trace will not be stacked. Stacking also
- turns `fill` on by default, using "tonexty" ("tonextx")
- if `orientation` is "h" ("v") and sets the default
- `mode` to "lines" irrespective of point count. You can
- only stack on a numeric (linear or log) axis. Traces in
- a `stackgroup` will only fill to (or be filled to)
- other traces in the same group. With multiple
- `stackgroup`s or some traces stacked and some not, if
- fill-linked traces are not already consecutive, the
- later ones will be pushed down in the drawing order.
- stream
- :class:`plotly.graph_objects.scatter.Stream` instance
- or dict with compatible properties
- t
- t coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the
- angular coordinatesfor legacy polar chart only.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatter.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- cliponaxis=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- error_x=None,
- error_y=None,
- fill=None,
- fillcolor=None,
- groupnorm=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- opacity=None,
- orientation=None,
- r=None,
- rsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stackgaps=None,
- stackgroup=None,
- stream=None,
- t=None,
- text=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- tsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Scatter object
-
- The scatter trace type encompasses line charts, scatter charts,
- text charts, and bubble charts. The data visualized as scatter
- point or lines is set in `x` and `y`. Text (appearing either on
- the chart or on hover only) is via `text`. Bubble charts are
- achieved by setting `marker.size` and/or `marker.color` to
- numerical arrays.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Scatter`
- cliponaxis
- Determines whether or not markers and text nodes are
- clipped about the subplot axes. To show markers and
- text nodes above axis lines and tick labels, make sure
- to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the provided data arrays are connected.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.scatter.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.scatter.ErrorY` instance
- or dict with compatible properties
- fill
- Sets the area to fill with a solid color. Defaults to
- "none" unless this trace is stacked, then it gets
- "tonexty" ("tonextx") if `orientation` is "v" ("h") Use
- with `fillcolor` if not "none". "tozerox" and "tozeroy"
- fill to x=0 and y=0 respectively. "tonextx" and
- "tonexty" fill between the endpoints of this trace and
- the endpoints of the trace before it, connecting those
- endpoints with straight lines (to make a stacked area
- graph); if there is no trace before it, they behave
- like "tozerox" and "tozeroy". "toself" connects the
- endpoints of the trace (or each segment of the trace if
- it has gaps) into a closed shape. "tonext" fills the
- space between two traces if one completely encloses the
- other (eg consecutive contour lines), and behaves like
- "toself" if there is no trace before it. "tonext"
- should not be used if one trace does not enclose the
- other. Traces in a `stackgroup` will only fill to (or
- be filled to) other traces in the same group. With
- multiple `stackgroup`s or some traces stacked and some
- not, if fill-linked traces are not already consecutive,
- the later ones will be pushed down in the drawing
- order.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- groupnorm
- Only relevant when `stackgroup` is used, and only the
- first `groupnorm` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Sets the normalization for the sum of
- this `stackgroup`. With "fraction", the value of each
- trace at each location is divided by the sum of all
- trace values at that location. "percent" is the same
- but multiplied by 100 to show percentages. If there are
- multiple subplots, or multiple `stackgroup`s on one
- subplot, each will be normalized within its own set.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.scatter.Hoverlabel`
- instance or dict with compatible properties
- hoveron
- Do the hover effects highlight individual points
- (markers or line points) or do they highlight filled
- regions? If the fill is "toself" or "tonext" and there
- are no markers or text, then the default is "fills",
- otherwise it is "points".
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.scatter.Line` instance or
- dict with compatible properties
- marker
- :class:`plotly.graph_objects.scatter.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines the drawing mode for this scatter trace. If
- the provided `mode` includes "text" then the `text`
- elements appear at the coordinates. Otherwise, the
- `text` elements appear on hover. If there are less than
- 20 points and the trace is not stacked then the default
- is "lines+markers". Otherwise, "lines".
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- orientation
- Only relevant when `stackgroup` is used, and only the
- first `orientation` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Sets the stacking direction. With "v"
- ("h"), the y (x) values of subsequent traces are added.
- Also affects the default value of `fill`.
- r
- r coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the radial
- coordinatesfor legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.scatter.Selected` instance
- or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stackgaps
- Only relevant when `stackgroup` is used, and only the
- first `stackgaps` found in the `stackgroup` will be
- used - including if `visible` is "legendonly" but not
- if it is `false`. Determines how we handle locations at
- which other traces in this group have data but this one
- does not. With *infer zero* we insert a zero at these
- locations. With "interpolate" we linearly interpolate
- between existing values, and extrapolate a constant
- beyond the existing values.
- stackgroup
- Set several scatter traces (on the same subplot) to the
- same stackgroup in order to add their y values (or
- their x values if `orientation` is "h"). If blank or
- omitted this trace will not be stacked. Stacking also
- turns `fill` on by default, using "tonexty" ("tonextx")
- if `orientation` is "h" ("v") and sets the default
- `mode` to "lines" irrespective of point count. You can
- only stack on a numeric (linear or log) axis. Traces in
- a `stackgroup` will only fill to (or be filled to)
- other traces in the same group. With multiple
- `stackgroup`s or some traces stacked and some not, if
- fill-linked traces are not already consecutive, the
- later ones will be pushed down in the drawing order.
- stream
- :class:`plotly.graph_objects.scatter.Stream` instance
- or dict with compatible properties
- t
- t coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the
- angular coordinatesfor legacy polar chart only.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textfont
- Sets the text font.
- textposition
- Sets the positions of the `text` elements with respects
- to the (x,y) coordinates.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.scatter.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Scatter
- """
- super(Scatter, self).__init__("scatter")
-
- # 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.Scatter
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Scatter`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import scatter as v_scatter
-
- # Initialize validators
- # ---------------------
- self._validators["cliponaxis"] = v_scatter.CliponaxisValidator()
- self._validators["connectgaps"] = v_scatter.ConnectgapsValidator()
- self._validators["customdata"] = v_scatter.CustomdataValidator()
- self._validators["customdatasrc"] = v_scatter.CustomdatasrcValidator()
- self._validators["dx"] = v_scatter.DxValidator()
- self._validators["dy"] = v_scatter.DyValidator()
- self._validators["error_x"] = v_scatter.ErrorXValidator()
- self._validators["error_y"] = v_scatter.ErrorYValidator()
- self._validators["fill"] = v_scatter.FillValidator()
- self._validators["fillcolor"] = v_scatter.FillcolorValidator()
- self._validators["groupnorm"] = v_scatter.GroupnormValidator()
- self._validators["hoverinfo"] = v_scatter.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_scatter.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_scatter.HoverlabelValidator()
- self._validators["hoveron"] = v_scatter.HoveronValidator()
- self._validators["hovertemplate"] = v_scatter.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_scatter.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_scatter.HovertextValidator()
- self._validators["hovertextsrc"] = v_scatter.HovertextsrcValidator()
- self._validators["ids"] = v_scatter.IdsValidator()
- self._validators["idssrc"] = v_scatter.IdssrcValidator()
- self._validators["legendgroup"] = v_scatter.LegendgroupValidator()
- self._validators["line"] = v_scatter.LineValidator()
- self._validators["marker"] = v_scatter.MarkerValidator()
- self._validators["meta"] = v_scatter.MetaValidator()
- self._validators["metasrc"] = v_scatter.MetasrcValidator()
- self._validators["mode"] = v_scatter.ModeValidator()
- self._validators["name"] = v_scatter.NameValidator()
- self._validators["opacity"] = v_scatter.OpacityValidator()
- self._validators["orientation"] = v_scatter.OrientationValidator()
- self._validators["r"] = v_scatter.RValidator()
- self._validators["rsrc"] = v_scatter.RsrcValidator()
- self._validators["selected"] = v_scatter.SelectedValidator()
- self._validators["selectedpoints"] = v_scatter.SelectedpointsValidator()
- self._validators["showlegend"] = v_scatter.ShowlegendValidator()
- self._validators["stackgaps"] = v_scatter.StackgapsValidator()
- self._validators["stackgroup"] = v_scatter.StackgroupValidator()
- self._validators["stream"] = v_scatter.StreamValidator()
- self._validators["t"] = v_scatter.TValidator()
- self._validators["text"] = v_scatter.TextValidator()
- self._validators["textfont"] = v_scatter.TextfontValidator()
- self._validators["textposition"] = v_scatter.TextpositionValidator()
- self._validators["textpositionsrc"] = v_scatter.TextpositionsrcValidator()
- self._validators["textsrc"] = v_scatter.TextsrcValidator()
- self._validators["texttemplate"] = v_scatter.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_scatter.TexttemplatesrcValidator()
- self._validators["tsrc"] = v_scatter.TsrcValidator()
- self._validators["uid"] = v_scatter.UidValidator()
- self._validators["uirevision"] = v_scatter.UirevisionValidator()
- self._validators["unselected"] = v_scatter.UnselectedValidator()
- self._validators["visible"] = v_scatter.VisibleValidator()
- self._validators["x"] = v_scatter.XValidator()
- self._validators["x0"] = v_scatter.X0Validator()
- self._validators["xaxis"] = v_scatter.XAxisValidator()
- self._validators["xcalendar"] = v_scatter.XcalendarValidator()
- self._validators["xsrc"] = v_scatter.XsrcValidator()
- self._validators["y"] = v_scatter.YValidator()
- self._validators["y0"] = v_scatter.Y0Validator()
- self._validators["yaxis"] = v_scatter.YAxisValidator()
- self._validators["ycalendar"] = v_scatter.YcalendarValidator()
- self._validators["ysrc"] = v_scatter.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("error_x", None)
- self["error_x"] = error_x if error_x is not None else _v
- _v = arg.pop("error_y", None)
- self["error_y"] = error_y if error_y is not None else _v
- _v = arg.pop("fill", None)
- self["fill"] = fill if fill is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("groupnorm", None)
- self["groupnorm"] = groupnorm if groupnorm is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stackgaps", None)
- self["stackgaps"] = stackgaps if stackgaps is not None else _v
- _v = arg.pop("stackgroup", None)
- self["stackgroup"] = stackgroup if stackgroup is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("t", None)
- self["t"] = t if t is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("tsrc", None)
- self["tsrc"] = tsrc if tsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "scatter"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="scatter", val="scatter"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Sankey(_BaseTraceType):
-
- # arrangement
- # -----------
- @property
- def arrangement(self):
- """
- If value is `snap` (the default), the node arrangement is
- assisted by automatic snapping of elements to preserve space
- between nodes specified via `nodepad`. If value is
- `perpendicular`, the nodes can only move along a line
- perpendicular to the flow. If value is `freeform`, the nodes
- can freely move on the plane. If value is `fixed`, the nodes
- are stationary.
-
- The 'arrangement' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['snap', 'perpendicular', 'freeform', 'fixed']
-
- Returns
- -------
- Any
- """
- return self["arrangement"]
-
- @arrangement.setter
- def arrangement(self, val):
- self["arrangement"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = 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.sankey.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 sankey trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this sankey trace .
- x
- Sets the horizontal domain of this sankey trace
- (in plot fraction).
- y
- Sets the vertical domain of this sankey trace
- (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.sankey.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
- Note that this attribute is superseded by `node.hoverinfo` and
- `node.hoverinfo` for nodes and links respectively.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of [] joined with '+' characters
- (e.g. '')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
-
- Returns
- -------
- Any
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sankey.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.sankey.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # link
- # ----
- @property
- def link(self):
- """
- The links of the Sankey plot.
-
- The 'link' property is an instance of Link
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sankey.Link`
- - A dict of string/value properties that will be passed
- to the Link constructor
-
- Supported dict properties:
-
- color
- Sets the `link` color. It can be a single
- value, or an array for specifying color for
- each `link`. If `link.color` is omitted, then
- by default, a translucent grey link will be
- used.
- colorscales
- A tuple of :class:`plotly.graph_objects.sankey.
- link.Colorscale` instances or dicts with
- compatible properties
- colorscaledefaults
- When used in a template (as layout.template.dat
- a.sankey.link.colorscaledefaults), sets the
- default property values to use for elements of
- sankey.link.colorscales
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- customdata
- Assigns extra data to each link.
- customdatasrc
- Sets the source reference on Chart Studio Cloud
- for customdata .
- hoverinfo
- Determines which trace information appear when
- hovering links. If `none` or `skip` are set, no
- information is displayed upon hovering. But, if
- `none` is set, click and hover events are still
- fired.
- hoverlabel
- :class:`plotly.graph_objects.sankey.link.Hoverl
- abel` instance or dict with compatible
- properties
- hovertemplate
- Template string used for rendering the
- information that appear on hover box. Note that
- this will override `hoverinfo`. Variables are
- inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's
- syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- for details on the formatting syntax. Dates are
- formatted using d3-time-format's syntax
- %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- for details on the date formatting syntax. The
- variables available in `hovertemplate` are the
- ones emitted as event data described at this
- link https://plotly.com/javascript/plotlyjs-
- events/#event-data. Additionally, every
- attributes that can be specified per-point (the
- ones that are `arrayOk: true`) are available.
- variables `value` and `label`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud
- for hovertemplate .
- label
- The shown name of the link.
- labelsrc
- Sets the source reference on Chart Studio Cloud
- for label .
- line
- :class:`plotly.graph_objects.sankey.link.Line`
- instance or dict with compatible properties
- source
- An integer number `[0..nodes.length - 1]` that
- represents the source node.
- sourcesrc
- Sets the source reference on Chart Studio Cloud
- for source .
- target
- An integer number `[0..nodes.length - 1]` that
- represents the target node.
- targetsrc
- Sets the source reference on Chart Studio Cloud
- for target .
- value
- A numeric value representing the flow volume
- value.
- valuesrc
- Sets the source reference on Chart Studio Cloud
- for value .
-
- Returns
- -------
- plotly.graph_objs.sankey.Link
- """
- return self["link"]
-
- @link.setter
- def link(self, val):
- self["link"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # node
- # ----
- @property
- def node(self):
- """
- The nodes of the Sankey plot.
-
- The 'node' property is an instance of Node
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sankey.Node`
- - A dict of string/value properties that will be passed
- to the Node constructor
-
- Supported dict properties:
-
- color
- Sets the `node` color. It can be a single
- value, or an array for specifying color for
- each `node`. If `node.color` is omitted, then
- the default `Plotly` color palette will be
- cycled through to have a variety of colors.
- These defaults are not fully opaque, to allow
- some visibility of what is beneath the node.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- customdata
- Assigns extra data to each node.
- customdatasrc
- Sets the source reference on Chart Studio Cloud
- for customdata .
- groups
- Groups of nodes. Each group is defined by an
- array with the indices of the nodes it
- contains. Multiple groups can be specified.
- hoverinfo
- Determines which trace information appear when
- hovering nodes. If `none` or `skip` are set, no
- information is displayed upon hovering. But, if
- `none` is set, click and hover events are still
- fired.
- hoverlabel
- :class:`plotly.graph_objects.sankey.node.Hoverl
- abel` instance or dict with compatible
- properties
- hovertemplate
- Template string used for rendering the
- information that appear on hover box. Note that
- this will override `hoverinfo`. Variables are
- inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's
- syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- for details on the formatting syntax. Dates are
- formatted using d3-time-format's syntax
- %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- for details on the date formatting syntax. The
- variables available in `hovertemplate` are the
- ones emitted as event data described at this
- link https://plotly.com/javascript/plotlyjs-
- events/#event-data. Additionally, every
- attributes that can be specified per-point (the
- ones that are `arrayOk: true`) are available.
- variables `value` and `label`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud
- for hovertemplate .
- label
- The shown name of the node.
- labelsrc
- Sets the source reference on Chart Studio Cloud
- for label .
- line
- :class:`plotly.graph_objects.sankey.node.Line`
- instance or dict with compatible properties
- pad
- Sets the padding (in px) between the `nodes`.
- thickness
- Sets the thickness (in px) of the `nodes`.
- x
- The normalized horizontal position of the node.
- xsrc
- Sets the source reference on Chart Studio Cloud
- for x .
- y
- The normalized vertical position of the node.
- ysrc
- Sets the source reference on Chart Studio Cloud
- for y .
-
- Returns
- -------
- plotly.graph_objs.sankey.Node
- """
- return self["node"]
-
- @node.setter
- def node(self, val):
- self["node"] = val
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the Sankey diagram.
-
- 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
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sankey.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.sankey.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font for node labels
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.sankey.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.sankey.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # valueformat
- # -----------
- @property
- def valueformat(self):
- """
- Sets the value formatting rule using d3 formatting mini-
- language which is similar to those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- The 'valueformat' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["valueformat"]
-
- @valueformat.setter
- def valueformat(self, val):
- self["valueformat"] = val
-
- # valuesuffix
- # -----------
- @property
- def valuesuffix(self):
- """
- Adds a unit to follow the value in the hover tooltip. Add a
- space if a separation is necessary from the value.
-
- The 'valuesuffix' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["valuesuffix"]
-
- @valuesuffix.setter
- def valuesuffix(self, val):
- self["valuesuffix"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- arrangement
- If value is `snap` (the default), the node arrangement
- is assisted by automatic snapping of elements to
- preserve space between nodes specified via `nodepad`.
- If value is `perpendicular`, the nodes can only move
- along a line perpendicular to the flow. If value is
- `freeform`, the nodes can freely move on the plane. If
- value is `fixed`, the nodes are stationary.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.sankey.Domain` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired. Note that this attribute is
- superseded by `node.hoverinfo` and `node.hoverinfo` for
- nodes and links respectively.
- hoverlabel
- :class:`plotly.graph_objects.sankey.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- link
- The links of the Sankey plot.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- node
- The nodes of the Sankey plot.
- orientation
- Sets the orientation of the Sankey diagram.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- stream
- :class:`plotly.graph_objects.sankey.Stream` instance or
- dict with compatible properties
- textfont
- Sets the font for node labels
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- valueformat
- Sets the value formatting rule using d3 formatting
- mini-language which is similar to those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- valuesuffix
- Adds a unit to follow the value in the hover tooltip.
- Add a space if a separation is necessary from the
- value.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- arrangement=None,
- customdata=None,
- customdatasrc=None,
- domain=None,
- hoverinfo=None,
- hoverlabel=None,
- ids=None,
- idssrc=None,
- link=None,
- meta=None,
- metasrc=None,
- name=None,
- node=None,
- orientation=None,
- selectedpoints=None,
- stream=None,
- textfont=None,
- uid=None,
- uirevision=None,
- valueformat=None,
- valuesuffix=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Sankey object
-
- Sankey plots for network flow data analysis. The nodes are
- specified in `nodes` and the links between sources and targets
- in `links`. The colors are set in `nodes[i].color` and
- `links[i].color`, otherwise defaults are used.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Sankey`
- arrangement
- If value is `snap` (the default), the node arrangement
- is assisted by automatic snapping of elements to
- preserve space between nodes specified via `nodepad`.
- If value is `perpendicular`, the nodes can only move
- along a line perpendicular to the flow. If value is
- `freeform`, the nodes can freely move on the plane. If
- value is `fixed`, the nodes are stationary.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- domain
- :class:`plotly.graph_objects.sankey.Domain` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired. Note that this attribute is
- superseded by `node.hoverinfo` and `node.hoverinfo` for
- nodes and links respectively.
- hoverlabel
- :class:`plotly.graph_objects.sankey.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- link
- The links of the Sankey plot.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- node
- The nodes of the Sankey plot.
- orientation
- Sets the orientation of the Sankey diagram.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- stream
- :class:`plotly.graph_objects.sankey.Stream` instance or
- dict with compatible properties
- textfont
- Sets the font for node labels
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- valueformat
- Sets the value formatting rule using d3 formatting
- mini-language which is similar to those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- valuesuffix
- Adds a unit to follow the value in the hover tooltip.
- Add a space if a separation is necessary from the
- value.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Sankey
- """
- super(Sankey, self).__init__("sankey")
-
- # 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.Sankey
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Sankey`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import sankey as v_sankey
-
- # Initialize validators
- # ---------------------
- self._validators["arrangement"] = v_sankey.ArrangementValidator()
- self._validators["customdata"] = v_sankey.CustomdataValidator()
- self._validators["customdatasrc"] = v_sankey.CustomdatasrcValidator()
- self._validators["domain"] = v_sankey.DomainValidator()
- self._validators["hoverinfo"] = v_sankey.HoverinfoValidator()
- self._validators["hoverlabel"] = v_sankey.HoverlabelValidator()
- self._validators["ids"] = v_sankey.IdsValidator()
- self._validators["idssrc"] = v_sankey.IdssrcValidator()
- self._validators["link"] = v_sankey.LinkValidator()
- self._validators["meta"] = v_sankey.MetaValidator()
- self._validators["metasrc"] = v_sankey.MetasrcValidator()
- self._validators["name"] = v_sankey.NameValidator()
- self._validators["node"] = v_sankey.NodeValidator()
- self._validators["orientation"] = v_sankey.OrientationValidator()
- self._validators["selectedpoints"] = v_sankey.SelectedpointsValidator()
- self._validators["stream"] = v_sankey.StreamValidator()
- self._validators["textfont"] = v_sankey.TextfontValidator()
- self._validators["uid"] = v_sankey.UidValidator()
- self._validators["uirevision"] = v_sankey.UirevisionValidator()
- self._validators["valueformat"] = v_sankey.ValueformatValidator()
- self._validators["valuesuffix"] = v_sankey.ValuesuffixValidator()
- self._validators["visible"] = v_sankey.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("arrangement", None)
- self["arrangement"] = arrangement if arrangement is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("link", None)
- self["link"] = link if link is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("node", None)
- self["node"] = node if node is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("valueformat", None)
- self["valueformat"] = valueformat if valueformat is not None else _v
- _v = arg.pop("valuesuffix", None)
- self["valuesuffix"] = valuesuffix if valuesuffix is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "sankey"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="sankey", val="sankey"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Pointcloud(_BaseTraceType):
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.pointcloud.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # indices
- # -------
- @property
- def indices(self):
- """
- A sequential value, 0..n, supply it to avoid creating this
- array inside plotting. If specified, it must be a typed
- `Int32Array` array. Its length must be equal to or greater than
- the number of points. For the best performance and memory use,
- create one large `indices` typed array that is guaranteed to be
- at least as long as the largest number of points during use,
- and reuse it on each `Plotly.restyle()` call.
-
- The 'indices' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["indices"]
-
- @indices.setter
- def indices(self, val):
- self["indices"] = val
-
- # indicessrc
- # ----------
- @property
- def indicessrc(self):
- """
- Sets the source reference on Chart Studio Cloud for indices .
-
- The 'indicessrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["indicessrc"]
-
- @indicessrc.setter
- def indicessrc(self, val):
- self["indicessrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pointcloud.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- blend
- Determines if colors are blended together for a
- translucency effect in case `opacity` is
- specified as a value less then `1`. Setting
- `blend` to `true` reduces zoom/pan speed if
- used with large numbers of points.
- border
- :class:`plotly.graph_objects.pointcloud.marker.
- Border` instance or dict with compatible
- properties
- color
- Sets the marker fill color. It accepts a
- specific color.If the color is not fully opaque
- and there are hundreds of thousandsof points,
- it may cause slower zooming and panning.
- opacity
- Sets the marker opacity. The default value is
- `1` (fully opaque). If the markers are not
- fully opaque and there are hundreds of
- thousands of points, it may cause slower
- zooming and panning. Opacity fades the color
- even if `blend` is left on `false` even if
- there is no translucency effect in that case.
- sizemax
- Sets the maximum size (in px) of the rendered
- marker points. Effective when the `pointcloud`
- shows only few points.
- sizemin
- Sets the minimum size (in px) of the rendered
- marker points, effective when the `pointcloud`
- shows a million or more points.
-
- Returns
- -------
- plotly.graph_objs.pointcloud.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pointcloud.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.pointcloud.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xbounds
- # -------
- @property
- def xbounds(self):
- """
- Specify `xbounds` in the shape of `[xMin, xMax] to avoid
- looping through the `xy` typed array. Use it in conjunction
- with `xy` and `ybounds` for the performance benefits.
-
- The 'xbounds' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["xbounds"]
-
- @xbounds.setter
- def xbounds(self, val):
- self["xbounds"] = val
-
- # xboundssrc
- # ----------
- @property
- def xboundssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for xbounds .
-
- The 'xboundssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xboundssrc"]
-
- @xboundssrc.setter
- def xboundssrc(self, val):
- self["xboundssrc"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # xy
- # --
- @property
- def xy(self):
- """
- Faster alternative to specifying `x` and `y` separately. If
- supplied, it must be a typed `Float32Array` array that
- represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 +
- 1] = y[i]`
-
- The 'xy' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["xy"]
-
- @xy.setter
- def xy(self, val):
- self["xy"] = val
-
- # xysrc
- # -----
- @property
- def xysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for xy .
-
- The 'xysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xysrc"]
-
- @xysrc.setter
- def xysrc(self, val):
- self["xysrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ybounds
- # -------
- @property
- def ybounds(self):
- """
- Specify `ybounds` in the shape of `[yMin, yMax] to avoid
- looping through the `xy` typed array. Use it in conjunction
- with `xy` and `xbounds` for the performance benefits.
-
- The 'ybounds' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ybounds"]
-
- @ybounds.setter
- def ybounds(self, val):
- self["ybounds"] = val
-
- # yboundssrc
- # ----------
- @property
- def yboundssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ybounds .
-
- The 'yboundssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["yboundssrc"]
-
- @yboundssrc.setter
- def yboundssrc(self, val):
- self["yboundssrc"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.pointcloud.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- indices
- A sequential value, 0..n, supply it to avoid creating
- this array inside plotting. If specified, it must be a
- typed `Int32Array` array. Its length must be equal to
- or greater than the number of points. For the best
- performance and memory use, create one large `indices`
- typed array that is guaranteed to be at least as long
- as the largest number of points during use, and reuse
- it on each `Plotly.restyle()` call.
- indicessrc
- Sets the source reference on Chart Studio Cloud for
- indices .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.pointcloud.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.pointcloud.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbounds
- Specify `xbounds` in the shape of `[xMin, xMax] to
- avoid looping through the `xy` typed array. Use it in
- conjunction with `xy` and `ybounds` for the performance
- benefits.
- xboundssrc
- Sets the source reference on Chart Studio Cloud for
- xbounds .
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xy
- Faster alternative to specifying `x` and `y`
- separately. If supplied, it must be a typed
- `Float32Array` array that represents points such that
- `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`
- xysrc
- Sets the source reference on Chart Studio Cloud for xy
- .
- y
- Sets the y coordinates.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybounds
- Specify `ybounds` in the shape of `[yMin, yMax] to
- avoid looping through the `xy` typed array. Use it in
- conjunction with `xy` and `xbounds` for the performance
- benefits.
- yboundssrc
- Sets the source reference on Chart Studio Cloud for
- ybounds .
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- customdata=None,
- customdatasrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- ids=None,
- idssrc=None,
- indices=None,
- indicessrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- showlegend=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xaxis=None,
- xbounds=None,
- xboundssrc=None,
- xsrc=None,
- xy=None,
- xysrc=None,
- y=None,
- yaxis=None,
- ybounds=None,
- yboundssrc=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Pointcloud object
-
- The data visualized as a point cloud set in `x` and `y` using
- the WebGl plotting engine.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Pointcloud`
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.pointcloud.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- indices
- A sequential value, 0..n, supply it to avoid creating
- this array inside plotting. If specified, it must be a
- typed `Int32Array` array. Its length must be equal to
- or greater than the number of points. For the best
- performance and memory use, create one large `indices`
- typed array that is guaranteed to be at least as long
- as the largest number of points during use, and reuse
- it on each `Plotly.restyle()` call.
- indicessrc
- Sets the source reference on Chart Studio Cloud for
- indices .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.pointcloud.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.pointcloud.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbounds
- Specify `xbounds` in the shape of `[xMin, xMax] to
- avoid looping through the `xy` typed array. Use it in
- conjunction with `xy` and `ybounds` for the performance
- benefits.
- xboundssrc
- Sets the source reference on Chart Studio Cloud for
- xbounds .
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xy
- Faster alternative to specifying `x` and `y`
- separately. If supplied, it must be a typed
- `Float32Array` array that represents points such that
- `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`
- xysrc
- Sets the source reference on Chart Studio Cloud for xy
- .
- y
- Sets the y coordinates.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybounds
- Specify `ybounds` in the shape of `[yMin, yMax] to
- avoid looping through the `xy` typed array. Use it in
- conjunction with `xy` and `xbounds` for the performance
- benefits.
- yboundssrc
- Sets the source reference on Chart Studio Cloud for
- ybounds .
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Pointcloud
- """
- super(Pointcloud, self).__init__("pointcloud")
-
- # 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.Pointcloud
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Pointcloud`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import pointcloud as v_pointcloud
-
- # Initialize validators
- # ---------------------
- self._validators["customdata"] = v_pointcloud.CustomdataValidator()
- self._validators["customdatasrc"] = v_pointcloud.CustomdatasrcValidator()
- self._validators["hoverinfo"] = v_pointcloud.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_pointcloud.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_pointcloud.HoverlabelValidator()
- self._validators["ids"] = v_pointcloud.IdsValidator()
- self._validators["idssrc"] = v_pointcloud.IdssrcValidator()
- self._validators["indices"] = v_pointcloud.IndicesValidator()
- self._validators["indicessrc"] = v_pointcloud.IndicessrcValidator()
- self._validators["legendgroup"] = v_pointcloud.LegendgroupValidator()
- self._validators["marker"] = v_pointcloud.MarkerValidator()
- self._validators["meta"] = v_pointcloud.MetaValidator()
- self._validators["metasrc"] = v_pointcloud.MetasrcValidator()
- self._validators["name"] = v_pointcloud.NameValidator()
- self._validators["opacity"] = v_pointcloud.OpacityValidator()
- self._validators["showlegend"] = v_pointcloud.ShowlegendValidator()
- self._validators["stream"] = v_pointcloud.StreamValidator()
- self._validators["text"] = v_pointcloud.TextValidator()
- self._validators["textsrc"] = v_pointcloud.TextsrcValidator()
- self._validators["uid"] = v_pointcloud.UidValidator()
- self._validators["uirevision"] = v_pointcloud.UirevisionValidator()
- self._validators["visible"] = v_pointcloud.VisibleValidator()
- self._validators["x"] = v_pointcloud.XValidator()
- self._validators["xaxis"] = v_pointcloud.XAxisValidator()
- self._validators["xbounds"] = v_pointcloud.XboundsValidator()
- self._validators["xboundssrc"] = v_pointcloud.XboundssrcValidator()
- self._validators["xsrc"] = v_pointcloud.XsrcValidator()
- self._validators["xy"] = v_pointcloud.XyValidator()
- self._validators["xysrc"] = v_pointcloud.XysrcValidator()
- self._validators["y"] = v_pointcloud.YValidator()
- self._validators["yaxis"] = v_pointcloud.YAxisValidator()
- self._validators["ybounds"] = v_pointcloud.YboundsValidator()
- self._validators["yboundssrc"] = v_pointcloud.YboundssrcValidator()
- self._validators["ysrc"] = v_pointcloud.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("indices", None)
- self["indices"] = indices if indices is not None else _v
- _v = arg.pop("indicessrc", None)
- self["indicessrc"] = indicessrc if indicessrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xbounds", None)
- self["xbounds"] = xbounds if xbounds is not None else _v
- _v = arg.pop("xboundssrc", None)
- self["xboundssrc"] = xboundssrc if xboundssrc is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("xy", None)
- self["xy"] = xy if xy is not None else _v
- _v = arg.pop("xysrc", None)
- self["xysrc"] = xysrc if xysrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ybounds", None)
- self["ybounds"] = ybounds if ybounds is not None else _v
- _v = arg.pop("yboundssrc", None)
- self["yboundssrc"] = yboundssrc if yboundssrc is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "pointcloud"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="pointcloud", val="pointcloud"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Pie(_BaseTraceType):
-
- # automargin
- # ----------
- @property
- def automargin(self):
- """
- Determines whether outside text labels can push the margins.
-
- The 'automargin' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["automargin"]
-
- @automargin.setter
- def automargin(self, val):
- self["automargin"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # direction
- # ---------
- @property
- def direction(self):
- """
- Specifies the direction at which succeeding sectors follow one
- another.
-
- The 'direction' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['clockwise', 'counterclockwise']
-
- Returns
- -------
- Any
- """
- return self["direction"]
-
- @direction.setter
- def direction(self, val):
- self["direction"] = val
-
- # dlabel
- # ------
- @property
- def dlabel(self):
- """
- Sets the label step. See `label0` for more info.
-
- The 'dlabel' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dlabel"]
-
- @dlabel.setter
- def dlabel(self, val):
- self["dlabel"] = 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.pie.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 pie trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this pie trace .
- x
- Sets the horizontal domain of this pie trace
- (in plot fraction).
- y
- Sets the vertical domain of this pie trace (in
- plot fraction).
-
- Returns
- -------
- plotly.graph_objs.pie.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hole
- # ----
- @property
- def hole(self):
- """
- Sets the fraction of the radius to cut out of the pie. Use this
- to make a donut chart.
-
- The 'hole' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["hole"]
-
- @hole.setter
- def hole(self, val):
- self["hole"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.pie.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `label`, `color`, `value`, `percent` and `text`.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each sector. If a
- single string, the same string appears for all data points. If
- an array of string, the items are mapped in order of this
- trace's sectors. To be seen, trace `hoverinfo` must contain a
- "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `textinfo` lying inside the sector.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.pie.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # insidetextorientation
- # ---------------------
- @property
- def insidetextorientation(self):
- """
- Controls the orientation of the text inside chart sectors. When
- set to "auto", text may be oriented in any direction in order
- to be as big as possible in the middle of a sector. The
- "horizontal" option orients text to be parallel with the bottom
- of the chart, and may make text smaller in order to achieve
- that goal. The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text perpendicular
- to the radius of the sector.
-
- The 'insidetextorientation' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['horizontal', 'radial', 'tangential', 'auto']
-
- Returns
- -------
- Any
- """
- return self["insidetextorientation"]
-
- @insidetextorientation.setter
- def insidetextorientation(self, val):
- self["insidetextorientation"] = val
-
- # label0
- # ------
- @property
- def label0(self):
- """
- Alternate to `labels`. Builds a numeric set of labels. Use with
- `dlabel` where `label0` is the starting label and `dlabel` the
- step.
-
- The 'label0' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["label0"]
-
- @label0.setter
- def label0(self, val):
- self["label0"] = val
-
- # labels
- # ------
- @property
- def labels(self):
- """
- Sets the sector labels. If `labels` entries are duplicated, we
- sum associated `values` or simply count occurrences if `values`
- is not provided. For other array attributes (including color)
- we use the first non-empty entry among all occurrences of the
- label.
-
- The 'labels' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["labels"]
-
- @labels.setter
- def labels(self, val):
- self["labels"] = val
-
- # labelssrc
- # ---------
- @property
- def labelssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for labels .
-
- The 'labelssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["labelssrc"]
-
- @labelssrc.setter
- def labelssrc(self, val):
- self["labelssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- colors
- Sets the color of each sector. If not
- specified, the default trace color set is used
- to pick the sector colors.
- colorssrc
- Sets the source reference on Chart Studio Cloud
- for colors .
- line
- :class:`plotly.graph_objects.pie.marker.Line`
- instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.pie.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `textinfo` lying outside the sector.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.pie.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # pull
- # ----
- @property
- def pull(self):
- """
- Sets the fraction of larger radius to pull the sectors out from
- the center. This can be a constant to pull all slices apart
- from each other equally or an array to highlight one or more
- slices.
-
- The 'pull' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["pull"]
-
- @pull.setter
- def pull(self, val):
- self["pull"] = val
-
- # pullsrc
- # -------
- @property
- def pullsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for pull .
-
- The 'pullsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["pullsrc"]
-
- @pullsrc.setter
- def pullsrc(self, val):
- self["pullsrc"] = val
-
- # rotation
- # --------
- @property
- def rotation(self):
- """
- Instead of the first slice starting at 12 o'clock, rotate to
- some other angle.
-
- The 'rotation' property is a number and may be specified as:
- - An int or float in the interval [-360, 360]
-
- Returns
- -------
- int|float
- """
- return self["rotation"]
-
- @rotation.setter
- def rotation(self, val):
- self["rotation"] = val
-
- # scalegroup
- # ----------
- @property
- def scalegroup(self):
- """
- If there are multiple pie charts that should be sized according
- to their totals, link them by providing a non-empty group id
- here shared by every trace in the same group.
-
- The 'scalegroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["scalegroup"]
-
- @scalegroup.setter
- def scalegroup(self, val):
- self["scalegroup"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # sort
- # ----
- @property
- def sort(self):
- """
- Determines whether or not the sectors are reordered from
- largest to smallest.
-
- The 'sort' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["sort"]
-
- @sort.setter
- def sort(self, val):
- self["sort"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.pie.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each sector. If trace
- `textinfo` contains a "text" flag, these elements will be seen
- on the chart. If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in the
- hover labels.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `textinfo`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.pie.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.pie.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph.
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Specifies the location of the `textinfo`.
-
- The 'textposition' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'auto', 'none']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `label`, `color`, `value`, `percent` and
- `text`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = 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.pie.Title`
- - A dict of string/value properties that will be passed
- to the Title constructor
-
- Supported dict properties:
-
- font
- Sets the font used for `title`. Note that the
- title's font used to be set by the now
- deprecated `titlefont` attribute.
- position
- Specifies the location of the `title`. Note
- that the title's position used to be set by the
- now deprecated `titleposition` attribute.
- text
- Sets the title of the chart. If it is empty, no
- title is displayed. 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
- -------
- plotly.graph_objs.pie.Title
- """
- return self["title"]
-
- @title.setter
- def title(self, val):
- self["title"] = val
-
- # titlefont
- # ---------
- @property
- def titlefont(self):
- """
- Deprecated: Please use pie.title.font instead. Sets the font
- used for `title`. 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.pie.title.Font`
- - A dict of string/value properties that will be passed
- to the Font constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
-
- """
- return self["titlefont"]
-
- @titlefont.setter
- def titlefont(self, val):
- self["titlefont"] = val
-
- # titleposition
- # -------------
- @property
- def titleposition(self):
- """
- Deprecated: Please use pie.title.position instead. Specifies
- the location of the `title`. Note that the title's position
- used to be set by the now deprecated `titleposition` attribute.
-
- The 'position' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['top left', 'top center', 'top right', 'middle center',
- 'bottom left', 'bottom center', 'bottom right']
-
- Returns
- -------
-
- """
- return self["titleposition"]
-
- @titleposition.setter
- def titleposition(self, val):
- self["titleposition"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # values
- # ------
- @property
- def values(self):
- """
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
-
- The 'values' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["values"]
-
- @values.setter
- def values(self, val):
- self["values"] = val
-
- # valuessrc
- # ---------
- @property
- def valuessrc(self):
- """
- Sets the source reference on Chart Studio Cloud for values .
-
- The 'valuessrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuessrc"]
-
- @valuessrc.setter
- def valuessrc(self, val):
- self["valuessrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- automargin
- Determines whether outside text labels can push the
- margins.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- direction
- Specifies the direction at which succeeding sectors
- follow one another.
- dlabel
- Sets the label step. See `label0` for more info.
- domain
- :class:`plotly.graph_objects.pie.Domain` instance or
- dict with compatible properties
- hole
- Sets the fraction of the radius to cut out of the pie.
- Use this to make a donut chart.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.pie.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `label`, `color`, `value`,
- `percent` and `text`. Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- insidetextorientation
- Controls the orientation of the text inside chart
- sectors. When set to "auto", text may be oriented in
- any direction in order to be as big as possible in the
- middle of a sector. The "horizontal" option orients
- text to be parallel with the bottom of the chart, and
- may make text smaller in order to achieve that goal.
- The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text
- perpendicular to the radius of the sector.
- label0
- Alternate to `labels`. Builds a numeric set of labels.
- Use with `dlabel` where `label0` is the starting label
- and `dlabel` the step.
- labels
- Sets the sector labels. If `labels` entries are
- duplicated, we sum associated `values` or simply count
- occurrences if `values` is not provided. For other
- array attributes (including color) we use the first
- non-empty entry among all occurrences of the label.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.pie.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector.
- pull
- Sets the fraction of larger radius to pull the sectors
- out from the center. This can be a constant to pull all
- slices apart from each other equally or an array to
- highlight one or more slices.
- pullsrc
- Sets the source reference on Chart Studio Cloud for
- pull .
- rotation
- Instead of the first slice starting at 12 o'clock,
- rotate to some other angle.
- scalegroup
- If there are multiple pie charts that should be sized
- according to their totals, link them by providing a
- non-empty group id here shared by every trace in the
- same group.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- sort
- Determines whether or not the sectors are reordered
- from largest to smallest.
- stream
- :class:`plotly.graph_objects.pie.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Specifies the location of the `textinfo`.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `label`,
- `color`, `value`, `percent` and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- title
- :class:`plotly.graph_objects.pie.Title` instance or
- dict with compatible properties
- titlefont
- Deprecated: Please use pie.title.font instead. Sets the
- font used for `title`. Note that the title's font used
- to be set by the now deprecated `titlefont` attribute.
- titleposition
- Deprecated: Please use pie.title.position instead.
- Specifies the location of the `title`. Note that the
- title's position used to be set by the now deprecated
- `titleposition` attribute.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- _mapped_properties = {
- "titlefont": ("title", "font"),
- "titleposition": ("title", "position"),
- }
-
- def __init__(
- self,
- arg=None,
- automargin=None,
- customdata=None,
- customdatasrc=None,
- direction=None,
- dlabel=None,
- domain=None,
- hole=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextfont=None,
- insidetextorientation=None,
- label0=None,
- labels=None,
- labelssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- outsidetextfont=None,
- pull=None,
- pullsrc=None,
- rotation=None,
- scalegroup=None,
- showlegend=None,
- sort=None,
- stream=None,
- text=None,
- textfont=None,
- textinfo=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- title=None,
- titlefont=None,
- titleposition=None,
- uid=None,
- uirevision=None,
- values=None,
- valuessrc=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Pie object
-
- A data visualized by the sectors of the pie is set in `values`.
- The sector labels are set in `labels`. The sector colors are
- set in `marker.colors`
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Pie`
- automargin
- Determines whether outside text labels can push the
- margins.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- direction
- Specifies the direction at which succeeding sectors
- follow one another.
- dlabel
- Sets the label step. See `label0` for more info.
- domain
- :class:`plotly.graph_objects.pie.Domain` instance or
- dict with compatible properties
- hole
- Sets the fraction of the radius to cut out of the pie.
- Use this to make a donut chart.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.pie.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `label`, `color`, `value`,
- `percent` and `text`. Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- insidetextorientation
- Controls the orientation of the text inside chart
- sectors. When set to "auto", text may be oriented in
- any direction in order to be as big as possible in the
- middle of a sector. The "horizontal" option orients
- text to be parallel with the bottom of the chart, and
- may make text smaller in order to achieve that goal.
- The "radial" option orients text along the radius of
- the sector. The "tangential" option orients text
- perpendicular to the radius of the sector.
- label0
- Alternate to `labels`. Builds a numeric set of labels.
- Use with `dlabel` where `label0` is the starting label
- and `dlabel` the step.
- labels
- Sets the sector labels. If `labels` entries are
- duplicated, we sum associated `values` or simply count
- occurrences if `values` is not provided. For other
- array attributes (including color) we use the first
- non-empty entry among all occurrences of the label.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.pie.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- outsidetextfont
- Sets the font used for `textinfo` lying outside the
- sector.
- pull
- Sets the fraction of larger radius to pull the sectors
- out from the center. This can be a constant to pull all
- slices apart from each other equally or an array to
- highlight one or more slices.
- pullsrc
- Sets the source reference on Chart Studio Cloud for
- pull .
- rotation
- Instead of the first slice starting at 12 o'clock,
- rotate to some other angle.
- scalegroup
- If there are multiple pie charts that should be sized
- according to their totals, link them by providing a
- non-empty group id here shared by every trace in the
- same group.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- sort
- Determines whether or not the sectors are reordered
- from largest to smallest.
- stream
- :class:`plotly.graph_objects.pie.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Specifies the location of the `textinfo`.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `label`,
- `color`, `value`, `percent` and `text`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- title
- :class:`plotly.graph_objects.pie.Title` instance or
- dict with compatible properties
- titlefont
- Deprecated: Please use pie.title.font instead. Sets the
- font used for `title`. Note that the title's font used
- to be set by the now deprecated `titlefont` attribute.
- titleposition
- Deprecated: Please use pie.title.position instead.
- Specifies the location of the `title`. Note that the
- title's position used to be set by the now deprecated
- `titleposition` attribute.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Pie
- """
- super(Pie, self).__init__("pie")
-
- # 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.Pie
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Pie`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import pie as v_pie
-
- # Initialize validators
- # ---------------------
- self._validators["automargin"] = v_pie.AutomarginValidator()
- self._validators["customdata"] = v_pie.CustomdataValidator()
- self._validators["customdatasrc"] = v_pie.CustomdatasrcValidator()
- self._validators["direction"] = v_pie.DirectionValidator()
- self._validators["dlabel"] = v_pie.DlabelValidator()
- self._validators["domain"] = v_pie.DomainValidator()
- self._validators["hole"] = v_pie.HoleValidator()
- self._validators["hoverinfo"] = v_pie.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_pie.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_pie.HoverlabelValidator()
- self._validators["hovertemplate"] = v_pie.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_pie.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_pie.HovertextValidator()
- self._validators["hovertextsrc"] = v_pie.HovertextsrcValidator()
- self._validators["ids"] = v_pie.IdsValidator()
- self._validators["idssrc"] = v_pie.IdssrcValidator()
- self._validators["insidetextfont"] = v_pie.InsidetextfontValidator()
- self._validators[
- "insidetextorientation"
- ] = v_pie.InsidetextorientationValidator()
- self._validators["label0"] = v_pie.Label0Validator()
- self._validators["labels"] = v_pie.LabelsValidator()
- self._validators["labelssrc"] = v_pie.LabelssrcValidator()
- self._validators["legendgroup"] = v_pie.LegendgroupValidator()
- self._validators["marker"] = v_pie.MarkerValidator()
- self._validators["meta"] = v_pie.MetaValidator()
- self._validators["metasrc"] = v_pie.MetasrcValidator()
- self._validators["name"] = v_pie.NameValidator()
- self._validators["opacity"] = v_pie.OpacityValidator()
- self._validators["outsidetextfont"] = v_pie.OutsidetextfontValidator()
- self._validators["pull"] = v_pie.PullValidator()
- self._validators["pullsrc"] = v_pie.PullsrcValidator()
- self._validators["rotation"] = v_pie.RotationValidator()
- self._validators["scalegroup"] = v_pie.ScalegroupValidator()
- self._validators["showlegend"] = v_pie.ShowlegendValidator()
- self._validators["sort"] = v_pie.SortValidator()
- self._validators["stream"] = v_pie.StreamValidator()
- self._validators["text"] = v_pie.TextValidator()
- self._validators["textfont"] = v_pie.TextfontValidator()
- self._validators["textinfo"] = v_pie.TextinfoValidator()
- self._validators["textposition"] = v_pie.TextpositionValidator()
- self._validators["textpositionsrc"] = v_pie.TextpositionsrcValidator()
- self._validators["textsrc"] = v_pie.TextsrcValidator()
- self._validators["texttemplate"] = v_pie.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_pie.TexttemplatesrcValidator()
- self._validators["title"] = v_pie.TitleValidator()
- self._validators["uid"] = v_pie.UidValidator()
- self._validators["uirevision"] = v_pie.UirevisionValidator()
- self._validators["values"] = v_pie.ValuesValidator()
- self._validators["valuessrc"] = v_pie.ValuessrcValidator()
- self._validators["visible"] = v_pie.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("automargin", None)
- self["automargin"] = automargin if automargin is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("direction", None)
- self["direction"] = direction if direction is not None else _v
- _v = arg.pop("dlabel", None)
- self["dlabel"] = dlabel if dlabel is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hole", None)
- self["hole"] = hole if hole is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("insidetextorientation", None)
- self["insidetextorientation"] = (
- insidetextorientation if insidetextorientation is not None else _v
- )
- _v = arg.pop("label0", None)
- self["label0"] = label0 if label0 is not None else _v
- _v = arg.pop("labels", None)
- self["labels"] = labels if labels is not None else _v
- _v = arg.pop("labelssrc", None)
- self["labelssrc"] = labelssrc if labelssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("pull", None)
- self["pull"] = pull if pull is not None else _v
- _v = arg.pop("pullsrc", None)
- self["pullsrc"] = pullsrc if pullsrc is not None else _v
- _v = arg.pop("rotation", None)
- self["rotation"] = rotation if rotation is not None else _v
- _v = arg.pop("scalegroup", None)
- self["scalegroup"] = scalegroup if scalegroup is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("sort", None)
- self["sort"] = sort if sort is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("title", None)
- self["title"] = title if title is not None else _v
- _v = arg.pop("titlefont", None)
- _v = titlefont if titlefont is not None else _v
- if _v is not None:
- self["titlefont"] = _v
- _v = arg.pop("titleposition", None)
- _v = titleposition if titleposition is not None else _v
- if _v is not None:
- self["titleposition"] = _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("values", None)
- self["values"] = values if values is not None else _v
- _v = arg.pop("valuessrc", None)
- self["valuessrc"] = valuessrc if valuessrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "pie"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="pie", val="pie"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Parcoords(_BaseTraceType):
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dimensions
- # ----------
- @property
- def dimensions(self):
- """
- The dimensions (variables) of the parallel coordinates chart.
- 2..60 dimensions are supported.
-
- The 'dimensions' property is a tuple of instances of
- Dimension that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension
- - A list or tuple of dicts of string/value properties that
- will be passed to the Dimension constructor
-
- Supported dict properties:
-
- constraintrange
- The domain range to which the filter on the
- dimension is constrained. Must be an array of
- `[fromValue, toValue]` with `fromValue <=
- toValue`, or if `multiselect` is not disabled,
- you may give an array of arrays, where each
- inner array is `[fromValue, toValue]`.
- label
- The shown name of the dimension.
- multiselect
- Do we allow multiple selection ranges or just a
- single range?
- 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.
- range
- The domain range that represents the full,
- shown axis extent. Defaults to the `values`
- extent. Must be an array of `[fromValue,
- toValue]` with finite numbers as elements.
- 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`.
- tickformat
- Sets the tick label formatting rule using d3
- formatting mini-languages which are very
- similar to those in Python. For numbers, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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"
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- values
- Dimension values. `values[n]` represents the
- value of the `n`th point in the dataset,
- therefore the `values` vector for all
- dimensions must be the same (longer vectors
- will be truncated). Each value must be a finite
- number.
- valuessrc
- Sets the source reference on Chart Studio Cloud
- for values .
- visible
- Shows the dimension when set to `true` (the
- default). Hides the dimension for `false`.
-
- Returns
- -------
- tuple[plotly.graph_objs.parcoords.Dimension]
- """
- return self["dimensions"]
-
- @dimensions.setter
- def dimensions(self, val):
- self["dimensions"] = val
-
- # dimensiondefaults
- # -----------------
- @property
- def dimensiondefaults(self):
- """
- When used in a template (as
- layout.template.data.parcoords.dimensiondefaults), sets the
- default property values to use for elements of
- parcoords.dimensions
-
- The 'dimensiondefaults' property is an instance of Dimension
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcoords.Dimension`
- - A dict of string/value properties that will be passed
- to the Dimension constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.parcoords.Dimension
- """
- return self["dimensiondefaults"]
-
- @dimensiondefaults.setter
- def dimensiondefaults(self, val):
- self["dimensiondefaults"] = 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.parcoords.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 parcoords
- trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this parcoords trace .
- x
- Sets the horizontal domain of this parcoords
- trace (in plot fraction).
- y
- Sets the vertical domain of this parcoords
- trace (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.parcoords.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # labelangle
- # ----------
- @property
- def labelangle(self):
- """
- Sets the angle of the labels with respect to the horizontal.
- For example, a `tickangle` of -90 draws the labels vertically.
- Tilted labels with "labelangle" may be positioned better inside
- margins when `labelposition` is set to "bottom".
-
- The 'labelangle' property is a angle (in degrees) that may be
- specified as a number between -180 and 180. Numeric values outside this
- range are converted to the equivalent value
- (e.g. 270 is converted to -90).
-
- Returns
- -------
- int|float
- """
- return self["labelangle"]
-
- @labelangle.setter
- def labelangle(self, val):
- self["labelangle"] = val
-
- # labelfont
- # ---------
- @property
- def labelfont(self):
- """
- Sets the font for the `dimension` labels.
-
- The 'labelfont' property is an instance of Labelfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcoords.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.parcoords.Labelfont
- """
- return self["labelfont"]
-
- @labelfont.setter
- def labelfont(self, val):
- self["labelfont"] = val
-
- # labelside
- # ---------
- @property
- def labelside(self):
- """
- Specifies the location of the `label`. "top" positions labels
- above, next to the title "bottom" positions labels below the
- graph Tilted labels with "labelangle" may be positioned better
- inside margins when `labelposition` is set to "bottom".
-
- The 'labelside' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['top', 'bottom']
-
- Returns
- -------
- Any
- """
- return self["labelside"]
-
- @labelside.setter
- def labelside(self, val):
- self["labelside"] = 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.parcoords.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `line.colorscale`. Has an effect
- only if in `line.color`is set to a numerical
- array. 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
- in `line.color`) or the bounds set in
- `line.cmin` and `line.cmax` Has an effect only
- if in `line.color`is set to a numerical array.
- Defaults to `false` when `line.cmin` and
- `line.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `line.cmin` and/or `line.cmax` to be
- equidistant to this point. Has an effect only
- if in `line.color`is set to a numerical array.
- Value should have the same units as in
- `line.color`. Has no effect when `line.cauto`
- is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmax` must be set as well.
- color
- Sets thelinecolor. It accepts either a specific
- color or an array of numbers that are mapped to
- the colorscale relative to the max and min
- values of the array or relative to `line.cmin`
- and `line.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.parcoords.line.Col
- orBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `line.color`is set to a numerical array. 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`line.cmin` and `line.cmax`.
- Alternatively, `colorscale` may be a palette
- name string of the following list: Greys,YlGnBu
- ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R
- ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri
- c,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `line.color`is set to a
- numerical array. If true, `line.cmin` will
- correspond to the last color in the array and
- `line.cmax` will correspond to the first color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `line.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.parcoords.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # rangefont
- # ---------
- @property
- def rangefont(self):
- """
- Sets the font for the `dimension` range values.
-
- The 'rangefont' property is an instance of Rangefont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcoords.Rangefont`
- - A dict of string/value properties that will be passed
- to the Rangefont 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.parcoords.Rangefont
- """
- return self["rangefont"]
-
- @rangefont.setter
- def rangefont(self, val):
- self["rangefont"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcoords.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.parcoords.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # tickfont
- # --------
- @property
- def tickfont(self):
- """
- Sets the font for the `dimension` tick values.
-
- The 'tickfont' property is an instance of Tickfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcoords.Tickfont`
- - A dict of string/value properties that will be passed
- to the Tickfont 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.parcoords.Tickfont
- """
- return self["tickfont"]
-
- @tickfont.setter
- def tickfont(self, val):
- self["tickfont"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dimensions
- The dimensions (variables) of the parallel coordinates
- chart. 2..60 dimensions are supported.
- dimensiondefaults
- When used in a template (as
- layout.template.data.parcoords.dimensiondefaults), sets
- the default property values to use for elements of
- parcoords.dimensions
- domain
- :class:`plotly.graph_objects.parcoords.Domain` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- labelangle
- Sets the angle of the labels with respect to the
- horizontal. For example, a `tickangle` of -90 draws the
- labels vertically. Tilted labels with "labelangle" may
- be positioned better inside margins when
- `labelposition` is set to "bottom".
- labelfont
- Sets the font for the `dimension` labels.
- labelside
- Specifies the location of the `label`. "top" positions
- labels above, next to the title "bottom" positions
- labels below the graph Tilted labels with "labelangle"
- may be positioned better inside margins when
- `labelposition` is set to "bottom".
- line
- :class:`plotly.graph_objects.parcoords.Line` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- rangefont
- Sets the font for the `dimension` range values.
- stream
- :class:`plotly.graph_objects.parcoords.Stream` instance
- or dict with compatible properties
- tickfont
- Sets the font for the `dimension` tick values.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- customdata=None,
- customdatasrc=None,
- dimensions=None,
- dimensiondefaults=None,
- domain=None,
- ids=None,
- idssrc=None,
- labelangle=None,
- labelfont=None,
- labelside=None,
- line=None,
- meta=None,
- metasrc=None,
- name=None,
- rangefont=None,
- stream=None,
- tickfont=None,
- uid=None,
- uirevision=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Parcoords object
-
- Parallel coordinates for multidimensional exploratory data
- analysis. The samples are specified in `dimensions`. The colors
- are set in `line.color`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Parcoords`
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dimensions
- The dimensions (variables) of the parallel coordinates
- chart. 2..60 dimensions are supported.
- dimensiondefaults
- When used in a template (as
- layout.template.data.parcoords.dimensiondefaults), sets
- the default property values to use for elements of
- parcoords.dimensions
- domain
- :class:`plotly.graph_objects.parcoords.Domain` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- labelangle
- Sets the angle of the labels with respect to the
- horizontal. For example, a `tickangle` of -90 draws the
- labels vertically. Tilted labels with "labelangle" may
- be positioned better inside margins when
- `labelposition` is set to "bottom".
- labelfont
- Sets the font for the `dimension` labels.
- labelside
- Specifies the location of the `label`. "top" positions
- labels above, next to the title "bottom" positions
- labels below the graph Tilted labels with "labelangle"
- may be positioned better inside margins when
- `labelposition` is set to "bottom".
- line
- :class:`plotly.graph_objects.parcoords.Line` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- rangefont
- Sets the font for the `dimension` range values.
- stream
- :class:`plotly.graph_objects.parcoords.Stream` instance
- or dict with compatible properties
- tickfont
- Sets the font for the `dimension` tick values.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Parcoords
- """
- super(Parcoords, self).__init__("parcoords")
-
- # 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.Parcoords
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Parcoords`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import parcoords as v_parcoords
-
- # Initialize validators
- # ---------------------
- self._validators["customdata"] = v_parcoords.CustomdataValidator()
- self._validators["customdatasrc"] = v_parcoords.CustomdatasrcValidator()
- self._validators["dimensions"] = v_parcoords.DimensionsValidator()
- self._validators["dimensiondefaults"] = v_parcoords.DimensionValidator()
- self._validators["domain"] = v_parcoords.DomainValidator()
- self._validators["ids"] = v_parcoords.IdsValidator()
- self._validators["idssrc"] = v_parcoords.IdssrcValidator()
- self._validators["labelangle"] = v_parcoords.LabelangleValidator()
- self._validators["labelfont"] = v_parcoords.LabelfontValidator()
- self._validators["labelside"] = v_parcoords.LabelsideValidator()
- self._validators["line"] = v_parcoords.LineValidator()
- self._validators["meta"] = v_parcoords.MetaValidator()
- self._validators["metasrc"] = v_parcoords.MetasrcValidator()
- self._validators["name"] = v_parcoords.NameValidator()
- self._validators["rangefont"] = v_parcoords.RangefontValidator()
- self._validators["stream"] = v_parcoords.StreamValidator()
- self._validators["tickfont"] = v_parcoords.TickfontValidator()
- self._validators["uid"] = v_parcoords.UidValidator()
- self._validators["uirevision"] = v_parcoords.UirevisionValidator()
- self._validators["visible"] = v_parcoords.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dimensions", None)
- self["dimensions"] = dimensions if dimensions is not None else _v
- _v = arg.pop("dimensiondefaults", None)
- self["dimensiondefaults"] = (
- dimensiondefaults if dimensiondefaults is not None else _v
- )
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("labelangle", None)
- self["labelangle"] = labelangle if labelangle is not None else _v
- _v = arg.pop("labelfont", None)
- self["labelfont"] = labelfont if labelfont is not None else _v
- _v = arg.pop("labelside", None)
- self["labelside"] = labelside if labelside is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("rangefont", None)
- self["rangefont"] = rangefont if rangefont is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("tickfont", None)
- self["tickfont"] = tickfont if tickfont is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "parcoords"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="parcoords", val="parcoords"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Parcats(_BaseTraceType):
-
- # arrangement
- # -----------
- @property
- def arrangement(self):
- """
- Sets the drag interaction mode for categories and dimensions.
- If `perpendicular`, the categories can only move along a line
- perpendicular to the paths. If `freeform`, the categories can
- freely move on the plane. If `fixed`, the categories and
- dimensions are stationary.
-
- The 'arrangement' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['perpendicular', 'freeform', 'fixed']
-
- Returns
- -------
- Any
- """
- return self["arrangement"]
-
- @arrangement.setter
- def arrangement(self, val):
- self["arrangement"] = val
-
- # bundlecolors
- # ------------
- @property
- def bundlecolors(self):
- """
- Sort paths so that like colors are bundled together within each
- category.
-
- The 'bundlecolors' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["bundlecolors"]
-
- @bundlecolors.setter
- def bundlecolors(self, val):
- self["bundlecolors"] = val
-
- # counts
- # ------
- @property
- def counts(self):
- """
- The number of observations represented by each state. Defaults
- to 1 so that each state represents one observation
-
- The 'counts' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["counts"]
-
- @counts.setter
- def counts(self, val):
- self["counts"] = val
-
- # countssrc
- # ---------
- @property
- def countssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for counts .
-
- The 'countssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["countssrc"]
-
- @countssrc.setter
- def countssrc(self, val):
- self["countssrc"] = val
-
- # dimensions
- # ----------
- @property
- def dimensions(self):
- """
- The dimensions (variables) of the parallel categories diagram.
-
- The 'dimensions' property is a tuple of instances of
- Dimension that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.parcats.Dimension
- - A list or tuple of dicts of string/value properties that
- will be passed to the Dimension constructor
-
- Supported dict properties:
-
- categoryarray
- Sets the order in which categories in this
- dimension appear. Only has an effect if
- `categoryorder` is set to "array". Used with
- `categoryorder`.
- categoryarraysrc
- Sets the source reference on Chart Studio Cloud
- for categoryarray .
- categoryorder
- Specifies the ordering logic for the categories
- in the dimension. By default, plotly uses
- "trace", which specifies the order that is
- present in the data supplied. Set
- `categoryorder` to *category ascending* or
- *category descending* if order should be
- determined by the alphanumerical order of the
- category names. Set `categoryorder` to "array"
- to derive the ordering from the attribute
- `categoryarray`. If a category is not found in
- the `categoryarray` array, the sorting behavior
- for that attribute will be identical to the
- "trace" mode. The unspecified categories will
- follow the categories in `categoryarray`.
- displayindex
- The display index of dimension, from left to
- right, zero indexed, defaults to dimension
- index.
- label
- The shown name of the dimension.
- ticktext
- Sets alternative tick labels for the categories
- in this dimension. Only has an effect if
- `categoryorder` is set to "array". Should be an
- array the same length as `categoryarray` Used
- with `categoryorder`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- values
- Dimension values. `values[n]` represents the
- category value of the `n`th point in the
- dataset, therefore the `values` vector for all
- dimensions must be the same (longer vectors
- will be truncated).
- valuessrc
- Sets the source reference on Chart Studio Cloud
- for values .
- visible
- Shows the dimension when set to `true` (the
- default). Hides the dimension for `false`.
-
- Returns
- -------
- tuple[plotly.graph_objs.parcats.Dimension]
- """
- return self["dimensions"]
-
- @dimensions.setter
- def dimensions(self, val):
- self["dimensions"] = val
-
- # dimensiondefaults
- # -----------------
- @property
- def dimensiondefaults(self):
- """
- When used in a template (as
- layout.template.data.parcats.dimensiondefaults), sets the
- default property values to use for elements of
- parcats.dimensions
-
- The 'dimensiondefaults' property is an instance of Dimension
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcats.Dimension`
- - A dict of string/value properties that will be passed
- to the Dimension constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.parcats.Dimension
- """
- return self["dimensiondefaults"]
-
- @dimensiondefaults.setter
- def dimensiondefaults(self, val):
- self["dimensiondefaults"] = 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.parcats.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 parcats trace
- .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this parcats trace .
- x
- Sets the horizontal domain of this parcats
- trace (in plot fraction).
- y
- Sets the vertical domain of this parcats trace
- (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.parcats.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['count', 'probability'] joined with '+' characters
- (e.g. 'count+probability')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
-
- Returns
- -------
- Any
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Sets the hover interaction mode for the parcats diagram. If
- `category`, hover interaction take place per category. If
- `color`, hover interactions take place per color per category.
- If `dimension`, hover interactions take place across all
- categories per dimension.
-
- The 'hoveron' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['category', 'color', 'dimension']
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `count`, `probability`, `category`, `categorycount`,
- `colorcount` and `bandcolorcount`. Anything contained in tag
- `` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # labelfont
- # ---------
- @property
- def labelfont(self):
- """
- Sets the font for the `dimension` labels.
-
- The 'labelfont' property is an instance of Labelfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcats.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.parcats.Labelfont
- """
- return self["labelfont"]
-
- @labelfont.setter
- def labelfont(self, val):
- self["labelfont"] = 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.parcats.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `line.colorscale`. Has an effect
- only if in `line.color`is set to a numerical
- array. 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
- in `line.color`) or the bounds set in
- `line.cmin` and `line.cmax` Has an effect only
- if in `line.color`is set to a numerical array.
- Defaults to `false` when `line.cmin` and
- `line.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `line.cmin` and/or `line.cmax` to be
- equidistant to this point. Has an effect only
- if in `line.color`is set to a numerical array.
- Value should have the same units as in
- `line.color`. Has no effect when `line.cauto`
- is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `line.color`is set to a
- numerical array. Value should have the same
- units as in `line.color` and if set,
- `line.cmax` must be set as well.
- color
- Sets thelinecolor. It accepts either a specific
- color or an array of numbers that are mapped to
- the colorscale relative to the max and min
- values of the array or relative to `line.cmin`
- and `line.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.parcats.line.Color
- Bar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `line.color`is set to a numerical array. 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`line.cmin` and `line.cmax`.
- Alternatively, `colorscale` may be a palette
- name string of the following list: Greys,YlGnBu
- ,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,R
- ainbow,Portland,Jet,Hot,Blackbody,Earth,Electri
- c,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- hovertemplate
- Template string used for rendering the
- information that appear on hover box. Note that
- this will override `hoverinfo`. Variables are
- inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's
- syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- for details on the formatting syntax. Dates are
- formatted using d3-time-format's syntax
- %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- for details on the date formatting syntax. The
- variables available in `hovertemplate` are the
- ones emitted as event data described at this
- link https://plotly.com/javascript/plotlyjs-
- events/#event-data. Additionally, every
- attributes that can be specified per-point (the
- ones that are `arrayOk: true`) are available.
- variables `count` and `probability`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `line.color`is set to a
- numerical array. If true, `line.cmin` will
- correspond to the last color in the array and
- `line.cmax` will correspond to the first color.
- shape
- Sets the shape of the paths. If `linear`, paths
- are composed of straight lines. If `hspline`,
- paths are composed of horizontal curved splines
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `line.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.parcats.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # sortpaths
- # ---------
- @property
- def sortpaths(self):
- """
- Sets the path sorting algorithm. If `forward`, sort paths based
- on dimension categories from left to right. If `backward`, sort
- paths based on dimensions categories from right to left.
-
- The 'sortpaths' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['forward', 'backward']
-
- Returns
- -------
- Any
- """
- return self["sortpaths"]
-
- @sortpaths.setter
- def sortpaths(self, val):
- self["sortpaths"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcats.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.parcats.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # tickfont
- # --------
- @property
- def tickfont(self):
- """
- Sets the font for the `category` labels.
-
- The 'tickfont' property is an instance of Tickfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.parcats.Tickfont`
- - A dict of string/value properties that will be passed
- to the Tickfont 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.parcats.Tickfont
- """
- return self["tickfont"]
-
- @tickfont.setter
- def tickfont(self, val):
- self["tickfont"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- arrangement
- Sets the drag interaction mode for categories and
- dimensions. If `perpendicular`, the categories can only
- move along a line perpendicular to the paths. If
- `freeform`, the categories can freely move on the
- plane. If `fixed`, the categories and dimensions are
- stationary.
- bundlecolors
- Sort paths so that like colors are bundled together
- within each category.
- counts
- The number of observations represented by each state.
- Defaults to 1 so that each state represents one
- observation
- countssrc
- Sets the source reference on Chart Studio Cloud for
- counts .
- dimensions
- The dimensions (variables) of the parallel categories
- diagram.
- dimensiondefaults
- When used in a template (as
- layout.template.data.parcats.dimensiondefaults), sets
- the default property values to use for elements of
- parcats.dimensions
- domain
- :class:`plotly.graph_objects.parcats.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoveron
- Sets the hover interaction mode for the parcats
- diagram. If `category`, hover interaction take place
- per category. If `color`, hover interactions take place
- per color per category. If `dimension`, hover
- interactions take place across all categories per
- dimension.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `count`, `probability`,
- `category`, `categorycount`, `colorcount` and
- `bandcolorcount`. Anything contained in tag ``
- is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- labelfont
- Sets the font for the `dimension` labels.
- line
- :class:`plotly.graph_objects.parcats.Line` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- sortpaths
- Sets the path sorting algorithm. If `forward`, sort
- paths based on dimension categories from left to right.
- If `backward`, sort paths based on dimensions
- categories from right to left.
- stream
- :class:`plotly.graph_objects.parcats.Stream` instance
- or dict with compatible properties
- tickfont
- Sets the font for the `category` labels.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- arrangement=None,
- bundlecolors=None,
- counts=None,
- countssrc=None,
- dimensions=None,
- dimensiondefaults=None,
- domain=None,
- hoverinfo=None,
- hoveron=None,
- hovertemplate=None,
- labelfont=None,
- line=None,
- meta=None,
- metasrc=None,
- name=None,
- sortpaths=None,
- stream=None,
- tickfont=None,
- uid=None,
- uirevision=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Parcats object
-
- Parallel categories diagram for multidimensional categorical
- data.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Parcats`
- arrangement
- Sets the drag interaction mode for categories and
- dimensions. If `perpendicular`, the categories can only
- move along a line perpendicular to the paths. If
- `freeform`, the categories can freely move on the
- plane. If `fixed`, the categories and dimensions are
- stationary.
- bundlecolors
- Sort paths so that like colors are bundled together
- within each category.
- counts
- The number of observations represented by each state.
- Defaults to 1 so that each state represents one
- observation
- countssrc
- Sets the source reference on Chart Studio Cloud for
- counts .
- dimensions
- The dimensions (variables) of the parallel categories
- diagram.
- dimensiondefaults
- When used in a template (as
- layout.template.data.parcats.dimensiondefaults), sets
- the default property values to use for elements of
- parcats.dimensions
- domain
- :class:`plotly.graph_objects.parcats.Domain` instance
- or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoveron
- Sets the hover interaction mode for the parcats
- diagram. If `category`, hover interaction take place
- per category. If `color`, hover interactions take place
- per color per category. If `dimension`, hover
- interactions take place across all categories per
- dimension.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `count`, `probability`,
- `category`, `categorycount`, `colorcount` and
- `bandcolorcount`. Anything contained in tag ``
- is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- labelfont
- Sets the font for the `dimension` labels.
- line
- :class:`plotly.graph_objects.parcats.Line` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- sortpaths
- Sets the path sorting algorithm. If `forward`, sort
- paths based on dimension categories from left to right.
- If `backward`, sort paths based on dimensions
- categories from right to left.
- stream
- :class:`plotly.graph_objects.parcats.Stream` instance
- or dict with compatible properties
- tickfont
- Sets the font for the `category` labels.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Parcats
- """
- super(Parcats, self).__init__("parcats")
-
- # 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.Parcats
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Parcats`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import parcats as v_parcats
-
- # Initialize validators
- # ---------------------
- self._validators["arrangement"] = v_parcats.ArrangementValidator()
- self._validators["bundlecolors"] = v_parcats.BundlecolorsValidator()
- self._validators["counts"] = v_parcats.CountsValidator()
- self._validators["countssrc"] = v_parcats.CountssrcValidator()
- self._validators["dimensions"] = v_parcats.DimensionsValidator()
- self._validators["dimensiondefaults"] = v_parcats.DimensionValidator()
- self._validators["domain"] = v_parcats.DomainValidator()
- self._validators["hoverinfo"] = v_parcats.HoverinfoValidator()
- self._validators["hoveron"] = v_parcats.HoveronValidator()
- self._validators["hovertemplate"] = v_parcats.HovertemplateValidator()
- self._validators["labelfont"] = v_parcats.LabelfontValidator()
- self._validators["line"] = v_parcats.LineValidator()
- self._validators["meta"] = v_parcats.MetaValidator()
- self._validators["metasrc"] = v_parcats.MetasrcValidator()
- self._validators["name"] = v_parcats.NameValidator()
- self._validators["sortpaths"] = v_parcats.SortpathsValidator()
- self._validators["stream"] = v_parcats.StreamValidator()
- self._validators["tickfont"] = v_parcats.TickfontValidator()
- self._validators["uid"] = v_parcats.UidValidator()
- self._validators["uirevision"] = v_parcats.UirevisionValidator()
- self._validators["visible"] = v_parcats.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("arrangement", None)
- self["arrangement"] = arrangement if arrangement is not None else _v
- _v = arg.pop("bundlecolors", None)
- self["bundlecolors"] = bundlecolors if bundlecolors is not None else _v
- _v = arg.pop("counts", None)
- self["counts"] = counts if counts is not None else _v
- _v = arg.pop("countssrc", None)
- self["countssrc"] = countssrc if countssrc is not None else _v
- _v = arg.pop("dimensions", None)
- self["dimensions"] = dimensions if dimensions is not None else _v
- _v = arg.pop("dimensiondefaults", None)
- self["dimensiondefaults"] = (
- dimensiondefaults if dimensiondefaults is not None else _v
- )
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("labelfont", None)
- self["labelfont"] = labelfont if labelfont is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("sortpaths", None)
- self["sortpaths"] = sortpaths if sortpaths is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("tickfont", None)
- self["tickfont"] = tickfont if tickfont is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "parcats"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="parcats", val="parcats"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Ohlc(_BaseTraceType):
-
- # close
- # -----
- @property
- def close(self):
- """
- Sets the close values.
-
- The 'close' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["close"]
-
- @close.setter
- def close(self, val):
- self["close"] = val
-
- # closesrc
- # --------
- @property
- def closesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for close .
-
- The 'closesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["closesrc"]
-
- @closesrc.setter
- def closesrc(self, val):
- self["closesrc"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # decreasing
- # ----------
- @property
- def decreasing(self):
- """
- The 'decreasing' property is an instance of Decreasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.ohlc.Decreasing`
- - A dict of string/value properties that will be passed
- to the Decreasing constructor
-
- Supported dict properties:
-
- line
- :class:`plotly.graph_objects.ohlc.decreasing.Li
- ne` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.ohlc.Decreasing
- """
- return self["decreasing"]
-
- @decreasing.setter
- def decreasing(self, val):
- self["decreasing"] = val
-
- # high
- # ----
- @property
- def high(self):
- """
- Sets the high values.
-
- The 'high' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["high"]
-
- @high.setter
- def high(self, val):
- self["high"] = val
-
- # highsrc
- # -------
- @property
- def highsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for high .
-
- The 'highsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["highsrc"]
-
- @highsrc.setter
- def highsrc(self, val):
- self["highsrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.ohlc.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
- split
- Show hover information (open, close, high, low)
- in separate labels.
-
- Returns
- -------
- plotly.graph_objs.ohlc.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # increasing
- # ----------
- @property
- def increasing(self):
- """
- The 'increasing' property is an instance of Increasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.ohlc.Increasing`
- - A dict of string/value properties that will be passed
- to the Increasing constructor
-
- Supported dict properties:
-
- line
- :class:`plotly.graph_objects.ohlc.increasing.Li
- ne` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.ohlc.Increasing
- """
- return self["increasing"]
-
- @increasing.setter
- def increasing(self, val):
- self["increasing"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.ohlc.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- 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").
- Note that this style setting can also be set
- per direction via `increasing.line.dash` and
- `decreasing.line.dash`.
- width
- [object Object] Note that this style setting
- can also be set per direction via
- `increasing.line.width` and
- `decreasing.line.width`.
-
- Returns
- -------
- plotly.graph_objs.ohlc.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # low
- # ---
- @property
- def low(self):
- """
- Sets the low values.
-
- The 'low' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["low"]
-
- @low.setter
- def low(self, val):
- self["low"] = val
-
- # lowsrc
- # ------
- @property
- def lowsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for low .
-
- The 'lowsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lowsrc"]
-
- @lowsrc.setter
- def lowsrc(self, val):
- self["lowsrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # open
- # ----
- @property
- def open(self):
- """
- Sets the open values.
-
- The 'open' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["open"]
-
- @open.setter
- def open(self, val):
- self["open"] = val
-
- # opensrc
- # -------
- @property
- def opensrc(self):
- """
- Sets the source reference on Chart Studio Cloud for open .
-
- The 'opensrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["opensrc"]
-
- @opensrc.setter
- def opensrc(self, val):
- self["opensrc"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.ohlc.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.ohlc.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets hover text elements associated with each sample point. If
- a single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- this trace's sample points.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # tickwidth
- # ---------
- @property
- def tickwidth(self):
- """
- Sets the width of the open/close tick marks relative to the "x"
- minimal interval.
-
- The 'tickwidth' property is a number and may be specified as:
- - An int or float in the interval [0, 0.5]
-
- Returns
- -------
- int|float
- """
- return self["tickwidth"]
-
- @tickwidth.setter
- def tickwidth(self, val):
- self["tickwidth"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates. If absent, linear coordinate will be
- generated.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- close
- Sets the close values.
- closesrc
- Sets the source reference on Chart Studio Cloud for
- close .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.ohlc.Decreasing` instance
- or dict with compatible properties
- high
- Sets the high values.
- highsrc
- Sets the source reference on Chart Studio Cloud for
- high .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.ohlc.Hoverlabel` instance
- or dict with compatible properties
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.ohlc.Increasing` instance
- or dict with compatible properties
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.ohlc.Line` instance or
- dict with compatible properties
- low
- Sets the low values.
- lowsrc
- Sets the source reference on Chart Studio Cloud for
- low .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- open
- Sets the open values.
- opensrc
- Sets the source reference on Chart Studio Cloud for
- open .
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.ohlc.Stream` instance or
- dict with compatible properties
- text
- Sets hover text elements associated with each sample
- point. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to this trace's sample points.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- tickwidth
- Sets the width of the open/close tick marks relative to
- the "x" minimal interval.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates. If absent, linear coordinate
- will be generated.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- """
-
- def __init__(
- self,
- arg=None,
- close=None,
- closesrc=None,
- customdata=None,
- customdatasrc=None,
- decreasing=None,
- high=None,
- highsrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- increasing=None,
- legendgroup=None,
- line=None,
- low=None,
- lowsrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- open=None,
- opensrc=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textsrc=None,
- tickwidth=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- yaxis=None,
- **kwargs
- ):
- """
- Construct a new Ohlc object
-
- The ohlc (short for Open-High-Low-Close) is a style of
- financial chart describing open, high, low and close for a
- given `x` coordinate (most likely time). The tip of the lines
- represent the `low` and `high` values and the horizontal
- segments represent the `open` and `close` values. Sample points
- where the close value is higher (lower) then the open value are
- called increasing (decreasing). By default, increasing items
- are drawn in green whereas decreasing are drawn in red.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Ohlc`
- close
- Sets the close values.
- closesrc
- Sets the source reference on Chart Studio Cloud for
- close .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.ohlc.Decreasing` instance
- or dict with compatible properties
- high
- Sets the high values.
- highsrc
- Sets the source reference on Chart Studio Cloud for
- high .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.ohlc.Hoverlabel` instance
- or dict with compatible properties
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.ohlc.Increasing` instance
- or dict with compatible properties
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.ohlc.Line` instance or
- dict with compatible properties
- low
- Sets the low values.
- lowsrc
- Sets the source reference on Chart Studio Cloud for
- low .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- open
- Sets the open values.
- opensrc
- Sets the source reference on Chart Studio Cloud for
- open .
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.ohlc.Stream` instance or
- dict with compatible properties
- text
- Sets hover text elements associated with each sample
- point. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to this trace's sample points.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- tickwidth
- Sets the width of the open/close tick marks relative to
- the "x" minimal interval.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates. If absent, linear coordinate
- will be generated.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
-
- Returns
- -------
- Ohlc
- """
- super(Ohlc, self).__init__("ohlc")
-
- # 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.Ohlc
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Ohlc`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import ohlc as v_ohlc
-
- # Initialize validators
- # ---------------------
- self._validators["close"] = v_ohlc.CloseValidator()
- self._validators["closesrc"] = v_ohlc.ClosesrcValidator()
- self._validators["customdata"] = v_ohlc.CustomdataValidator()
- self._validators["customdatasrc"] = v_ohlc.CustomdatasrcValidator()
- self._validators["decreasing"] = v_ohlc.DecreasingValidator()
- self._validators["high"] = v_ohlc.HighValidator()
- self._validators["highsrc"] = v_ohlc.HighsrcValidator()
- self._validators["hoverinfo"] = v_ohlc.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_ohlc.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_ohlc.HoverlabelValidator()
- self._validators["hovertext"] = v_ohlc.HovertextValidator()
- self._validators["hovertextsrc"] = v_ohlc.HovertextsrcValidator()
- self._validators["ids"] = v_ohlc.IdsValidator()
- self._validators["idssrc"] = v_ohlc.IdssrcValidator()
- self._validators["increasing"] = v_ohlc.IncreasingValidator()
- self._validators["legendgroup"] = v_ohlc.LegendgroupValidator()
- self._validators["line"] = v_ohlc.LineValidator()
- self._validators["low"] = v_ohlc.LowValidator()
- self._validators["lowsrc"] = v_ohlc.LowsrcValidator()
- self._validators["meta"] = v_ohlc.MetaValidator()
- self._validators["metasrc"] = v_ohlc.MetasrcValidator()
- self._validators["name"] = v_ohlc.NameValidator()
- self._validators["opacity"] = v_ohlc.OpacityValidator()
- self._validators["open"] = v_ohlc.OpenValidator()
- self._validators["opensrc"] = v_ohlc.OpensrcValidator()
- self._validators["selectedpoints"] = v_ohlc.SelectedpointsValidator()
- self._validators["showlegend"] = v_ohlc.ShowlegendValidator()
- self._validators["stream"] = v_ohlc.StreamValidator()
- self._validators["text"] = v_ohlc.TextValidator()
- self._validators["textsrc"] = v_ohlc.TextsrcValidator()
- self._validators["tickwidth"] = v_ohlc.TickwidthValidator()
- self._validators["uid"] = v_ohlc.UidValidator()
- self._validators["uirevision"] = v_ohlc.UirevisionValidator()
- self._validators["visible"] = v_ohlc.VisibleValidator()
- self._validators["x"] = v_ohlc.XValidator()
- self._validators["xaxis"] = v_ohlc.XAxisValidator()
- self._validators["xcalendar"] = v_ohlc.XcalendarValidator()
- self._validators["xsrc"] = v_ohlc.XsrcValidator()
- self._validators["yaxis"] = v_ohlc.YAxisValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("close", None)
- self["close"] = close if close is not None else _v
- _v = arg.pop("closesrc", None)
- self["closesrc"] = closesrc if closesrc is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("decreasing", None)
- self["decreasing"] = decreasing if decreasing is not None else _v
- _v = arg.pop("high", None)
- self["high"] = high if high is not None else _v
- _v = arg.pop("highsrc", None)
- self["highsrc"] = highsrc if highsrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("increasing", None)
- self["increasing"] = increasing if increasing is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("low", None)
- self["low"] = low if low is not None else _v
- _v = arg.pop("lowsrc", None)
- self["lowsrc"] = lowsrc if lowsrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("open", None)
- self["open"] = open if open is not None else _v
- _v = arg.pop("opensrc", None)
- self["opensrc"] = opensrc if opensrc is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("tickwidth", None)
- self["tickwidth"] = tickwidth if tickwidth is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "ohlc"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="ohlc", val="ohlc"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Mesh3d(_BaseTraceType):
-
- # alphahull
- # ---------
- @property
- def alphahull(self):
- """
- Determines how the mesh surface triangles are derived from the
- set of vertices (points) represented by the `x`, `y` and `z`
- arrays, if the `i`, `j`, `k` arrays are not supplied. For
- general use of `mesh3d` it is preferred that `i`, `j`, `k` are
- supplied. If "-1", Delaunay triangulation is used, which is
- mainly suitable if the mesh is a single, more or less layer
- surface that is perpendicular to `delaunayaxis`. In case the
- `delaunayaxis` intersects the mesh surface at more than one
- point it will result triangles that are very long in the
- dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm
- is used. In this case, the positive `alphahull` value signals
- the use of the alpha-shape algorithm, _and_ its value acts as
- the parameter for the mesh fitting. If 0, the convex-hull
- algorithm is used. It is suitable for convex bodies or if the
- intention is to enclose the `x`, `y` and `z` point set into a
- convex hull.
-
- The 'alphahull' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["alphahull"]
-
- @alphahull.setter
- def alphahull(self, val):
- self["alphahull"] = val
-
- # 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 `intensity`) 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 `intensity` 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 `intensity`. 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 `intensity` 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
-
- # color
- # -----
- @property
- def color(self):
- """
- Sets the color of the whole mesh
-
- The 'color' property is a color and may be specified as:
- - A hex string (e.g. '#ff0000')
- - An rgb/rgba string (e.g. 'rgb(255,0,0)')
- - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- - A named CSS color:
- aliceblue, antiquewhite, aqua, aquamarine, azure,
- beige, bisque, black, blanchedalmond, blue,
- blueviolet, brown, burlywood, cadetblue,
- chartreuse, chocolate, coral, cornflowerblue,
- cornsilk, crimson, cyan, darkblue, darkcyan,
- darkgoldenrod, darkgray, darkgrey, darkgreen,
- darkkhaki, darkmagenta, darkolivegreen, darkorange,
- darkorchid, darkred, darksalmon, darkseagreen,
- darkslateblue, darkslategray, darkslategrey,
- darkturquoise, darkviolet, deeppink, deepskyblue,
- dimgray, dimgrey, dodgerblue, firebrick,
- floralwhite, forestgreen, fuchsia, gainsboro,
- ghostwhite, gold, goldenrod, gray, grey, green,
- greenyellow, honeydew, hotpink, indianred, indigo,
- ivory, khaki, lavender, lavenderblush, lawngreen,
- lemonchiffon, lightblue, lightcoral, lightcyan,
- lightgoldenrodyellow, lightgray, lightgrey,
- lightgreen, lightpink, lightsalmon, lightseagreen,
- lightskyblue, lightslategray, lightslategrey,
- lightsteelblue, lightyellow, lime, limegreen,
- linen, magenta, maroon, mediumaquamarine,
- mediumblue, mediumorchid, mediumpurple,
- mediumseagreen, mediumslateblue, mediumspringgreen,
- mediumturquoise, mediumvioletred, midnightblue,
- mintcream, mistyrose, moccasin, navajowhite, navy,
- oldlace, olive, olivedrab, orange, orangered,
- orchid, palegoldenrod, palegreen, paleturquoise,
- palevioletred, papayawhip, peachpuff, peru, pink,
- plum, powderblue, purple, red, rosybrown,
- royalblue, rebeccapurple, saddlebrown, salmon,
- sandybrown, seagreen, seashell, sienna, silver,
- skyblue, slateblue, slategray, slategrey, snow,
- springgreen, steelblue, tan, teal, thistle, tomato,
- turquoise, violet, wheat, white, whitesmoke,
- yellow, yellowgreen
- - A number that will be interpreted as a color
- according to mesh3d.colorscale
-
- Returns
- -------
- str
- """
- return self["color"]
-
- @color.setter
- def color(self, val):
- self["color"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.mesh3d.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.mesh3d.
- colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.mesh3d.colorbar.tickformatstopdefaults), sets
- the default property values to use for elements
- of mesh3d.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.mesh3d.colorbar.Ti
- tle` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- mesh3d.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
- mesh3d.colorbar.title.side instead. Determines
- the location of color bar's title with respect
- to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.mesh3d.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # contour
- # -------
- @property
- def contour(self):
- """
- The 'contour' property is an instance of Contour
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.mesh3d.Contour`
- - A dict of string/value properties that will be passed
- to the Contour constructor
-
- Supported dict properties:
-
- color
- Sets the color of the contour lines.
- show
- Sets whether or not dynamic contours are shown
- on hover
- width
- Sets the width of the contour lines.
-
- Returns
- -------
- plotly.graph_objs.mesh3d.Contour
- """
- return self["contour"]
-
- @contour.setter
- def contour(self, val):
- self["contour"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # delaunayaxis
- # ------------
- @property
- def delaunayaxis(self):
- """
- Sets the Delaunay axis, which is the axis that is perpendicular
- to the surface of the Delaunay triangulation. It has an effect
- if `i`, `j`, `k` are not provided and `alphahull` is set to
- indicate Delaunay triangulation.
-
- The 'delaunayaxis' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['x', 'y', 'z']
-
- Returns
- -------
- Any
- """
- return self["delaunayaxis"]
-
- @delaunayaxis.setter
- def delaunayaxis(self, val):
- self["delaunayaxis"] = val
-
- # facecolor
- # ---------
- @property
- def facecolor(self):
- """
- Sets the color of each face Overrides "color" and
- "vertexcolor".
-
- The 'facecolor' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["facecolor"]
-
- @facecolor.setter
- def facecolor(self, val):
- self["facecolor"] = val
-
- # facecolorsrc
- # ------------
- @property
- def facecolorsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for facecolor
- .
-
- The 'facecolorsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["facecolorsrc"]
-
- @facecolorsrc.setter
- def facecolorsrc(self, val):
- self["facecolorsrc"] = val
-
- # flatshading
- # -----------
- @property
- def flatshading(self):
- """
- Determines whether or not normal smoothing is applied to the
- meshes, creating meshes with an angular, low-poly look via flat
- reflections.
-
- The 'flatshading' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["flatshading"]
-
- @flatshading.setter
- def flatshading(self, val):
- self["flatshading"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.mesh3d.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # i
- # -
- @property
- def i(self):
- """
- A vector of vertex indices, i.e. integer values between 0 and
- the length of the vertex vectors, representing the "first"
- vertex of a triangle. For example, `{i[m], j[m], k[m]}`
- together represent face m (triangle m) in the mesh, where `i[m]
- = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex
- arrays. Therefore, each element in `i` represents a point in
- space, which is the first vertex of a triangle.
-
- The 'i' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["i"]
-
- @i.setter
- def i(self, val):
- self["i"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # intensity
- # ---------
- @property
- def intensity(self):
- """
- Sets the intensity values for vertices or cells as defined by
- `intensitymode`. It can be used for plotting fields on meshes.
-
- The 'intensity' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["intensity"]
-
- @intensity.setter
- def intensity(self, val):
- self["intensity"] = val
-
- # intensitymode
- # -------------
- @property
- def intensitymode(self):
- """
- Determines the source of `intensity` values.
-
- The 'intensitymode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['vertex', 'cell']
-
- Returns
- -------
- Any
- """
- return self["intensitymode"]
-
- @intensitymode.setter
- def intensitymode(self, val):
- self["intensitymode"] = val
-
- # intensitysrc
- # ------------
- @property
- def intensitysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for intensity
- .
-
- The 'intensitysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["intensitysrc"]
-
- @intensitysrc.setter
- def intensitysrc(self, val):
- self["intensitysrc"] = val
-
- # isrc
- # ----
- @property
- def isrc(self):
- """
- Sets the source reference on Chart Studio Cloud for i .
-
- The 'isrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["isrc"]
-
- @isrc.setter
- def isrc(self, val):
- self["isrc"] = val
-
- # j
- # -
- @property
- def j(self):
- """
- A vector of vertex indices, i.e. integer values between 0 and
- the length of the vertex vectors, representing the "second"
- vertex of a triangle. For example, `{i[m], j[m], k[m]}`
- together represent face m (triangle m) in the mesh, where `j[m]
- = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex
- arrays. Therefore, each element in `j` represents a point in
- space, which is the second vertex of a triangle.
-
- The 'j' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["j"]
-
- @j.setter
- def j(self, val):
- self["j"] = val
-
- # jsrc
- # ----
- @property
- def jsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for j .
-
- The 'jsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["jsrc"]
-
- @jsrc.setter
- def jsrc(self, val):
- self["jsrc"] = val
-
- # k
- # -
- @property
- def k(self):
- """
- A vector of vertex indices, i.e. integer values between 0 and
- the length of the vertex vectors, representing the "third"
- vertex of a triangle. For example, `{i[m], j[m], k[m]}`
- together represent face m (triangle m) in the mesh, where `k[m]
- = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex
- arrays. Therefore, each element in `k` represents a point in
- space, which is the third vertex of a triangle.
-
- The 'k' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["k"]
-
- @k.setter
- def k(self, val):
- self["k"] = val
-
- # ksrc
- # ----
- @property
- def ksrc(self):
- """
- Sets the source reference on Chart Studio Cloud for k .
-
- The 'ksrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ksrc"]
-
- @ksrc.setter
- def ksrc(self, val):
- self["ksrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.mesh3d.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- facenormalsepsilon
- Epsilon for face normals calculation avoids
- math issues arising from degenerate geometry.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
- vertexnormalsepsilon
- Epsilon for vertex normals calculation avoids
- math issues arising from degenerate geometry.
-
- Returns
- -------
- plotly.graph_objs.mesh3d.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.mesh3d.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.mesh3d.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.mesh3d.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.mesh3d.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with the vertices. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # vertexcolor
- # -----------
- @property
- def vertexcolor(self):
- """
- Sets the color of each vertex Overrides "color". While Red,
- green and blue colors are in the range of 0 and 255; in the
- case of having vertex color data in RGBA format, the alpha
- color should be normalized to be between 0 and 1.
-
- The 'vertexcolor' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["vertexcolor"]
-
- @vertexcolor.setter
- def vertexcolor(self, val):
- self["vertexcolor"] = val
-
- # vertexcolorsrc
- # --------------
- @property
- def vertexcolorsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- vertexcolor .
-
- The 'vertexcolorsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["vertexcolorsrc"]
-
- @vertexcolorsrc.setter
- def vertexcolorsrc(self, val):
- self["vertexcolorsrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the X coordinates of the vertices. The nth element of
- vectors `x`, `y` and `z` jointly represent the X, Y and Z
- coordinates of the nth vertex.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the Y coordinates of the vertices. The nth element of
- vectors `x`, `y` and `z` jointly represent the X, Y and Z
- coordinates of the nth vertex.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the Z coordinates of the vertices. The nth element of
- vectors `x`, `y` and `z` jointly represent the X, Y and Z
- coordinates of the nth vertex.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zcalendar
- # ---------
- @property
- def zcalendar(self):
- """
- Sets the calendar system to use with `z` date data.
-
- The 'zcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["zcalendar"]
-
- @zcalendar.setter
- def zcalendar(self, val):
- self["zcalendar"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alphahull
- Determines how the mesh surface triangles are derived
- from the set of vertices (points) represented by the
- `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays
- are not supplied. For general use of `mesh3d` it is
- preferred that `i`, `j`, `k` are supplied. If "-1",
- Delaunay triangulation is used, which is mainly
- suitable if the mesh is a single, more or less layer
- surface that is perpendicular to `delaunayaxis`. In
- case the `delaunayaxis` intersects the mesh surface at
- more than one point it will result triangles that are
- very long in the dimension of `delaunayaxis`. If ">0",
- the alpha-shape algorithm is used. In this case, the
- positive `alphahull` value signals the use of the
- alpha-shape algorithm, _and_ its value acts as the
- parameter for the mesh fitting. If 0, the convex-hull
- algorithm is used. It is suitable for convex bodies or
- if the intention is to enclose the `x`, `y` and `z`
- point set into a convex hull.
- 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 `intensity`) 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 `intensity` 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 `intensity`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `intensity` and if set, `cmax`
- must be set as well.
- color
- Sets the color of the whole mesh
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.mesh3d.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.mesh3d.Contour` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- delaunayaxis
- Sets the Delaunay axis, which is the axis that is
- perpendicular to the surface of the Delaunay
- triangulation. It has an effect if `i`, `j`, `k` are
- not provided and `alphahull` is set to indicate
- Delaunay triangulation.
- facecolor
- Sets the color of each face Overrides "color" and
- "vertexcolor".
- facecolorsrc
- Sets the source reference on Chart Studio Cloud for
- facecolor .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.mesh3d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- i
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "first" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `i[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `i` represents a point in space, which
- is the first vertex of a triangle.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- intensity
- Sets the intensity values for vertices or cells as
- defined by `intensitymode`. It can be used for plotting
- fields on meshes.
- intensitymode
- Determines the source of `intensity` values.
- intensitysrc
- Sets the source reference on Chart Studio Cloud for
- intensity .
- isrc
- Sets the source reference on Chart Studio Cloud for i
- .
- j
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "second" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `j[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `j` represents a point in space, which
- is the second vertex of a triangle.
- jsrc
- Sets the source reference on Chart Studio Cloud for j
- .
- k
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "third" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `k[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `k` represents a point in space, which
- is the third vertex of a triangle.
- ksrc
- Sets the source reference on Chart Studio Cloud for k
- .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.mesh3d.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.mesh3d.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.mesh3d.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- vertexcolor
- Sets the color of each vertex Overrides "color". While
- Red, green and blue colors are in the range of 0 and
- 255; in the case of having vertex color data in RGBA
- format, the alpha color should be normalized to be
- between 0 and 1.
- vertexcolorsrc
- Sets the source reference on Chart Studio Cloud for
- vertexcolor .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- alphahull=None,
- autocolorscale=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- color=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- contour=None,
- customdata=None,
- customdatasrc=None,
- delaunayaxis=None,
- facecolor=None,
- facecolorsrc=None,
- flatshading=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- i=None,
- ids=None,
- idssrc=None,
- intensity=None,
- intensitymode=None,
- intensitysrc=None,
- isrc=None,
- j=None,
- jsrc=None,
- k=None,
- ksrc=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- vertexcolor=None,
- vertexcolorsrc=None,
- visible=None,
- x=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- ycalendar=None,
- ysrc=None,
- z=None,
- zcalendar=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Mesh3d object
-
- Draws sets of triangles with coordinates given by three
- 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`,
- `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha-
- shape algorithm or (4) the Convex-hull algorithm
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Mesh3d`
- alphahull
- Determines how the mesh surface triangles are derived
- from the set of vertices (points) represented by the
- `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays
- are not supplied. For general use of `mesh3d` it is
- preferred that `i`, `j`, `k` are supplied. If "-1",
- Delaunay triangulation is used, which is mainly
- suitable if the mesh is a single, more or less layer
- surface that is perpendicular to `delaunayaxis`. In
- case the `delaunayaxis` intersects the mesh surface at
- more than one point it will result triangles that are
- very long in the dimension of `delaunayaxis`. If ">0",
- the alpha-shape algorithm is used. In this case, the
- positive `alphahull` value signals the use of the
- alpha-shape algorithm, _and_ its value acts as the
- parameter for the mesh fitting. If 0, the convex-hull
- algorithm is used. It is suitable for convex bodies or
- if the intention is to enclose the `x`, `y` and `z`
- point set into a convex hull.
- 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 `intensity`) 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 `intensity` 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 `intensity`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `intensity` and if set, `cmax`
- must be set as well.
- color
- Sets the color of the whole mesh
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.mesh3d.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.mesh3d.Contour` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- delaunayaxis
- Sets the Delaunay axis, which is the axis that is
- perpendicular to the surface of the Delaunay
- triangulation. It has an effect if `i`, `j`, `k` are
- not provided and `alphahull` is set to indicate
- Delaunay triangulation.
- facecolor
- Sets the color of each face Overrides "color" and
- "vertexcolor".
- facecolorsrc
- Sets the source reference on Chart Studio Cloud for
- facecolor .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.mesh3d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- i
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "first" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `i[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `i` represents a point in space, which
- is the first vertex of a triangle.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- intensity
- Sets the intensity values for vertices or cells as
- defined by `intensitymode`. It can be used for plotting
- fields on meshes.
- intensitymode
- Determines the source of `intensity` values.
- intensitysrc
- Sets the source reference on Chart Studio Cloud for
- intensity .
- isrc
- Sets the source reference on Chart Studio Cloud for i
- .
- j
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "second" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `j[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `j` represents a point in space, which
- is the second vertex of a triangle.
- jsrc
- Sets the source reference on Chart Studio Cloud for j
- .
- k
- A vector of vertex indices, i.e. integer values between
- 0 and the length of the vertex vectors, representing
- the "third" vertex of a triangle. For example, `{i[m],
- j[m], k[m]}` together represent face m (triangle m) in
- the mesh, where `k[m] = n` points to the triplet
- `{x[n], y[n], z[n]}` in the vertex arrays. Therefore,
- each element in `k` represents a point in space, which
- is the third vertex of a triangle.
- ksrc
- Sets the source reference on Chart Studio Cloud for k
- .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.mesh3d.Lighting` instance
- or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.mesh3d.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.mesh3d.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- vertexcolor
- Sets the color of each vertex Overrides "color". While
- Red, green and blue colors are in the range of 0 and
- 255; in the case of having vertex color data in RGBA
- format, the alpha color should be normalized to be
- between 0 and 1.
- vertexcolorsrc
- Sets the source reference on Chart Studio Cloud for
- vertexcolor .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices. The nth element
- of vectors `x`, `y` and `z` jointly represent the X, Y
- and Z coordinates of the nth vertex.
- zcalendar
- Sets the calendar system to use with `z` date data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Mesh3d
- """
- super(Mesh3d, self).__init__("mesh3d")
-
- # 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.Mesh3d
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Mesh3d`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import mesh3d as v_mesh3d
-
- # Initialize validators
- # ---------------------
- self._validators["alphahull"] = v_mesh3d.AlphahullValidator()
- self._validators["autocolorscale"] = v_mesh3d.AutocolorscaleValidator()
- self._validators["cauto"] = v_mesh3d.CautoValidator()
- self._validators["cmax"] = v_mesh3d.CmaxValidator()
- self._validators["cmid"] = v_mesh3d.CmidValidator()
- self._validators["cmin"] = v_mesh3d.CminValidator()
- self._validators["color"] = v_mesh3d.ColorValidator()
- self._validators["coloraxis"] = v_mesh3d.ColoraxisValidator()
- self._validators["colorbar"] = v_mesh3d.ColorBarValidator()
- self._validators["colorscale"] = v_mesh3d.ColorscaleValidator()
- self._validators["contour"] = v_mesh3d.ContourValidator()
- self._validators["customdata"] = v_mesh3d.CustomdataValidator()
- self._validators["customdatasrc"] = v_mesh3d.CustomdatasrcValidator()
- self._validators["delaunayaxis"] = v_mesh3d.DelaunayaxisValidator()
- self._validators["facecolor"] = v_mesh3d.FacecolorValidator()
- self._validators["facecolorsrc"] = v_mesh3d.FacecolorsrcValidator()
- self._validators["flatshading"] = v_mesh3d.FlatshadingValidator()
- self._validators["hoverinfo"] = v_mesh3d.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_mesh3d.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_mesh3d.HoverlabelValidator()
- self._validators["hovertemplate"] = v_mesh3d.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_mesh3d.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_mesh3d.HovertextValidator()
- self._validators["hovertextsrc"] = v_mesh3d.HovertextsrcValidator()
- self._validators["i"] = v_mesh3d.IValidator()
- self._validators["ids"] = v_mesh3d.IdsValidator()
- self._validators["idssrc"] = v_mesh3d.IdssrcValidator()
- self._validators["intensity"] = v_mesh3d.IntensityValidator()
- self._validators["intensitymode"] = v_mesh3d.IntensitymodeValidator()
- self._validators["intensitysrc"] = v_mesh3d.IntensitysrcValidator()
- self._validators["isrc"] = v_mesh3d.IsrcValidator()
- self._validators["j"] = v_mesh3d.JValidator()
- self._validators["jsrc"] = v_mesh3d.JsrcValidator()
- self._validators["k"] = v_mesh3d.KValidator()
- self._validators["ksrc"] = v_mesh3d.KsrcValidator()
- self._validators["legendgroup"] = v_mesh3d.LegendgroupValidator()
- self._validators["lighting"] = v_mesh3d.LightingValidator()
- self._validators["lightposition"] = v_mesh3d.LightpositionValidator()
- self._validators["meta"] = v_mesh3d.MetaValidator()
- self._validators["metasrc"] = v_mesh3d.MetasrcValidator()
- self._validators["name"] = v_mesh3d.NameValidator()
- self._validators["opacity"] = v_mesh3d.OpacityValidator()
- self._validators["reversescale"] = v_mesh3d.ReversescaleValidator()
- self._validators["scene"] = v_mesh3d.SceneValidator()
- self._validators["showlegend"] = v_mesh3d.ShowlegendValidator()
- self._validators["showscale"] = v_mesh3d.ShowscaleValidator()
- self._validators["stream"] = v_mesh3d.StreamValidator()
- self._validators["text"] = v_mesh3d.TextValidator()
- self._validators["textsrc"] = v_mesh3d.TextsrcValidator()
- self._validators["uid"] = v_mesh3d.UidValidator()
- self._validators["uirevision"] = v_mesh3d.UirevisionValidator()
- self._validators["vertexcolor"] = v_mesh3d.VertexcolorValidator()
- self._validators["vertexcolorsrc"] = v_mesh3d.VertexcolorsrcValidator()
- self._validators["visible"] = v_mesh3d.VisibleValidator()
- self._validators["x"] = v_mesh3d.XValidator()
- self._validators["xcalendar"] = v_mesh3d.XcalendarValidator()
- self._validators["xsrc"] = v_mesh3d.XsrcValidator()
- self._validators["y"] = v_mesh3d.YValidator()
- self._validators["ycalendar"] = v_mesh3d.YcalendarValidator()
- self._validators["ysrc"] = v_mesh3d.YsrcValidator()
- self._validators["z"] = v_mesh3d.ZValidator()
- self._validators["zcalendar"] = v_mesh3d.ZcalendarValidator()
- self._validators["zsrc"] = v_mesh3d.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alphahull", None)
- self["alphahull"] = alphahull if alphahull is not None else _v
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("color", None)
- self["color"] = color if color is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("contour", None)
- self["contour"] = contour if contour is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("delaunayaxis", None)
- self["delaunayaxis"] = delaunayaxis if delaunayaxis is not None else _v
- _v = arg.pop("facecolor", None)
- self["facecolor"] = facecolor if facecolor is not None else _v
- _v = arg.pop("facecolorsrc", None)
- self["facecolorsrc"] = facecolorsrc if facecolorsrc is not None else _v
- _v = arg.pop("flatshading", None)
- self["flatshading"] = flatshading if flatshading is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("i", None)
- self["i"] = i if i is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("intensity", None)
- self["intensity"] = intensity if intensity is not None else _v
- _v = arg.pop("intensitymode", None)
- self["intensitymode"] = intensitymode if intensitymode is not None else _v
- _v = arg.pop("intensitysrc", None)
- self["intensitysrc"] = intensitysrc if intensitysrc is not None else _v
- _v = arg.pop("isrc", None)
- self["isrc"] = isrc if isrc is not None else _v
- _v = arg.pop("j", None)
- self["j"] = j if j is not None else _v
- _v = arg.pop("jsrc", None)
- self["jsrc"] = jsrc if jsrc is not None else _v
- _v = arg.pop("k", None)
- self["k"] = k if k is not None else _v
- _v = arg.pop("ksrc", None)
- self["ksrc"] = ksrc if ksrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("vertexcolor", None)
- self["vertexcolor"] = vertexcolor if vertexcolor is not None else _v
- _v = arg.pop("vertexcolorsrc", None)
- self["vertexcolorsrc"] = vertexcolorsrc if vertexcolorsrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zcalendar", None)
- self["zcalendar"] = zcalendar if zcalendar is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "mesh3d"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="mesh3d", val="mesh3d"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Isosurface(_BaseTraceType):
-
- # 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
-
- # caps
- # ----
- @property
- def caps(self):
- """
- The 'caps' property is an instance of Caps
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Caps`
- - A dict of string/value properties that will be passed
- to the Caps constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.isosurface.caps.X`
- instance or dict with compatible properties
- y
- :class:`plotly.graph_objects.isosurface.caps.Y`
- instance or dict with compatible properties
- z
- :class:`plotly.graph_objects.isosurface.caps.Z`
- instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.isosurface.Caps
- """
- return self["caps"]
-
- @caps.setter
- def caps(self, val):
- self["caps"] = val
-
- # cauto
- # -----
- @property
- def cauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here `value`) 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 `value` 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 `value`. 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 `value` 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.isosurface.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.isosurf
- ace.colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.isosurface.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of isosurface.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.isosurface.colorba
- r.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- isosurface.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
- isosurface.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.isosurface.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # contour
- # -------
- @property
- def contour(self):
- """
- The 'contour' property is an instance of Contour
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Contour`
- - A dict of string/value properties that will be passed
- to the Contour constructor
-
- Supported dict properties:
-
- color
- Sets the color of the contour lines.
- show
- Sets whether or not dynamic contours are shown
- on hover
- width
- Sets the width of the contour lines.
-
- Returns
- -------
- plotly.graph_objs.isosurface.Contour
- """
- return self["contour"]
-
- @contour.setter
- def contour(self, val):
- self["contour"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # flatshading
- # -----------
- @property
- def flatshading(self):
- """
- Determines whether or not normal smoothing is applied to the
- meshes, creating meshes with an angular, low-poly look via flat
- reflections.
-
- The 'flatshading' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["flatshading"]
-
- @flatshading.setter
- def flatshading(self, val):
- self["flatshading"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.isosurface.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # isomax
- # ------
- @property
- def isomax(self):
- """
- Sets the maximum boundary for iso-surface plot.
-
- The 'isomax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["isomax"]
-
- @isomax.setter
- def isomax(self, val):
- self["isomax"] = val
-
- # isomin
- # ------
- @property
- def isomin(self):
- """
- Sets the minimum boundary for iso-surface plot.
-
- The 'isomin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["isomin"]
-
- @isomin.setter
- def isomin(self, val):
- self["isomin"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- facenormalsepsilon
- Epsilon for face normals calculation avoids
- math issues arising from degenerate geometry.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
- vertexnormalsepsilon
- Epsilon for vertex normals calculation avoids
- math issues arising from degenerate geometry.
-
- Returns
- -------
- plotly.graph_objs.isosurface.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.isosurface.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # slices
- # ------
- @property
- def slices(self):
- """
- The 'slices' property is an instance of Slices
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Slices`
- - A dict of string/value properties that will be passed
- to the Slices constructor
-
- Supported dict properties:
-
- x
- :class:`plotly.graph_objects.isosurface.slices.
- X` instance or dict with compatible properties
- y
- :class:`plotly.graph_objects.isosurface.slices.
- Y` instance or dict with compatible properties
- z
- :class:`plotly.graph_objects.isosurface.slices.
- Z` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.isosurface.Slices
- """
- return self["slices"]
-
- @slices.setter
- def slices(self, val):
- self["slices"] = val
-
- # spaceframe
- # ----------
- @property
- def spaceframe(self):
- """
- The 'spaceframe' property is an instance of Spaceframe
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe`
- - A dict of string/value properties that will be passed
- to the Spaceframe constructor
-
- Supported dict properties:
-
- fill
- Sets the fill ratio of the `spaceframe`
- elements. The default fill value is 0.15
- meaning that only 15% of the area of every
- faces of tetras would be shaded. Applying a
- greater `fill` ratio would allow the creation
- of stronger elements or could be sued to have
- entirely closed areas (in case of using 1).
- show
- Displays/hides tetrahedron shapes between
- minimum and maximum iso-values. Often useful
- when either caps or surfaces are disabled or
- filled with values less than 1.
-
- Returns
- -------
- plotly.graph_objs.isosurface.Spaceframe
- """
- return self["spaceframe"]
-
- @spaceframe.setter
- def spaceframe(self, val):
- self["spaceframe"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.isosurface.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # surface
- # -------
- @property
- def surface(self):
- """
- The 'surface' property is an instance of Surface
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.isosurface.Surface`
- - A dict of string/value properties that will be passed
- to the Surface constructor
-
- Supported dict properties:
-
- count
- Sets the number of iso-surfaces between minimum
- and maximum iso-values. By default this value
- is 2 meaning that only minimum and maximum
- surfaces would be drawn.
- fill
- Sets the fill ratio of the iso-surface. The
- default fill value of the surface is 1 meaning
- that they are entirely shaded. On the other
- hand Applying a `fill` ratio less than one
- would allow the creation of openings parallel
- to the edges.
- pattern
- Sets the surface pattern of the iso-surface 3-D
- sections. The default pattern of the surface is
- `all` meaning that the rest of surface elements
- would be shaded. The check options (either 1 or
- 2) could be used to draw half of the squares on
- the surface. Using various combinations of
- capital `A`, `B`, `C`, `D` and `E` may also be
- used to reduce the number of triangles on the
- iso-surfaces and creating other patterns of
- interest.
- show
- Hides/displays surfaces between minimum and
- maximum iso-values.
-
- Returns
- -------
- plotly.graph_objs.isosurface.Surface
- """
- return self["surface"]
-
- @surface.setter
- def surface(self, val):
- self["surface"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with the vertices. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # value
- # -----
- @property
- def value(self):
- """
- Sets the 4th dimension (value) of the vertices.
-
- The 'value' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["value"]
-
- @value.setter
- def value(self, val):
- self["value"] = val
-
- # valuesrc
- # --------
- @property
- def valuesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for value .
-
- The 'valuesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuesrc"]
-
- @valuesrc.setter
- def valuesrc(self, val):
- self["valuesrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the X coordinates of the vertices on X axis.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the Y coordinates of the vertices on Y axis.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the Z coordinates of the vertices on Z axis.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- caps
- :class:`plotly.graph_objects.isosurface.Caps` instance
- or dict with compatible properties
- cauto
- Determines whether or not the color domain is computed
- with respect to the input data (here `value`) 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 `value` 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 `value`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `value` and if set, `cmax` must
- be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.isosurface.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.isosurface.Contour`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.isosurface.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- isomax
- Sets the maximum boundary for iso-surface plot.
- isomin
- Sets the minimum boundary for iso-surface plot.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.isosurface.Lighting`
- instance or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.isosurface.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- slices
- :class:`plotly.graph_objects.isosurface.Slices`
- instance or dict with compatible properties
- spaceframe
- :class:`plotly.graph_objects.isosurface.Spaceframe`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.isosurface.Stream`
- instance or dict with compatible properties
- surface
- :class:`plotly.graph_objects.isosurface.Surface`
- instance or dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the 4th dimension (value) of the vertices.
- valuesrc
- Sets the source reference on Chart Studio Cloud for
- value .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices on X axis.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices on Y axis.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices on Z axis.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- caps=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- contour=None,
- customdata=None,
- customdatasrc=None,
- flatshading=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- isomax=None,
- isomin=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- slices=None,
- spaceframe=None,
- stream=None,
- surface=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- value=None,
- valuesrc=None,
- visible=None,
- x=None,
- xsrc=None,
- y=None,
- ysrc=None,
- z=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Isosurface object
-
- Draws isosurfaces between iso-min and iso-max values with
- coordinates given by four 1-dimensional arrays containing the
- `value`, `x`, `y` and `z` of every vertex of a uniform or non-
- uniform 3-D grid. Horizontal or vertical slices, caps as well
- as spaceframe between iso-min and iso-max values could also be
- drawn using this trace.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Isosurface`
- 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.
- caps
- :class:`plotly.graph_objects.isosurface.Caps` instance
- or dict with compatible properties
- cauto
- Determines whether or not the color domain is computed
- with respect to the input data (here `value`) 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 `value` 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 `value`. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as `value` and if set, `cmax` must
- be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.isosurface.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contour
- :class:`plotly.graph_objects.isosurface.Contour`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- flatshading
- Determines whether or not normal smoothing is applied
- to the meshes, creating meshes with an angular, low-
- poly look via flat reflections.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.isosurface.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- isomax
- Sets the maximum boundary for iso-surface plot.
- isomin
- Sets the minimum boundary for iso-surface plot.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.isosurface.Lighting`
- instance or dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.isosurface.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- slices
- :class:`plotly.graph_objects.isosurface.Slices`
- instance or dict with compatible properties
- spaceframe
- :class:`plotly.graph_objects.isosurface.Spaceframe`
- instance or dict with compatible properties
- stream
- :class:`plotly.graph_objects.isosurface.Stream`
- instance or dict with compatible properties
- surface
- :class:`plotly.graph_objects.isosurface.Surface`
- instance or dict with compatible properties
- text
- Sets the text elements associated with the vertices. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the 4th dimension (value) of the vertices.
- valuesrc
- Sets the source reference on Chart Studio Cloud for
- value .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the X coordinates of the vertices on X axis.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the Y coordinates of the vertices on Y axis.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the Z coordinates of the vertices on Z axis.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Isosurface
- """
- super(Isosurface, self).__init__("isosurface")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Isosurface
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Isosurface`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import isosurface as v_isosurface
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_isosurface.AutocolorscaleValidator()
- self._validators["caps"] = v_isosurface.CapsValidator()
- self._validators["cauto"] = v_isosurface.CautoValidator()
- self._validators["cmax"] = v_isosurface.CmaxValidator()
- self._validators["cmid"] = v_isosurface.CmidValidator()
- self._validators["cmin"] = v_isosurface.CminValidator()
- self._validators["coloraxis"] = v_isosurface.ColoraxisValidator()
- self._validators["colorbar"] = v_isosurface.ColorBarValidator()
- self._validators["colorscale"] = v_isosurface.ColorscaleValidator()
- self._validators["contour"] = v_isosurface.ContourValidator()
- self._validators["customdata"] = v_isosurface.CustomdataValidator()
- self._validators["customdatasrc"] = v_isosurface.CustomdatasrcValidator()
- self._validators["flatshading"] = v_isosurface.FlatshadingValidator()
- self._validators["hoverinfo"] = v_isosurface.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_isosurface.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_isosurface.HoverlabelValidator()
- self._validators["hovertemplate"] = v_isosurface.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_isosurface.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_isosurface.HovertextValidator()
- self._validators["hovertextsrc"] = v_isosurface.HovertextsrcValidator()
- self._validators["ids"] = v_isosurface.IdsValidator()
- self._validators["idssrc"] = v_isosurface.IdssrcValidator()
- self._validators["isomax"] = v_isosurface.IsomaxValidator()
- self._validators["isomin"] = v_isosurface.IsominValidator()
- self._validators["legendgroup"] = v_isosurface.LegendgroupValidator()
- self._validators["lighting"] = v_isosurface.LightingValidator()
- self._validators["lightposition"] = v_isosurface.LightpositionValidator()
- self._validators["meta"] = v_isosurface.MetaValidator()
- self._validators["metasrc"] = v_isosurface.MetasrcValidator()
- self._validators["name"] = v_isosurface.NameValidator()
- self._validators["opacity"] = v_isosurface.OpacityValidator()
- self._validators["reversescale"] = v_isosurface.ReversescaleValidator()
- self._validators["scene"] = v_isosurface.SceneValidator()
- self._validators["showlegend"] = v_isosurface.ShowlegendValidator()
- self._validators["showscale"] = v_isosurface.ShowscaleValidator()
- self._validators["slices"] = v_isosurface.SlicesValidator()
- self._validators["spaceframe"] = v_isosurface.SpaceframeValidator()
- self._validators["stream"] = v_isosurface.StreamValidator()
- self._validators["surface"] = v_isosurface.SurfaceValidator()
- self._validators["text"] = v_isosurface.TextValidator()
- self._validators["textsrc"] = v_isosurface.TextsrcValidator()
- self._validators["uid"] = v_isosurface.UidValidator()
- self._validators["uirevision"] = v_isosurface.UirevisionValidator()
- self._validators["value"] = v_isosurface.ValueValidator()
- self._validators["valuesrc"] = v_isosurface.ValuesrcValidator()
- self._validators["visible"] = v_isosurface.VisibleValidator()
- self._validators["x"] = v_isosurface.XValidator()
- self._validators["xsrc"] = v_isosurface.XsrcValidator()
- self._validators["y"] = v_isosurface.YValidator()
- self._validators["ysrc"] = v_isosurface.YsrcValidator()
- self._validators["z"] = v_isosurface.ZValidator()
- self._validators["zsrc"] = v_isosurface.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("caps", None)
- self["caps"] = caps if caps is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("contour", None)
- self["contour"] = contour if contour is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("flatshading", None)
- self["flatshading"] = flatshading if flatshading is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("isomax", None)
- self["isomax"] = isomax if isomax is not None else _v
- _v = arg.pop("isomin", None)
- self["isomin"] = isomin if isomin is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("slices", None)
- self["slices"] = slices if slices is not None else _v
- _v = arg.pop("spaceframe", None)
- self["spaceframe"] = spaceframe if spaceframe is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("surface", None)
- self["surface"] = surface if surface is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("value", None)
- self["value"] = value if value is not None else _v
- _v = arg.pop("valuesrc", None)
- self["valuesrc"] = valuesrc if valuesrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "isosurface"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="isosurface", val="isosurface"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Indicator(_BaseTraceType):
-
- # align
- # -----
- @property
- def align(self):
- """
- Sets the horizontal alignment of the `text` within the box.
- Note that this attribute has no effect if an angular gauge is
- displayed: in this case, it is always centered
-
- The 'align' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['left', 'center', 'right']
-
- Returns
- -------
- Any
- """
- return self["align"]
-
- @align.setter
- def align(self, val):
- self["align"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # delta
- # -----
- @property
- def delta(self):
- """
- The 'delta' property is an instance of Delta
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.indicator.Delta`
- - A dict of string/value properties that will be passed
- to the Delta constructor
-
- Supported dict properties:
-
- decreasing
- :class:`plotly.graph_objects.indicator.delta.De
- creasing` instance or dict with compatible
- properties
- font
- Set the font used to display the delta
- increasing
- :class:`plotly.graph_objects.indicator.delta.In
- creasing` instance or dict with compatible
- properties
- position
- Sets the position of delta with respect to the
- number.
- reference
- Sets the reference value to compute the delta.
- By default, it is set to the current value.
- relative
- Show relative change
- valueformat
- Sets the value formatting rule using d3
- formatting mini-language which is similar to
- those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- Returns
- -------
- plotly.graph_objs.indicator.Delta
- """
- return self["delta"]
-
- @delta.setter
- def delta(self, val):
- self["delta"] = 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.indicator.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 indicator
- trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this indicator trace .
- x
- Sets the horizontal domain of this indicator
- trace (in plot fraction).
- y
- Sets the vertical domain of this indicator
- trace (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.indicator.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # gauge
- # -----
- @property
- def gauge(self):
- """
- The gauge of the Indicator plot.
-
- The 'gauge' property is an instance of Gauge
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.indicator.Gauge`
- - A dict of string/value properties that will be passed
- to the Gauge constructor
-
- Supported dict properties:
-
- axis
- :class:`plotly.graph_objects.indicator.gauge.Ax
- is` instance or dict with compatible properties
- bar
- Set the appearance of the gauge's value
- bgcolor
- Sets the gauge background color.
- bordercolor
- Sets the color of the border enclosing the
- gauge.
- borderwidth
- Sets the width (in px) of the border enclosing
- the gauge.
- shape
- Set the shape of the gauge
- steps
- A tuple of :class:`plotly.graph_objects.indicat
- or.gauge.Step` instances or dicts with
- compatible properties
- stepdefaults
- When used in a template (as layout.template.dat
- a.indicator.gauge.stepdefaults), sets the
- default property values to use for elements of
- indicator.gauge.steps
- threshold
- :class:`plotly.graph_objects.indicator.gauge.Th
- reshold` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.indicator.Gauge
- """
- return self["gauge"]
-
- @gauge.setter
- def gauge(self, val):
- self["gauge"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # mode
- # ----
- @property
- def mode(self):
- """
- Determines how the value is displayed on the graph. `number`
- displays the value numerically in text. `delta` displays the
- difference to a reference value in text. Finally, `gauge`
- displays the value graphically on an axis.
-
- The 'mode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters
- (e.g. 'number+delta')
-
- Returns
- -------
- Any
- """
- return self["mode"]
-
- @mode.setter
- def mode(self, val):
- self["mode"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # number
- # ------
- @property
- def number(self):
- """
- The 'number' property is an instance of Number
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.indicator.Number`
- - A dict of string/value properties that will be passed
- to the Number constructor
-
- Supported dict properties:
-
- font
- Set the font used to display main number
- prefix
- Sets a prefix appearing before the number.
- suffix
- Sets a suffix appearing next to the number.
- valueformat
- Sets the value formatting rule using d3
- formatting mini-language which is similar to
- those of Python. See
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- Returns
- -------
- plotly.graph_objs.indicator.Number
- """
- return self["number"]
-
- @number.setter
- def number(self, val):
- self["number"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.indicator.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.indicator.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = 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.indicator.Title`
- - A dict of string/value properties that will be passed
- to the Title constructor
-
- Supported dict properties:
-
- align
- Sets the horizontal alignment of the title. It
- defaults to `center` except for bullet charts
- for which it defaults to right.
- font
- Set the font used to display the title
- text
- Sets the title of this indicator.
-
- Returns
- -------
- plotly.graph_objs.indicator.Title
- """
- return self["title"]
-
- @title.setter
- def title(self, val):
- self["title"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # value
- # -----
- @property
- def value(self):
- """
- Sets the number to be displayed.
-
- The 'value' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["value"]
-
- @value.setter
- def value(self, val):
- self["value"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- align
- Sets the horizontal alignment of the `text` within the
- box. Note that this attribute has no effect if an
- angular gauge is displayed: in this case, it is always
- centered
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- delta
- :class:`plotly.graph_objects.indicator.Delta` instance
- or dict with compatible properties
- domain
- :class:`plotly.graph_objects.indicator.Domain` instance
- or dict with compatible properties
- gauge
- The gauge of the Indicator plot.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines how the value is displayed on the graph.
- `number` displays the value numerically in text.
- `delta` displays the difference to a reference value in
- text. Finally, `gauge` displays the value graphically
- on an axis.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- number
- :class:`plotly.graph_objects.indicator.Number` instance
- or dict with compatible properties
- stream
- :class:`plotly.graph_objects.indicator.Stream` instance
- or dict with compatible properties
- title
- :class:`plotly.graph_objects.indicator.Title` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the number to be displayed.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- align=None,
- customdata=None,
- customdatasrc=None,
- delta=None,
- domain=None,
- gauge=None,
- ids=None,
- idssrc=None,
- meta=None,
- metasrc=None,
- mode=None,
- name=None,
- number=None,
- stream=None,
- title=None,
- uid=None,
- uirevision=None,
- value=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Indicator object
-
- An indicator is used to visualize a single `value` along with
- some contextual information such as `steps` or a `threshold`,
- using a combination of three visual elements: a number, a
- delta, and/or a gauge. Deltas are taken with respect to a
- `reference`. Gauges can be either angular or bullet (aka
- linear) gauges.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Indicator`
- align
- Sets the horizontal alignment of the `text` within the
- box. Note that this attribute has no effect if an
- angular gauge is displayed: in this case, it is always
- centered
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- delta
- :class:`plotly.graph_objects.indicator.Delta` instance
- or dict with compatible properties
- domain
- :class:`plotly.graph_objects.indicator.Domain` instance
- or dict with compatible properties
- gauge
- The gauge of the Indicator plot.
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- mode
- Determines how the value is displayed on the graph.
- `number` displays the value numerically in text.
- `delta` displays the difference to a reference value in
- text. Finally, `gauge` displays the value graphically
- on an axis.
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- number
- :class:`plotly.graph_objects.indicator.Number` instance
- or dict with compatible properties
- stream
- :class:`plotly.graph_objects.indicator.Stream` instance
- or dict with compatible properties
- title
- :class:`plotly.graph_objects.indicator.Title` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- value
- Sets the number to be displayed.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Indicator
- """
- super(Indicator, self).__init__("indicator")
-
- # 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.Indicator
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Indicator`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import indicator as v_indicator
-
- # Initialize validators
- # ---------------------
- self._validators["align"] = v_indicator.AlignValidator()
- self._validators["customdata"] = v_indicator.CustomdataValidator()
- self._validators["customdatasrc"] = v_indicator.CustomdatasrcValidator()
- self._validators["delta"] = v_indicator.DeltaValidator()
- self._validators["domain"] = v_indicator.DomainValidator()
- self._validators["gauge"] = v_indicator.GaugeValidator()
- self._validators["ids"] = v_indicator.IdsValidator()
- self._validators["idssrc"] = v_indicator.IdssrcValidator()
- self._validators["meta"] = v_indicator.MetaValidator()
- self._validators["metasrc"] = v_indicator.MetasrcValidator()
- self._validators["mode"] = v_indicator.ModeValidator()
- self._validators["name"] = v_indicator.NameValidator()
- self._validators["number"] = v_indicator.NumberValidator()
- self._validators["stream"] = v_indicator.StreamValidator()
- self._validators["title"] = v_indicator.TitleValidator()
- self._validators["uid"] = v_indicator.UidValidator()
- self._validators["uirevision"] = v_indicator.UirevisionValidator()
- self._validators["value"] = v_indicator.ValueValidator()
- self._validators["visible"] = v_indicator.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("align", None)
- self["align"] = align if align is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("delta", None)
- self["delta"] = delta if delta is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("gauge", None)
- self["gauge"] = gauge if gauge is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("mode", None)
- self["mode"] = mode if mode is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("number", None)
- self["number"] = number if number is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("title", None)
- self["title"] = title if title is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("value", None)
- self["value"] = value if value is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "indicator"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="indicator", val="indicator"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Image(_BaseTraceType):
-
- # colormodel
- # ----------
- @property
- def colormodel(self):
- """
- Color model used to map the numerical color components
- described in `z` into colors.
-
- The 'colormodel' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['rgb', 'rgba', 'hsl', 'hsla']
-
- Returns
- -------
- Any
- """
- return self["colormodel"]
-
- @colormodel.setter
- def colormodel(self, val):
- self["colormodel"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Set the pixel's horizontal size.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Set the pixel's vertical size
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'color', 'name', 'text'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.image.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.image.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `z`, `color` and `colormodel`. Anything contained in
- tag `` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.image.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.image.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Set the image's x position.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Set the image's y position.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- A 2-dimensional array in which each element is an array of 3 or
- 4 numbers representing a color.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Array defining the higher bound for each color component. Note
- that the default value will depend on the colormodel. For the
- `rgb` colormodel, it is [255, 255, 255]. For the `rgba`
- colormodel, it is [255, 255, 255, 1]. For the `hsl` colormodel,
- it is [360, 100, 100]. For the `hsla` colormodel, it is [360,
- 100, 100, 1].
-
- The 'zmax' property is an info array that may be specified as:
-
- * a list or tuple of 4 elements where:
- (0) The 'zmax[0]' property is a number and may be specified as:
- - An int or float
- (1) The 'zmax[1]' property is a number and may be specified as:
- - An int or float
- (2) The 'zmax[2]' property is a number and may be specified as:
- - An int or float
- (3) The 'zmax[3]' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- list
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Array defining the lower bound for each color component. Note
- that the default value will depend on the colormodel. For the
- `rgb` colormodel, it is [0, 0, 0]. For the `rgba` colormodel,
- it is [0, 0, 0, 0]. For the `hsl` colormodel, it is [0, 0, 0].
- For the `hsla` colormodel, it is [0, 0, 0, 0].
-
- The 'zmin' property is an info array that may be specified as:
-
- * a list or tuple of 4 elements where:
- (0) The 'zmin[0]' property is a number and may be specified as:
- - An int or float
- (1) The 'zmin[1]' property is a number and may be specified as:
- - An int or float
- (2) The 'zmin[2]' property is a number and may be specified as:
- - An int or float
- (3) The 'zmin[3]' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- list
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- colormodel
- Color model used to map the numerical color components
- described in `z` into colors.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Set the pixel's horizontal size.
- dy
- Set the pixel's vertical size
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.image.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `z`, `color` and `colormodel`.
- Anything contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- stream
- :class:`plotly.graph_objects.image.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x0
- Set the image's x position.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- y0
- Set the image's y position.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- z
- A 2-dimensional array in which each element is an array
- of 3 or 4 numbers representing a color.
- zmax
- Array defining the higher bound for each color
- component. Note that the default value will depend on
- the colormodel. For the `rgb` colormodel, it is [255,
- 255, 255]. For the `rgba` colormodel, it is [255, 255,
- 255, 1]. For the `hsl` colormodel, it is [360, 100,
- 100]. For the `hsla` colormodel, it is [360, 100, 100,
- 1].
- zmin
- Array defining the lower bound for each color
- component. Note that the default value will depend on
- the colormodel. For the `rgb` colormodel, it is [0, 0,
- 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For
- the `hsl` colormodel, it is [0, 0, 0]. For the `hsla`
- colormodel, it is [0, 0, 0, 0].
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- colormodel=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- x0=None,
- xaxis=None,
- y0=None,
- yaxis=None,
- z=None,
- zmax=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Image object
-
- Display an image, i.e. data on a 2D regular raster. By default,
- when an image is displayed in a subplot, its y axis will be
- reversed (ie. `autorange: 'reversed'`), constrained to the
- domain (ie. `constrain: 'domain'`) and it will have the same
- scale as its x axis (ie. `scaleanchor: 'x,`) in order for
- pixels to be rendered as squares.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Image`
- colormodel
- Color model used to map the numerical color components
- described in `z` into colors.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Set the pixel's horizontal size.
- dy
- Set the pixel's vertical size
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.image.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `z`, `color` and `colormodel`.
- Anything contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- stream
- :class:`plotly.graph_objects.image.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x0
- Set the image's x position.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- y0
- Set the image's y position.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- z
- A 2-dimensional array in which each element is an array
- of 3 or 4 numbers representing a color.
- zmax
- Array defining the higher bound for each color
- component. Note that the default value will depend on
- the colormodel. For the `rgb` colormodel, it is [255,
- 255, 255]. For the `rgba` colormodel, it is [255, 255,
- 255, 1]. For the `hsl` colormodel, it is [360, 100,
- 100]. For the `hsla` colormodel, it is [360, 100, 100,
- 1].
- zmin
- Array defining the lower bound for each color
- component. Note that the default value will depend on
- the colormodel. For the `rgb` colormodel, it is [0, 0,
- 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For
- the `hsl` colormodel, it is [0, 0, 0]. For the `hsla`
- colormodel, it is [0, 0, 0, 0].
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Image
- """
- super(Image, self).__init__("image")
-
- # 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.Image
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Image`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import image as v_image
-
- # Initialize validators
- # ---------------------
- self._validators["colormodel"] = v_image.ColormodelValidator()
- self._validators["customdata"] = v_image.CustomdataValidator()
- self._validators["customdatasrc"] = v_image.CustomdatasrcValidator()
- self._validators["dx"] = v_image.DxValidator()
- self._validators["dy"] = v_image.DyValidator()
- self._validators["hoverinfo"] = v_image.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_image.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_image.HoverlabelValidator()
- self._validators["hovertemplate"] = v_image.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_image.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_image.HovertextValidator()
- self._validators["hovertextsrc"] = v_image.HovertextsrcValidator()
- self._validators["ids"] = v_image.IdsValidator()
- self._validators["idssrc"] = v_image.IdssrcValidator()
- self._validators["meta"] = v_image.MetaValidator()
- self._validators["metasrc"] = v_image.MetasrcValidator()
- self._validators["name"] = v_image.NameValidator()
- self._validators["opacity"] = v_image.OpacityValidator()
- self._validators["stream"] = v_image.StreamValidator()
- self._validators["text"] = v_image.TextValidator()
- self._validators["textsrc"] = v_image.TextsrcValidator()
- self._validators["uid"] = v_image.UidValidator()
- self._validators["uirevision"] = v_image.UirevisionValidator()
- self._validators["visible"] = v_image.VisibleValidator()
- self._validators["x0"] = v_image.X0Validator()
- self._validators["xaxis"] = v_image.XAxisValidator()
- self._validators["y0"] = v_image.Y0Validator()
- self._validators["yaxis"] = v_image.YAxisValidator()
- self._validators["z"] = v_image.ZValidator()
- self._validators["zmax"] = v_image.ZmaxValidator()
- self._validators["zmin"] = v_image.ZminValidator()
- self._validators["zsrc"] = v_image.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("colormodel", None)
- self["colormodel"] = colormodel if colormodel is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "image"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="image", val="image"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Histogram2dContour(_BaseTraceType):
-
- # autobinx
- # --------
- @property
- def autobinx(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobinx` is not needed. However, we accept
- `autobinx: true` or `false` and will update `xbins` accordingly
- before deleting `autobinx` from the trace.
-
- The 'autobinx' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobinx"]
-
- @autobinx.setter
- def autobinx(self, val):
- self["autobinx"] = val
-
- # autobiny
- # --------
- @property
- def autobiny(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobiny` is not needed. However, we accept
- `autobiny: true` or `false` and will update `ybins` accordingly
- before deleting `autobiny` from the trace.
-
- The 'autobiny' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobiny"]
-
- @autobiny.setter
- def autobiny(self, val):
- self["autobiny"] = val
-
- # 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
-
- # autocontour
- # -----------
- @property
- def autocontour(self):
- """
- Determines whether or not the contour level attributes are
- picked by an algorithm. If True, the number of contour levels
- can be set in `ncontours`. If False, set the contour level
- attributes in `contours`.
-
- The 'autocontour' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autocontour"]
-
- @autocontour.setter
- def autocontour(self, val):
- self["autocontour"] = val
-
- # bingroup
- # --------
- @property
- def bingroup(self):
- """
- Set the `xbingroup` and `ybingroup` default prefix For example,
- setting a `bingroup` of 1 on two histogram2d traces will make
- them their x-bins and y-bins match separately.
-
- The 'bingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["bingroup"]
-
- @bingroup.setter
- def bingroup(self, val):
- self["bingroup"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.histogram2dcontour.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.histogr
- am2dcontour.colorbar.Tickformatstop` instances
- or dicts with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.histogram2dcontour.colorbar.tickformatstopdef
- aults), sets the default property values to use
- for elements of
- histogram2dcontour.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.histogram2dcontour
- .colorbar.Title` instance or dict with
- compatible properties
- titlefont
- Deprecated: Please use
- histogram2dcontour.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
- histogram2dcontour.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # contours
- # --------
- @property
- def contours(self):
- """
- The 'contours' property is an instance of Contours
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.Contours`
- - A dict of string/value properties that will be passed
- to the Contours constructor
-
- Supported dict properties:
-
- coloring
- Determines the coloring method showing the
- contour values. If "fill", coloring is done
- evenly between each contour level If "heatmap",
- a heatmap gradient coloring is applied 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-language which is very similar
- to Python, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#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
- -------
- plotly.graph_objs.histogram2dcontour.Contours
- """
- return self["contours"]
-
- @contours.setter
- def contours(self, val):
- self["contours"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # histfunc
- # --------
- @property
- def histfunc(self):
- """
- Specifies the binning function used for this histogram trace.
- If "count", the histogram values are computed by counting the
- number of values lying inside each bin. If "sum", "avg", "min",
- "max", the histogram values are computed using the sum, the
- average, the minimum or the maximum of the values lying inside
- each bin respectively.
-
- The 'histfunc' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['count', 'sum', 'avg', 'min', 'max']
-
- Returns
- -------
- Any
- """
- return self["histfunc"]
-
- @histfunc.setter
- def histfunc(self, val):
- self["histfunc"] = val
-
- # histnorm
- # --------
- @property
- def histnorm(self):
- """
- Specifies the type of normalization used for this histogram
- trace. If "", the span of each bar corresponds to the number of
- occurrences (i.e. the number of data points lying inside the
- bins). If "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences with
- respect to the total number of sample points (here, the sum of
- all bin HEIGHTS equals 100% / 1). If "density", the span of
- each bar corresponds to the number of occurrences in a bin
- divided by the size of the bin interval (here, the sum of all
- bin AREAS equals the total number of sample points). If
- *probability density*, the area of each bar corresponds to the
- probability that an event will fall into the corresponding bin
- (here, the sum of all bin AREAS equals 1).
-
- The 'histnorm' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['', 'percent', 'probability', 'density', 'probability
- density']
-
- Returns
- -------
- Any
- """
- return self["histnorm"]
-
- @histnorm.setter
- def histnorm(self, val):
- self["histnorm"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variable `z` Anything contained in tag `` is displayed
- in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.histogram2dcontour.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- 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)
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- color
- Sets the aggregation data.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # nbinsx
- # ------
- @property
- def nbinsx(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `xbins.size` is provided.
-
- The 'nbinsx' 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["nbinsx"]
-
- @nbinsx.setter
- def nbinsx(self, val):
- self["nbinsx"] = val
-
- # nbinsy
- # ------
- @property
- def nbinsy(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `ybins.size` is provided.
-
- The 'nbinsy' 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["nbinsy"]
-
- @nbinsy.setter
- def nbinsy(self, val):
- self["nbinsy"] = val
-
- # ncontours
- # ---------
- @property
- def ncontours(self):
- """
- Sets the maximum number of contour levels. The actual number of
- contours will be chosen automatically to be less than or equal
- to the value of `ncontours`. Has an effect only if
- `autocontour` is True or if `contours.size` is missing.
-
- The 'ncontours' 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["ncontours"]
-
- @ncontours.setter
- def ncontours(self, val):
- self["ncontours"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.histogram2dcontour.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the sample data to be binned on the x axis.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xbingroup
- # ---------
- @property
- def xbingroup(self):
- """
- Set a group of histogram traces which will have compatible
- x-bin settings. Using `xbingroup`, histogram2d and
- histogram2dcontour traces (on axes of the same axis type) can
- have compatible x-bin settings. Note that the same `xbingroup`
- value can be used to set (1D) histogram `bingroup`
-
- The 'xbingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["xbingroup"]
-
- @xbingroup.setter
- def xbingroup(self, val):
- self["xbingroup"] = val
-
- # xbins
- # -----
- @property
- def xbins(self):
- """
- The 'xbins' property is an instance of XBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.XBins`
- - A dict of string/value properties that will be passed
- to the XBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the x axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each x axis bin. Default
- behavior: If `nbinsx` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsx` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1).
- start
- Sets the starting value for the x axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5.
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.XBins
- """
- return self["xbins"]
-
- @xbins.setter
- def xbins(self, val):
- self["xbins"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the sample data to be binned on the y axis.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ybingroup
- # ---------
- @property
- def ybingroup(self):
- """
- Set a group of histogram traces which will have compatible
- y-bin settings. Using `ybingroup`, histogram2d and
- histogram2dcontour traces (on axes of the same axis type) can
- have compatible y-bin settings. Note that the same `ybingroup`
- value can be used to set (1D) histogram `bingroup`
-
- The 'ybingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["ybingroup"]
-
- @ybingroup.setter
- def ybingroup(self, val):
- self["ybingroup"] = val
-
- # ybins
- # -----
- @property
- def ybins(self):
- """
- The 'ybins' property is an instance of YBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2dcontour.YBins`
- - A dict of string/value properties that will be passed
- to the YBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the y axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each y axis bin. Default
- behavior: If `nbinsy` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsy` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1).
- start
- Sets the starting value for the y axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5.
-
- Returns
- -------
- plotly.graph_objs.histogram2dcontour.YBins
- """
- return self["ybins"]
-
- @ybins.setter
- def ybins(self, val):
- self["ybins"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the aggregation data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zhoverformat
- # ------------
- @property
- def zhoverformat(self):
- """
- Sets the hover text formatting rule using d3 formatting mini-
- languages which are very similar to those in Python. See:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- The 'zhoverformat' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["zhoverformat"]
-
- @zhoverformat.setter
- def zhoverformat(self, val):
- self["zhoverformat"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- bingroup
- Set the `xbingroup` and `ybingroup` default prefix For
- example, setting a `bingroup` of 1 on two histogram2d
- traces will make them their x-bins and y-bins match
- separately.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.histogram2dcontour.ColorBa
- r` 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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contours
- :class:`plotly.graph_objects.histogram2dcontour.Contour
- s` instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram2dcontour.Hoverla
- bel` instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `z` Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.histogram2dcontour.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.histogram2dcontour.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.histogram2dcontour.Stream`
- instance or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbingroup
- Set a group of histogram traces which will have
- compatible x-bin settings. Using `xbingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible x-bin settings.
- Note that the same `xbingroup` value can be used to set
- (1D) histogram `bingroup`
- xbins
- :class:`plotly.graph_objects.histogram2dcontour.XBins`
- instance or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybingroup
- Set a group of histogram traces which will have
- compatible y-bin settings. Using `ybingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible y-bin settings.
- Note that the same `ybingroup` value can be used to set
- (1D) histogram `bingroup`
- ybins
- :class:`plotly.graph_objects.histogram2dcontour.YBins`
- instance or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the aggregation data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autobinx=None,
- autobiny=None,
- autocolorscale=None,
- autocontour=None,
- bingroup=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- contours=None,
- customdata=None,
- customdatasrc=None,
- histfunc=None,
- histnorm=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- nbinsx=None,
- nbinsy=None,
- ncontours=None,
- opacity=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xaxis=None,
- xbingroup=None,
- xbins=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- yaxis=None,
- ybingroup=None,
- ybins=None,
- ycalendar=None,
- ysrc=None,
- z=None,
- zauto=None,
- zhoverformat=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Histogram2dContour object
-
- The sample data from which statistics are computed is set in
- `x` and `y` (where `x` and `y` represent marginal
- distributions, binning is set in `xbins` and `ybins` in this
- case) or `z` (where `z` represent the 2D distribution and
- binning set, binning is set by `x` and `y` in this case). The
- resulting distribution is visualized as a contour plot.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of
- :class:`plotly.graph_objs.Histogram2dContour`
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- bingroup
- Set the `xbingroup` and `ybingroup` default prefix For
- example, setting a `bingroup` of 1 on two histogram2d
- traces will make them their x-bins and y-bins match
- separately.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.histogram2dcontour.ColorBa
- r` 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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contours
- :class:`plotly.graph_objects.histogram2dcontour.Contour
- s` instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram2dcontour.Hoverla
- bel` instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `z` Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.histogram2dcontour.Line`
- instance or dict with compatible properties
- marker
- :class:`plotly.graph_objects.histogram2dcontour.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.histogram2dcontour.Stream`
- instance or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbingroup
- Set a group of histogram traces which will have
- compatible x-bin settings. Using `xbingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible x-bin settings.
- Note that the same `xbingroup` value can be used to set
- (1D) histogram `bingroup`
- xbins
- :class:`plotly.graph_objects.histogram2dcontour.XBins`
- instance or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybingroup
- Set a group of histogram traces which will have
- compatible y-bin settings. Using `ybingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible y-bin settings.
- Note that the same `ybingroup` value can be used to set
- (1D) histogram `bingroup`
- ybins
- :class:`plotly.graph_objects.histogram2dcontour.YBins`
- instance or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the aggregation data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Histogram2dContour
- """
- super(Histogram2dContour, self).__init__("histogram2dcontour")
-
- # 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.Histogram2dContour
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Histogram2dContour`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import histogram2dcontour as v_histogram2dcontour
-
- # Initialize validators
- # ---------------------
- self._validators["autobinx"] = v_histogram2dcontour.AutobinxValidator()
- self._validators["autobiny"] = v_histogram2dcontour.AutobinyValidator()
- self._validators[
- "autocolorscale"
- ] = v_histogram2dcontour.AutocolorscaleValidator()
- self._validators["autocontour"] = v_histogram2dcontour.AutocontourValidator()
- self._validators["bingroup"] = v_histogram2dcontour.BingroupValidator()
- self._validators["coloraxis"] = v_histogram2dcontour.ColoraxisValidator()
- self._validators["colorbar"] = v_histogram2dcontour.ColorBarValidator()
- self._validators["colorscale"] = v_histogram2dcontour.ColorscaleValidator()
- self._validators["contours"] = v_histogram2dcontour.ContoursValidator()
- self._validators["customdata"] = v_histogram2dcontour.CustomdataValidator()
- self._validators[
- "customdatasrc"
- ] = v_histogram2dcontour.CustomdatasrcValidator()
- self._validators["histfunc"] = v_histogram2dcontour.HistfuncValidator()
- self._validators["histnorm"] = v_histogram2dcontour.HistnormValidator()
- self._validators["hoverinfo"] = v_histogram2dcontour.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_histogram2dcontour.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_histogram2dcontour.HoverlabelValidator()
- self._validators[
- "hovertemplate"
- ] = v_histogram2dcontour.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_histogram2dcontour.HovertemplatesrcValidator()
- self._validators["ids"] = v_histogram2dcontour.IdsValidator()
- self._validators["idssrc"] = v_histogram2dcontour.IdssrcValidator()
- self._validators["legendgroup"] = v_histogram2dcontour.LegendgroupValidator()
- self._validators["line"] = v_histogram2dcontour.LineValidator()
- self._validators["marker"] = v_histogram2dcontour.MarkerValidator()
- self._validators["meta"] = v_histogram2dcontour.MetaValidator()
- self._validators["metasrc"] = v_histogram2dcontour.MetasrcValidator()
- self._validators["name"] = v_histogram2dcontour.NameValidator()
- self._validators["nbinsx"] = v_histogram2dcontour.NbinsxValidator()
- self._validators["nbinsy"] = v_histogram2dcontour.NbinsyValidator()
- self._validators["ncontours"] = v_histogram2dcontour.NcontoursValidator()
- self._validators["opacity"] = v_histogram2dcontour.OpacityValidator()
- self._validators["reversescale"] = v_histogram2dcontour.ReversescaleValidator()
- self._validators["showlegend"] = v_histogram2dcontour.ShowlegendValidator()
- self._validators["showscale"] = v_histogram2dcontour.ShowscaleValidator()
- self._validators["stream"] = v_histogram2dcontour.StreamValidator()
- self._validators["uid"] = v_histogram2dcontour.UidValidator()
- self._validators["uirevision"] = v_histogram2dcontour.UirevisionValidator()
- self._validators["visible"] = v_histogram2dcontour.VisibleValidator()
- self._validators["x"] = v_histogram2dcontour.XValidator()
- self._validators["xaxis"] = v_histogram2dcontour.XAxisValidator()
- self._validators["xbingroup"] = v_histogram2dcontour.XbingroupValidator()
- self._validators["xbins"] = v_histogram2dcontour.XBinsValidator()
- self._validators["xcalendar"] = v_histogram2dcontour.XcalendarValidator()
- self._validators["xsrc"] = v_histogram2dcontour.XsrcValidator()
- self._validators["y"] = v_histogram2dcontour.YValidator()
- self._validators["yaxis"] = v_histogram2dcontour.YAxisValidator()
- self._validators["ybingroup"] = v_histogram2dcontour.YbingroupValidator()
- self._validators["ybins"] = v_histogram2dcontour.YBinsValidator()
- self._validators["ycalendar"] = v_histogram2dcontour.YcalendarValidator()
- self._validators["ysrc"] = v_histogram2dcontour.YsrcValidator()
- self._validators["z"] = v_histogram2dcontour.ZValidator()
- self._validators["zauto"] = v_histogram2dcontour.ZautoValidator()
- self._validators["zhoverformat"] = v_histogram2dcontour.ZhoverformatValidator()
- self._validators["zmax"] = v_histogram2dcontour.ZmaxValidator()
- self._validators["zmid"] = v_histogram2dcontour.ZmidValidator()
- self._validators["zmin"] = v_histogram2dcontour.ZminValidator()
- self._validators["zsrc"] = v_histogram2dcontour.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autobinx", None)
- self["autobinx"] = autobinx if autobinx is not None else _v
- _v = arg.pop("autobiny", None)
- self["autobiny"] = autobiny if autobiny is not None else _v
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("autocontour", None)
- self["autocontour"] = autocontour if autocontour is not None else _v
- _v = arg.pop("bingroup", None)
- self["bingroup"] = bingroup if bingroup is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("contours", None)
- self["contours"] = contours if contours is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("histfunc", None)
- self["histfunc"] = histfunc if histfunc is not None else _v
- _v = arg.pop("histnorm", None)
- self["histnorm"] = histnorm if histnorm is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("nbinsx", None)
- self["nbinsx"] = nbinsx if nbinsx is not None else _v
- _v = arg.pop("nbinsy", None)
- self["nbinsy"] = nbinsy if nbinsy is not None else _v
- _v = arg.pop("ncontours", None)
- self["ncontours"] = ncontours if ncontours is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xbingroup", None)
- self["xbingroup"] = xbingroup if xbingroup is not None else _v
- _v = arg.pop("xbins", None)
- self["xbins"] = xbins if xbins is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ybingroup", None)
- self["ybingroup"] = ybingroup if ybingroup is not None else _v
- _v = arg.pop("ybins", None)
- self["ybins"] = ybins if ybins is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zhoverformat", None)
- self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "histogram2dcontour"
- self._validators["type"] = LiteralValidator(
- plotly_name="type",
- parent_name="histogram2dcontour",
- val="histogram2dcontour",
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Histogram2d(_BaseTraceType):
-
- # autobinx
- # --------
- @property
- def autobinx(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobinx` is not needed. However, we accept
- `autobinx: true` or `false` and will update `xbins` accordingly
- before deleting `autobinx` from the trace.
-
- The 'autobinx' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobinx"]
-
- @autobinx.setter
- def autobinx(self, val):
- self["autobinx"] = val
-
- # autobiny
- # --------
- @property
- def autobiny(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobiny` is not needed. However, we accept
- `autobiny: true` or `false` and will update `ybins` accordingly
- before deleting `autobiny` from the trace.
-
- The 'autobiny' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobiny"]
-
- @autobiny.setter
- def autobiny(self, val):
- self["autobiny"] = val
-
- # 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
-
- # bingroup
- # --------
- @property
- def bingroup(self):
- """
- Set the `xbingroup` and `ybingroup` default prefix For example,
- setting a `bingroup` of 1 on two histogram2d traces will make
- them their x-bins and y-bins match separately.
-
- The 'bingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["bingroup"]
-
- @bingroup.setter
- def bingroup(self, val):
- self["bingroup"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.histogram2d.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.histogr
- am2d.colorbar.Tickformatstop` instances or
- dicts with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.histogram2d.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of
- histogram2d.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.histogram2d.colorb
- ar.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- histogram2d.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
- histogram2d.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.histogram2d.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # histfunc
- # --------
- @property
- def histfunc(self):
- """
- Specifies the binning function used for this histogram trace.
- If "count", the histogram values are computed by counting the
- number of values lying inside each bin. If "sum", "avg", "min",
- "max", the histogram values are computed using the sum, the
- average, the minimum or the maximum of the values lying inside
- each bin respectively.
-
- The 'histfunc' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['count', 'sum', 'avg', 'min', 'max']
-
- Returns
- -------
- Any
- """
- return self["histfunc"]
-
- @histfunc.setter
- def histfunc(self, val):
- self["histfunc"] = val
-
- # histnorm
- # --------
- @property
- def histnorm(self):
- """
- Specifies the type of normalization used for this histogram
- trace. If "", the span of each bar corresponds to the number of
- occurrences (i.e. the number of data points lying inside the
- bins). If "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences with
- respect to the total number of sample points (here, the sum of
- all bin HEIGHTS equals 100% / 1). If "density", the span of
- each bar corresponds to the number of occurrences in a bin
- divided by the size of the bin interval (here, the sum of all
- bin AREAS equals the total number of sample points). If
- *probability density*, the area of each bar corresponds to the
- probability that an event will fall into the corresponding bin
- (here, the sum of all bin AREAS equals 1).
-
- The 'histnorm' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['', 'percent', 'probability', 'density', 'probability
- density']
-
- Returns
- -------
- Any
- """
- return self["histnorm"]
-
- @histnorm.setter
- def histnorm(self, val):
- self["histnorm"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.histogram2d.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variable `z` Anything contained in tag `` is displayed
- in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2d.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- color
- Sets the aggregation data.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
-
- Returns
- -------
- plotly.graph_objs.histogram2d.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # nbinsx
- # ------
- @property
- def nbinsx(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `xbins.size` is provided.
-
- The 'nbinsx' 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["nbinsx"]
-
- @nbinsx.setter
- def nbinsx(self, val):
- self["nbinsx"] = val
-
- # nbinsy
- # ------
- @property
- def nbinsy(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `ybins.size` is provided.
-
- The 'nbinsy' 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["nbinsy"]
-
- @nbinsy.setter
- def nbinsy(self, val):
- self["nbinsy"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2d.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.histogram2d.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the sample data to be binned on the x axis.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xbingroup
- # ---------
- @property
- def xbingroup(self):
- """
- Set a group of histogram traces which will have compatible
- x-bin settings. Using `xbingroup`, histogram2d and
- histogram2dcontour traces (on axes of the same axis type) can
- have compatible x-bin settings. Note that the same `xbingroup`
- value can be used to set (1D) histogram `bingroup`
-
- The 'xbingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["xbingroup"]
-
- @xbingroup.setter
- def xbingroup(self, val):
- self["xbingroup"] = val
-
- # xbins
- # -----
- @property
- def xbins(self):
- """
- The 'xbins' property is an instance of XBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2d.XBins`
- - A dict of string/value properties that will be passed
- to the XBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the x axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each x axis bin. Default
- behavior: If `nbinsx` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsx` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1).
- start
- Sets the starting value for the x axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5.
-
- Returns
- -------
- plotly.graph_objs.histogram2d.XBins
- """
- return self["xbins"]
-
- @xbins.setter
- def xbins(self, val):
- self["xbins"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xgap
- # ----
- @property
- def xgap(self):
- """
- Sets the horizontal gap (in pixels) between bricks.
-
- The 'xgap' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["xgap"]
-
- @xgap.setter
- def xgap(self, val):
- self["xgap"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the sample data to be binned on the y axis.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ybingroup
- # ---------
- @property
- def ybingroup(self):
- """
- Set a group of histogram traces which will have compatible
- y-bin settings. Using `ybingroup`, histogram2d and
- histogram2dcontour traces (on axes of the same axis type) can
- have compatible y-bin settings. Note that the same `ybingroup`
- value can be used to set (1D) histogram `bingroup`
-
- The 'ybingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["ybingroup"]
-
- @ybingroup.setter
- def ybingroup(self, val):
- self["ybingroup"] = val
-
- # ybins
- # -----
- @property
- def ybins(self):
- """
- The 'ybins' property is an instance of YBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram2d.YBins`
- - A dict of string/value properties that will be passed
- to the YBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the y axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each y axis bin. Default
- behavior: If `nbinsy` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsy` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1).
- start
- Sets the starting value for the y axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5.
-
- Returns
- -------
- plotly.graph_objs.histogram2d.YBins
- """
- return self["ybins"]
-
- @ybins.setter
- def ybins(self, val):
- self["ybins"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ygap
- # ----
- @property
- def ygap(self):
- """
- Sets the vertical gap (in pixels) between bricks.
-
- The 'ygap' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["ygap"]
-
- @ygap.setter
- def ygap(self, val):
- self["ygap"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the aggregation data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zhoverformat
- # ------------
- @property
- def zhoverformat(self):
- """
- Sets the hover text formatting rule using d3 formatting mini-
- languages which are very similar to those in Python. See:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- The 'zhoverformat' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["zhoverformat"]
-
- @zhoverformat.setter
- def zhoverformat(self, val):
- self["zhoverformat"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsmooth
- # -------
- @property
- def zsmooth(self):
- """
- Picks a smoothing algorithm use to smooth `z` data.
-
- The 'zsmooth' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['fast', 'best', False]
-
- Returns
- -------
- Any
- """
- return self["zsmooth"]
-
- @zsmooth.setter
- def zsmooth(self, val):
- self["zsmooth"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- 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.
- bingroup
- Set the `xbingroup` and `ybingroup` default prefix For
- example, setting a `bingroup` of 1 on two histogram2d
- traces will make them their x-bins and y-bins match
- separately.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.histogram2d.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram2d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `z` Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.histogram2d.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.histogram2d.Stream`
- instance or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbingroup
- Set a group of histogram traces which will have
- compatible x-bin settings. Using `xbingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible x-bin settings.
- Note that the same `xbingroup` value can be used to set
- (1D) histogram `bingroup`
- xbins
- :class:`plotly.graph_objects.histogram2d.XBins`
- instance or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xgap
- Sets the horizontal gap (in pixels) between bricks.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybingroup
- Set a group of histogram traces which will have
- compatible y-bin settings. Using `ybingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible y-bin settings.
- Note that the same `ybingroup` value can be used to set
- (1D) histogram `bingroup`
- ybins
- :class:`plotly.graph_objects.histogram2d.YBins`
- instance or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ygap
- Sets the vertical gap (in pixels) between bricks.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the aggregation data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsmooth
- Picks a smoothing algorithm use to smooth `z` data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autobinx=None,
- autobiny=None,
- autocolorscale=None,
- bingroup=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- histfunc=None,
- histnorm=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- nbinsx=None,
- nbinsy=None,
- opacity=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xaxis=None,
- xbingroup=None,
- xbins=None,
- xcalendar=None,
- xgap=None,
- xsrc=None,
- y=None,
- yaxis=None,
- ybingroup=None,
- ybins=None,
- ycalendar=None,
- ygap=None,
- ysrc=None,
- z=None,
- zauto=None,
- zhoverformat=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsmooth=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Histogram2d object
-
- The sample data from which statistics are computed is set in
- `x` and `y` (where `x` and `y` represent marginal
- distributions, binning is set in `xbins` and `ybins` in this
- case) or `z` (where `z` represent the 2D distribution and
- binning set, binning is set by `x` and `y` in this case). The
- resulting distribution is visualized as a heatmap.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Histogram2d`
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- 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.
- bingroup
- Set the `xbingroup` and `ybingroup` default prefix For
- example, setting a `bingroup` of 1 on two histogram2d
- traces will make them their x-bins and y-bins match
- separately.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.histogram2d.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram2d.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `z` Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.histogram2d.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.histogram2d.Stream`
- instance or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbingroup
- Set a group of histogram traces which will have
- compatible x-bin settings. Using `xbingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible x-bin settings.
- Note that the same `xbingroup` value can be used to set
- (1D) histogram `bingroup`
- xbins
- :class:`plotly.graph_objects.histogram2d.XBins`
- instance or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xgap
- Sets the horizontal gap (in pixels) between bricks.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybingroup
- Set a group of histogram traces which will have
- compatible y-bin settings. Using `ybingroup`,
- histogram2d and histogram2dcontour traces (on axes of
- the same axis type) can have compatible y-bin settings.
- Note that the same `ybingroup` value can be used to set
- (1D) histogram `bingroup`
- ybins
- :class:`plotly.graph_objects.histogram2d.YBins`
- instance or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ygap
- Sets the vertical gap (in pixels) between bricks.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the aggregation data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsmooth
- Picks a smoothing algorithm use to smooth `z` data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Histogram2d
- """
- super(Histogram2d, self).__init__("histogram2d")
-
- # 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.Histogram2d
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Histogram2d`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import histogram2d as v_histogram2d
-
- # Initialize validators
- # ---------------------
- self._validators["autobinx"] = v_histogram2d.AutobinxValidator()
- self._validators["autobiny"] = v_histogram2d.AutobinyValidator()
- self._validators["autocolorscale"] = v_histogram2d.AutocolorscaleValidator()
- self._validators["bingroup"] = v_histogram2d.BingroupValidator()
- self._validators["coloraxis"] = v_histogram2d.ColoraxisValidator()
- self._validators["colorbar"] = v_histogram2d.ColorBarValidator()
- self._validators["colorscale"] = v_histogram2d.ColorscaleValidator()
- self._validators["customdata"] = v_histogram2d.CustomdataValidator()
- self._validators["customdatasrc"] = v_histogram2d.CustomdatasrcValidator()
- self._validators["histfunc"] = v_histogram2d.HistfuncValidator()
- self._validators["histnorm"] = v_histogram2d.HistnormValidator()
- self._validators["hoverinfo"] = v_histogram2d.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_histogram2d.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_histogram2d.HoverlabelValidator()
- self._validators["hovertemplate"] = v_histogram2d.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_histogram2d.HovertemplatesrcValidator()
- self._validators["ids"] = v_histogram2d.IdsValidator()
- self._validators["idssrc"] = v_histogram2d.IdssrcValidator()
- self._validators["legendgroup"] = v_histogram2d.LegendgroupValidator()
- self._validators["marker"] = v_histogram2d.MarkerValidator()
- self._validators["meta"] = v_histogram2d.MetaValidator()
- self._validators["metasrc"] = v_histogram2d.MetasrcValidator()
- self._validators["name"] = v_histogram2d.NameValidator()
- self._validators["nbinsx"] = v_histogram2d.NbinsxValidator()
- self._validators["nbinsy"] = v_histogram2d.NbinsyValidator()
- self._validators["opacity"] = v_histogram2d.OpacityValidator()
- self._validators["reversescale"] = v_histogram2d.ReversescaleValidator()
- self._validators["showlegend"] = v_histogram2d.ShowlegendValidator()
- self._validators["showscale"] = v_histogram2d.ShowscaleValidator()
- self._validators["stream"] = v_histogram2d.StreamValidator()
- self._validators["uid"] = v_histogram2d.UidValidator()
- self._validators["uirevision"] = v_histogram2d.UirevisionValidator()
- self._validators["visible"] = v_histogram2d.VisibleValidator()
- self._validators["x"] = v_histogram2d.XValidator()
- self._validators["xaxis"] = v_histogram2d.XAxisValidator()
- self._validators["xbingroup"] = v_histogram2d.XbingroupValidator()
- self._validators["xbins"] = v_histogram2d.XBinsValidator()
- self._validators["xcalendar"] = v_histogram2d.XcalendarValidator()
- self._validators["xgap"] = v_histogram2d.XgapValidator()
- self._validators["xsrc"] = v_histogram2d.XsrcValidator()
- self._validators["y"] = v_histogram2d.YValidator()
- self._validators["yaxis"] = v_histogram2d.YAxisValidator()
- self._validators["ybingroup"] = v_histogram2d.YbingroupValidator()
- self._validators["ybins"] = v_histogram2d.YBinsValidator()
- self._validators["ycalendar"] = v_histogram2d.YcalendarValidator()
- self._validators["ygap"] = v_histogram2d.YgapValidator()
- self._validators["ysrc"] = v_histogram2d.YsrcValidator()
- self._validators["z"] = v_histogram2d.ZValidator()
- self._validators["zauto"] = v_histogram2d.ZautoValidator()
- self._validators["zhoverformat"] = v_histogram2d.ZhoverformatValidator()
- self._validators["zmax"] = v_histogram2d.ZmaxValidator()
- self._validators["zmid"] = v_histogram2d.ZmidValidator()
- self._validators["zmin"] = v_histogram2d.ZminValidator()
- self._validators["zsmooth"] = v_histogram2d.ZsmoothValidator()
- self._validators["zsrc"] = v_histogram2d.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autobinx", None)
- self["autobinx"] = autobinx if autobinx is not None else _v
- _v = arg.pop("autobiny", None)
- self["autobiny"] = autobiny if autobiny is not None else _v
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("bingroup", None)
- self["bingroup"] = bingroup if bingroup is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("histfunc", None)
- self["histfunc"] = histfunc if histfunc is not None else _v
- _v = arg.pop("histnorm", None)
- self["histnorm"] = histnorm if histnorm is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("nbinsx", None)
- self["nbinsx"] = nbinsx if nbinsx is not None else _v
- _v = arg.pop("nbinsy", None)
- self["nbinsy"] = nbinsy if nbinsy is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xbingroup", None)
- self["xbingroup"] = xbingroup if xbingroup is not None else _v
- _v = arg.pop("xbins", None)
- self["xbins"] = xbins if xbins is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xgap", None)
- self["xgap"] = xgap if xgap is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ybingroup", None)
- self["ybingroup"] = ybingroup if ybingroup is not None else _v
- _v = arg.pop("ybins", None)
- self["ybins"] = ybins if ybins is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ygap", None)
- self["ygap"] = ygap if ygap is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zhoverformat", None)
- self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsmooth", None)
- self["zsmooth"] = zsmooth if zsmooth is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "histogram2d"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="histogram2d", val="histogram2d"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Histogram(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # autobinx
- # --------
- @property
- def autobinx(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobinx` is not needed. However, we accept
- `autobinx: true` or `false` and will update `xbins` accordingly
- before deleting `autobinx` from the trace.
-
- The 'autobinx' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobinx"]
-
- @autobinx.setter
- def autobinx(self, val):
- self["autobinx"] = val
-
- # autobiny
- # --------
- @property
- def autobiny(self):
- """
- Obsolete: since v1.42 each bin attribute is auto-determined
- separately and `autobiny` is not needed. However, we accept
- `autobiny: true` or `false` and will update `ybins` accordingly
- before deleting `autobiny` from the trace.
-
- The 'autobiny' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autobiny"]
-
- @autobiny.setter
- def autobiny(self, val):
- self["autobiny"] = val
-
- # bingroup
- # --------
- @property
- def bingroup(self):
- """
- Set a group of histogram traces which will have compatible bin
- settings. Note that traces on the same subplot and with the
- same "orientation" under `barmode` "stack", "relative" and
- "group" are forced into the same bingroup, Using `bingroup`,
- traces under `barmode` "overlay" and on different axes (of the
- same axis type) can have compatible bin settings. Note that
- histogram and histogram2d* trace can share the same `bingroup`
-
- The 'bingroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["bingroup"]
-
- @bingroup.setter
- def bingroup(self, val):
- self["bingroup"] = val
-
- # cumulative
- # ----------
- @property
- def cumulative(self):
- """
- The 'cumulative' property is an instance of Cumulative
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Cumulative`
- - A dict of string/value properties that will be passed
- to the Cumulative constructor
-
- Supported dict properties:
-
- currentbin
- Only applies if cumulative is enabled. Sets
- whether the current bin is included, excluded,
- or has half of its value included in the
- current cumulative value. "include" is the
- default for compatibility with various other
- tools, however it introduces a half-bin bias to
- the results. "exclude" makes the opposite half-
- bin bias, and "half" removes it.
- direction
- Only applies if cumulative is enabled. If
- "increasing" (default) we sum all prior bins,
- so the result increases from left to right. If
- "decreasing" we sum later bins so the result
- decreases from left to right.
- enabled
- If true, display the cumulative distribution by
- summing the binned values. Use the `direction`
- and `centralbin` attributes to tune the
- accumulation method. Note: in this mode, the
- "density" `histnorm` settings behave the same
- as their equivalents without "density": "" and
- "density" both rise to the number of data
- points, and "probability" and *probability
- density* both rise to the number of sample
- points.
-
- Returns
- -------
- plotly.graph_objs.histogram.Cumulative
- """
- return self["cumulative"]
-
- @cumulative.setter
- def cumulative(self, val):
- self["cumulative"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # error_x
- # -------
- @property
- def error_x(self):
- """
- The 'error_x' property is an instance of ErrorX
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.ErrorX`
- - A dict of string/value properties that will be passed
- to the ErrorX constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_ystyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.histogram.ErrorX
- """
- return self["error_x"]
-
- @error_x.setter
- def error_x(self, val):
- self["error_x"] = val
-
- # error_y
- # -------
- @property
- def error_y(self):
- """
- The 'error_y' property is an instance of ErrorY
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.ErrorY`
- - A dict of string/value properties that will be passed
- to the ErrorY constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.histogram.ErrorY
- """
- return self["error_y"]
-
- @error_y.setter
- def error_y(self, val):
- self["error_y"] = val
-
- # histfunc
- # --------
- @property
- def histfunc(self):
- """
- Specifies the binning function used for this histogram trace.
- If "count", the histogram values are computed by counting the
- number of values lying inside each bin. If "sum", "avg", "min",
- "max", the histogram values are computed using the sum, the
- average, the minimum or the maximum of the values lying inside
- each bin respectively.
-
- The 'histfunc' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['count', 'sum', 'avg', 'min', 'max']
-
- Returns
- -------
- Any
- """
- return self["histfunc"]
-
- @histfunc.setter
- def histfunc(self, val):
- self["histfunc"] = val
-
- # histnorm
- # --------
- @property
- def histnorm(self):
- """
- Specifies the type of normalization used for this histogram
- trace. If "", the span of each bar corresponds to the number of
- occurrences (i.e. the number of data points lying inside the
- bins). If "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences with
- respect to the total number of sample points (here, the sum of
- all bin HEIGHTS equals 100% / 1). If "density", the span of
- each bar corresponds to the number of occurrences in a bin
- divided by the size of the bin interval (here, the sum of all
- bin AREAS equals the total number of sample points). If
- *probability density*, the area of each bar corresponds to the
- probability that an event will fall into the corresponding bin
- (here, the sum of all bin AREAS equals 1).
-
- The 'histnorm' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['', 'percent', 'probability', 'density', 'probability
- density']
-
- Returns
- -------
- Any
- """
- return self["histnorm"]
-
- @histnorm.setter
- def histnorm(self, val):
- self["histnorm"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.histogram.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variable `binNumber` Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.histogram.marker.C
- olorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.histogram.marker.L
- ine` instance or dict with compatible
- properties
- opacity
- Sets the opacity of the bars.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.histogram.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # nbinsx
- # ------
- @property
- def nbinsx(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `xbins.size` is provided.
-
- The 'nbinsx' 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["nbinsx"]
-
- @nbinsx.setter
- def nbinsx(self, val):
- self["nbinsx"] = val
-
- # nbinsy
- # ------
- @property
- def nbinsy(self):
- """
- Specifies the maximum number of desired bins. This value will
- be used in an algorithm that will decide the optimal bin size
- such that the histogram best visualizes the distribution of the
- data. Ignored if `ybins.size` is provided.
-
- The 'nbinsy' 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["nbinsy"]
-
- @nbinsy.setter
- def nbinsy(self, val):
- self["nbinsy"] = val
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the bars. With "v" ("h"), the value of
- the each bar spans along the vertical (horizontal).
-
- 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.histogram.selected
- .Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.histogram.selected
- .Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.histogram.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.histogram.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets hover text elements associated with each bar. If a single
- string, the same string appears over all bars. If an array of
- string, the items are mapped in order to the this trace's
- coordinates.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.histogram.unselect
- ed.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.histogram.unselect
- ed.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.histogram.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the sample data to be binned on the x axis.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xbins
- # -----
- @property
- def xbins(self):
- """
- The 'xbins' property is an instance of XBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.XBins`
- - A dict of string/value properties that will be passed
- to the XBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the x axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each x axis bin. Default
- behavior: If `nbinsx` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsx` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1). If multiple non-overlaying histograms
- share a subplot, the first explicit `size` is
- used and all others discarded. If no `size` is
- provided,the sample data from all traces is
- combined to determine `size` as described
- above.
- start
- Sets the starting value for the x axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5. If multiple non-
- overlaying histograms share a subplot, the
- first explicit `start` is used exactly and all
- others are shifted down (if necessary) to
- differ from that one by an integer number of
- bins.
-
- Returns
- -------
- plotly.graph_objs.histogram.XBins
- """
- return self["xbins"]
-
- @xbins.setter
- def xbins(self, val):
- self["xbins"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the sample data to be binned on the y axis.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ybins
- # -----
- @property
- def ybins(self):
- """
- The 'ybins' property is an instance of YBins
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.histogram.YBins`
- - A dict of string/value properties that will be passed
- to the YBins constructor
-
- Supported dict properties:
-
- end
- Sets the end value for the y axis bins. The
- last bin may not end exactly at this value, we
- increment the bin edge by `size` from `start`
- until we reach or exceed `end`. Defaults to the
- maximum data value. Like `start`, for dates use
- a date string, and for category data `end` is
- based on the category serial numbers.
- size
- Sets the size of each y axis bin. Default
- behavior: If `nbinsy` is 0 or omitted, we
- choose a nice round bin size such that the
- number of bins is about the same as the typical
- number of samples in each bin. If `nbinsy` is
- provided, we choose a nice round bin size
- giving no more than that many bins. For date
- data, use milliseconds or "M" for months, as
- in `axis.dtick`. For category data, the number
- of categories to bin together (always defaults
- to 1). If multiple non-overlaying histograms
- share a subplot, the first explicit `size` is
- used and all others discarded. If no `size` is
- provided,the sample data from all traces is
- combined to determine `size` as described
- above.
- start
- Sets the starting value for the y axis bins.
- Defaults to the minimum data value, shifted
- down if necessary to make nice round values and
- to remove ambiguous bin edges. For example, if
- most of the data is integers we shift the bin
- edges 0.5 down, so a `size` of 5 would have a
- default `start` of -0.5, so it is clear that
- 0-4 are in the first bin, 5-9 in the second,
- but continuous data gets a start of 0 and bins
- [0,5), [5,10) etc. Dates behave similarly, and
- `start` should be a date string. For category
- data, `start` is based on the category serial
- numbers, and defaults to -0.5. If multiple non-
- overlaying histograms share a subplot, the
- first explicit `start` is used exactly and all
- others are shifted down (if necessary) to
- differ from that one by an integer number of
- bins.
-
- Returns
- -------
- plotly.graph_objs.histogram.YBins
- """
- return self["ybins"]
-
- @ybins.setter
- def ybins(self, val):
- self["ybins"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- bingroup
- Set a group of histogram traces which will have
- compatible bin settings. Note that traces on the same
- subplot and with the same "orientation" under `barmode`
- "stack", "relative" and "group" are forced into the
- same bingroup, Using `bingroup`, traces under `barmode`
- "overlay" and on different axes (of the same axis type)
- can have compatible bin settings. Note that histogram
- and histogram2d* trace can share the same `bingroup`
- cumulative
- :class:`plotly.graph_objects.histogram.Cumulative`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- error_x
- :class:`plotly.graph_objects.histogram.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.histogram.ErrorY` instance
- or dict with compatible properties
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `binNumber` Anything contained
- in tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.histogram.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- selected
- :class:`plotly.graph_objects.histogram.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.histogram.Stream` instance
- or dict with compatible properties
- text
- Sets hover text elements associated with each bar. If a
- single string, the same string appears over all bars.
- If an array of string, the items are mapped in order to
- the this trace's coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.histogram.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbins
- :class:`plotly.graph_objects.histogram.XBins` instance
- or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybins
- :class:`plotly.graph_objects.histogram.YBins` instance
- or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- autobinx=None,
- autobiny=None,
- bingroup=None,
- cumulative=None,
- customdata=None,
- customdatasrc=None,
- error_x=None,
- error_y=None,
- histfunc=None,
- histnorm=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- nbinsx=None,
- nbinsy=None,
- offsetgroup=None,
- opacity=None,
- orientation=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- x=None,
- xaxis=None,
- xbins=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- yaxis=None,
- ybins=None,
- ycalendar=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Histogram object
-
- The sample data from which statistics are computed is set in
- `x` for vertically spanning histograms and in `y` for
- horizontally spanning histograms. Binning options are set
- `xbins` and `ybins` respectively if no aggregation data is
- provided.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Histogram`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- autobinx
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobinx` is not needed.
- However, we accept `autobinx: true` or `false` and will
- update `xbins` accordingly before deleting `autobinx`
- from the trace.
- autobiny
- Obsolete: since v1.42 each bin attribute is auto-
- determined separately and `autobiny` is not needed.
- However, we accept `autobiny: true` or `false` and will
- update `ybins` accordingly before deleting `autobiny`
- from the trace.
- bingroup
- Set a group of histogram traces which will have
- compatible bin settings. Note that traces on the same
- subplot and with the same "orientation" under `barmode`
- "stack", "relative" and "group" are forced into the
- same bingroup, Using `bingroup`, traces under `barmode`
- "overlay" and on different axes (of the same axis type)
- can have compatible bin settings. Note that histogram
- and histogram2d* trace can share the same `bingroup`
- cumulative
- :class:`plotly.graph_objects.histogram.Cumulative`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- error_x
- :class:`plotly.graph_objects.histogram.ErrorX` instance
- or dict with compatible properties
- error_y
- :class:`plotly.graph_objects.histogram.ErrorY` instance
- or dict with compatible properties
- histfunc
- Specifies the binning function used for this histogram
- trace. If "count", the histogram values are computed by
- counting the number of values lying inside each bin. If
- "sum", "avg", "min", "max", the histogram values are
- computed using the sum, the average, the minimum or the
- maximum of the values lying inside each bin
- respectively.
- histnorm
- Specifies the type of normalization used for this
- histogram trace. If "", the span of each bar
- corresponds to the number of occurrences (i.e. the
- number of data points lying inside the bins). If
- "percent" / "probability", the span of each bar
- corresponds to the percentage / fraction of occurrences
- with respect to the total number of sample points
- (here, the sum of all bin HEIGHTS equals 100% / 1). If
- "density", the span of each bar corresponds to the
- number of occurrences in a bin divided by the size of
- the bin interval (here, the sum of all bin AREAS equals
- the total number of sample points). If *probability
- density*, the area of each bar corresponds to the
- probability that an event will fall into the
- corresponding bin (here, the sum of all bin AREAS
- equals 1).
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.histogram.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `binNumber` Anything contained
- in tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.histogram.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- nbinsx
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `xbins.size` is provided.
- nbinsy
- Specifies the maximum number of desired bins. This
- value will be used in an algorithm that will decide the
- optimal bin size such that the histogram best
- visualizes the distribution of the data. Ignored if
- `ybins.size` is provided.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- selected
- :class:`plotly.graph_objects.histogram.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.histogram.Stream` instance
- or dict with compatible properties
- text
- Sets hover text elements associated with each bar. If a
- single string, the same string appears over all bars.
- If an array of string, the items are mapped in order to
- the this trace's coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.histogram.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the sample data to be binned on the x axis.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xbins
- :class:`plotly.graph_objects.histogram.XBins` instance
- or dict with compatible properties
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the sample data to be binned on the y axis.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ybins
- :class:`plotly.graph_objects.histogram.YBins` instance
- or dict with compatible properties
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Histogram
- """
- super(Histogram, self).__init__("histogram")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Histogram
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Histogram`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import histogram as v_histogram
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_histogram.AlignmentgroupValidator()
- self._validators["autobinx"] = v_histogram.AutobinxValidator()
- self._validators["autobiny"] = v_histogram.AutobinyValidator()
- self._validators["bingroup"] = v_histogram.BingroupValidator()
- self._validators["cumulative"] = v_histogram.CumulativeValidator()
- self._validators["customdata"] = v_histogram.CustomdataValidator()
- self._validators["customdatasrc"] = v_histogram.CustomdatasrcValidator()
- self._validators["error_x"] = v_histogram.ErrorXValidator()
- self._validators["error_y"] = v_histogram.ErrorYValidator()
- self._validators["histfunc"] = v_histogram.HistfuncValidator()
- self._validators["histnorm"] = v_histogram.HistnormValidator()
- self._validators["hoverinfo"] = v_histogram.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_histogram.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_histogram.HoverlabelValidator()
- self._validators["hovertemplate"] = v_histogram.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_histogram.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_histogram.HovertextValidator()
- self._validators["hovertextsrc"] = v_histogram.HovertextsrcValidator()
- self._validators["ids"] = v_histogram.IdsValidator()
- self._validators["idssrc"] = v_histogram.IdssrcValidator()
- self._validators["legendgroup"] = v_histogram.LegendgroupValidator()
- self._validators["marker"] = v_histogram.MarkerValidator()
- self._validators["meta"] = v_histogram.MetaValidator()
- self._validators["metasrc"] = v_histogram.MetasrcValidator()
- self._validators["name"] = v_histogram.NameValidator()
- self._validators["nbinsx"] = v_histogram.NbinsxValidator()
- self._validators["nbinsy"] = v_histogram.NbinsyValidator()
- self._validators["offsetgroup"] = v_histogram.OffsetgroupValidator()
- self._validators["opacity"] = v_histogram.OpacityValidator()
- self._validators["orientation"] = v_histogram.OrientationValidator()
- self._validators["selected"] = v_histogram.SelectedValidator()
- self._validators["selectedpoints"] = v_histogram.SelectedpointsValidator()
- self._validators["showlegend"] = v_histogram.ShowlegendValidator()
- self._validators["stream"] = v_histogram.StreamValidator()
- self._validators["text"] = v_histogram.TextValidator()
- self._validators["textsrc"] = v_histogram.TextsrcValidator()
- self._validators["uid"] = v_histogram.UidValidator()
- self._validators["uirevision"] = v_histogram.UirevisionValidator()
- self._validators["unselected"] = v_histogram.UnselectedValidator()
- self._validators["visible"] = v_histogram.VisibleValidator()
- self._validators["x"] = v_histogram.XValidator()
- self._validators["xaxis"] = v_histogram.XAxisValidator()
- self._validators["xbins"] = v_histogram.XBinsValidator()
- self._validators["xcalendar"] = v_histogram.XcalendarValidator()
- self._validators["xsrc"] = v_histogram.XsrcValidator()
- self._validators["y"] = v_histogram.YValidator()
- self._validators["yaxis"] = v_histogram.YAxisValidator()
- self._validators["ybins"] = v_histogram.YBinsValidator()
- self._validators["ycalendar"] = v_histogram.YcalendarValidator()
- self._validators["ysrc"] = v_histogram.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("autobinx", None)
- self["autobinx"] = autobinx if autobinx is not None else _v
- _v = arg.pop("autobiny", None)
- self["autobiny"] = autobiny if autobiny is not None else _v
- _v = arg.pop("bingroup", None)
- self["bingroup"] = bingroup if bingroup is not None else _v
- _v = arg.pop("cumulative", None)
- self["cumulative"] = cumulative if cumulative is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("error_x", None)
- self["error_x"] = error_x if error_x is not None else _v
- _v = arg.pop("error_y", None)
- self["error_y"] = error_y if error_y is not None else _v
- _v = arg.pop("histfunc", None)
- self["histfunc"] = histfunc if histfunc is not None else _v
- _v = arg.pop("histnorm", None)
- self["histnorm"] = histnorm if histnorm is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("nbinsx", None)
- self["nbinsx"] = nbinsx if nbinsx is not None else _v
- _v = arg.pop("nbinsy", None)
- self["nbinsy"] = nbinsy if nbinsy is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xbins", None)
- self["xbins"] = xbins if xbins is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ybins", None)
- self["ybins"] = ybins if ybins is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "histogram"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="histogram", val="histogram"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Heatmapgl(_BaseTraceType):
-
- # 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.heatmapgl.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.heatmap
- gl.colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.heatmapgl.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of heatmapgl.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.heatmapgl.colorbar
- .Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- heatmapgl.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
- heatmapgl.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.heatmapgl.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.heatmapgl.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.heatmapgl.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.heatmapgl.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # transpose
- # ---------
- @property
- def transpose(self):
- """
- Transposes the z data.
-
- The 'transpose' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["transpose"]
-
- @transpose.setter
- def transpose(self, val):
- self["transpose"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # xtype
- # -----
- @property
- def xtype(self):
- """
- If "array", the heatmap's x coordinates are given by "x" (the
- default behavior when `x` is provided). If "scaled", the
- heatmap's x coordinates are given by "x0" and "dx" (the default
- behavior when `x` is not provided).
-
- The 'xtype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["xtype"]
-
- @xtype.setter
- def xtype(self, val):
- self["xtype"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # ytype
- # -----
- @property
- def ytype(self):
- """
- If "array", the heatmap's y coordinates are given by "y" (the
- default behavior when `y` is provided) If "scaled", the
- heatmap's y coordinates are given by "y0" and "dy" (the default
- behavior when `y` is not provided)
-
- The 'ytype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["ytype"]
-
- @ytype.setter
- def ytype(self, val):
- self["ytype"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.heatmapgl.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.heatmapgl.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.heatmapgl.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- ids=None,
- idssrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- transpose=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- x0=None,
- xaxis=None,
- xsrc=None,
- xtype=None,
- y=None,
- y0=None,
- yaxis=None,
- ysrc=None,
- ytype=None,
- z=None,
- zauto=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Heatmapgl object
-
- WebGL version of the heatmap trace type.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Heatmapgl`
- 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.heatmapgl.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.heatmapgl.Hoverlabel`
- instance or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.heatmapgl.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Heatmapgl
- """
- super(Heatmapgl, self).__init__("heatmapgl")
-
- # 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.Heatmapgl
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Heatmapgl`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import heatmapgl as v_heatmapgl
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_heatmapgl.AutocolorscaleValidator()
- self._validators["coloraxis"] = v_heatmapgl.ColoraxisValidator()
- self._validators["colorbar"] = v_heatmapgl.ColorBarValidator()
- self._validators["colorscale"] = v_heatmapgl.ColorscaleValidator()
- self._validators["customdata"] = v_heatmapgl.CustomdataValidator()
- self._validators["customdatasrc"] = v_heatmapgl.CustomdatasrcValidator()
- self._validators["dx"] = v_heatmapgl.DxValidator()
- self._validators["dy"] = v_heatmapgl.DyValidator()
- self._validators["hoverinfo"] = v_heatmapgl.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_heatmapgl.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_heatmapgl.HoverlabelValidator()
- self._validators["ids"] = v_heatmapgl.IdsValidator()
- self._validators["idssrc"] = v_heatmapgl.IdssrcValidator()
- self._validators["meta"] = v_heatmapgl.MetaValidator()
- self._validators["metasrc"] = v_heatmapgl.MetasrcValidator()
- self._validators["name"] = v_heatmapgl.NameValidator()
- self._validators["opacity"] = v_heatmapgl.OpacityValidator()
- self._validators["reversescale"] = v_heatmapgl.ReversescaleValidator()
- self._validators["showscale"] = v_heatmapgl.ShowscaleValidator()
- self._validators["stream"] = v_heatmapgl.StreamValidator()
- self._validators["text"] = v_heatmapgl.TextValidator()
- self._validators["textsrc"] = v_heatmapgl.TextsrcValidator()
- self._validators["transpose"] = v_heatmapgl.TransposeValidator()
- self._validators["uid"] = v_heatmapgl.UidValidator()
- self._validators["uirevision"] = v_heatmapgl.UirevisionValidator()
- self._validators["visible"] = v_heatmapgl.VisibleValidator()
- self._validators["x"] = v_heatmapgl.XValidator()
- self._validators["x0"] = v_heatmapgl.X0Validator()
- self._validators["xaxis"] = v_heatmapgl.XAxisValidator()
- self._validators["xsrc"] = v_heatmapgl.XsrcValidator()
- self._validators["xtype"] = v_heatmapgl.XtypeValidator()
- self._validators["y"] = v_heatmapgl.YValidator()
- self._validators["y0"] = v_heatmapgl.Y0Validator()
- self._validators["yaxis"] = v_heatmapgl.YAxisValidator()
- self._validators["ysrc"] = v_heatmapgl.YsrcValidator()
- self._validators["ytype"] = v_heatmapgl.YtypeValidator()
- self._validators["z"] = v_heatmapgl.ZValidator()
- self._validators["zauto"] = v_heatmapgl.ZautoValidator()
- self._validators["zmax"] = v_heatmapgl.ZmaxValidator()
- self._validators["zmid"] = v_heatmapgl.ZmidValidator()
- self._validators["zmin"] = v_heatmapgl.ZminValidator()
- self._validators["zsrc"] = v_heatmapgl.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("transpose", None)
- self["transpose"] = transpose if transpose is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("xtype", None)
- self["xtype"] = xtype if xtype is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("ytype", None)
- self["ytype"] = ytype if ytype is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "heatmapgl"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="heatmapgl", val="heatmapgl"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Heatmap(_BaseTraceType):
-
- # 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.heatmap.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.heatmap
- .colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.heatmap.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of heatmap.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.heatmap.colorbar.T
- itle` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- heatmap.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
- heatmap.colorbar.title.side instead. Determines
- the location of color bar's title with respect
- to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.heatmap.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the `z` data are filled in. It is defaulted to true if `z`
- is a one dimensional array and `zsmooth` is not false;
- otherwise it is defaulted to false.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.heatmap.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.heatmap.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoverongaps
- # -----------
- @property
- def hoverongaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the `z` data have hover labels associated with them.
-
- The 'hoverongaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["hoverongaps"]
-
- @hoverongaps.setter
- def hoverongaps(self, val):
- self["hoverongaps"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.heatmap.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.heatmap.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # transpose
- # ---------
- @property
- def transpose(self):
- """
- Transposes the z data.
-
- The 'transpose' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["transpose"]
-
- @transpose.setter
- def transpose(self, val):
- self["transpose"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xgap
- # ----
- @property
- def xgap(self):
- """
- Sets the horizontal gap (in pixels) between bricks.
-
- The 'xgap' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["xgap"]
-
- @xgap.setter
- def xgap(self, val):
- self["xgap"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # xtype
- # -----
- @property
- def xtype(self):
- """
- If "array", the heatmap's x coordinates are given by "x" (the
- default behavior when `x` is provided). If "scaled", the
- heatmap's x coordinates are given by "x0" and "dx" (the default
- behavior when `x` is not provided).
-
- The 'xtype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["xtype"]
-
- @xtype.setter
- def xtype(self, val):
- self["xtype"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ygap
- # ----
- @property
- def ygap(self):
- """
- Sets the vertical gap (in pixels) between bricks.
-
- The 'ygap' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["ygap"]
-
- @ygap.setter
- def ygap(self, val):
- self["ygap"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # ytype
- # -----
- @property
- def ytype(self):
- """
- If "array", the heatmap's y coordinates are given by "y" (the
- default behavior when `y` is provided) If "scaled", the
- heatmap's y coordinates are given by "y0" and "dy" (the default
- behavior when `y` is not provided)
-
- The 'ytype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["ytype"]
-
- @ytype.setter
- def ytype(self, val):
- self["ytype"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zhoverformat
- # ------------
- @property
- def zhoverformat(self):
- """
- Sets the hover text formatting rule using d3 formatting mini-
- languages which are very similar to those in Python. See:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- The 'zhoverformat' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["zhoverformat"]
-
- @zhoverformat.setter
- def zhoverformat(self, val):
- self["zhoverformat"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsmooth
- # -------
- @property
- def zsmooth(self):
- """
- Picks a smoothing algorithm use to smooth `z` data.
-
- The 'zsmooth' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['fast', 'best', False]
-
- Returns
- -------
- Any
- """
- return self["zsmooth"]
-
- @zsmooth.setter
- def zsmooth(self, val):
- self["zsmooth"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.heatmap.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in. It is defaulted
- to true if `z` is a one dimensional array and `zsmooth`
- is not false; otherwise it is defaulted to false.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.heatmap.Hoverlabel`
- instance or dict with compatible properties
- hoverongaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data have hover labels associated
- with them.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.heatmap.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xgap
- Sets the horizontal gap (in pixels) between bricks.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ygap
- Sets the vertical gap (in pixels) between bricks.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsmooth
- Picks a smoothing algorithm use to smooth `z` data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- connectgaps=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoverongaps=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- transpose=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xgap=None,
- xsrc=None,
- xtype=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ygap=None,
- ysrc=None,
- ytype=None,
- z=None,
- zauto=None,
- zhoverformat=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsmooth=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Heatmap object
-
- The data that describes the heatmap value-to-color mapping is
- set in `z`. Data in `z` can either be a 2D list of values
- (ragged or not) or a 1D array of values. In the case where `z`
- is a 2D list, say that `z` has N rows and M columns. Then, by
- default, the resulting heatmap will have N partitions along the
- y axis and M partitions along the x axis. In other words, the
- i-th row/ j-th column cell in `z` is mapped to the i-th
- partition of the y axis (starting from the bottom of the plot)
- and the j-th partition of the x-axis (starting from the left of
- the plot). This behavior can be flipped by using `transpose`.
- Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1)
- elements. If M (N), then the coordinates correspond to the
- center of the heatmap cells and the cells have equal width. If
- M+1 (N+1), then the coordinates correspond to the edges of the
- heatmap cells. In the case where `z` is a 1D list, the x and y
- coordinates must be provided in `x` and `y` respectively to
- form data triplets.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Heatmap`
- 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.heatmap.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in. It is defaulted
- to true if `z` is a one dimensional array and `zsmooth`
- is not false; otherwise it is defaulted to false.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.heatmap.Hoverlabel`
- instance or dict with compatible properties
- hoverongaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data have hover labels associated
- with them.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.heatmap.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xgap
- Sets the horizontal gap (in pixels) between bricks.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ygap
- Sets the vertical gap (in pixels) between bricks.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsmooth
- Picks a smoothing algorithm use to smooth `z` data.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Heatmap
- """
- super(Heatmap, self).__init__("heatmap")
-
- # 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.Heatmap
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Heatmap`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import heatmap as v_heatmap
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_heatmap.AutocolorscaleValidator()
- self._validators["coloraxis"] = v_heatmap.ColoraxisValidator()
- self._validators["colorbar"] = v_heatmap.ColorBarValidator()
- self._validators["colorscale"] = v_heatmap.ColorscaleValidator()
- self._validators["connectgaps"] = v_heatmap.ConnectgapsValidator()
- self._validators["customdata"] = v_heatmap.CustomdataValidator()
- self._validators["customdatasrc"] = v_heatmap.CustomdatasrcValidator()
- self._validators["dx"] = v_heatmap.DxValidator()
- self._validators["dy"] = v_heatmap.DyValidator()
- self._validators["hoverinfo"] = v_heatmap.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_heatmap.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_heatmap.HoverlabelValidator()
- self._validators["hoverongaps"] = v_heatmap.HoverongapsValidator()
- self._validators["hovertemplate"] = v_heatmap.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_heatmap.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_heatmap.HovertextValidator()
- self._validators["hovertextsrc"] = v_heatmap.HovertextsrcValidator()
- self._validators["ids"] = v_heatmap.IdsValidator()
- self._validators["idssrc"] = v_heatmap.IdssrcValidator()
- self._validators["legendgroup"] = v_heatmap.LegendgroupValidator()
- self._validators["meta"] = v_heatmap.MetaValidator()
- self._validators["metasrc"] = v_heatmap.MetasrcValidator()
- self._validators["name"] = v_heatmap.NameValidator()
- self._validators["opacity"] = v_heatmap.OpacityValidator()
- self._validators["reversescale"] = v_heatmap.ReversescaleValidator()
- self._validators["showlegend"] = v_heatmap.ShowlegendValidator()
- self._validators["showscale"] = v_heatmap.ShowscaleValidator()
- self._validators["stream"] = v_heatmap.StreamValidator()
- self._validators["text"] = v_heatmap.TextValidator()
- self._validators["textsrc"] = v_heatmap.TextsrcValidator()
- self._validators["transpose"] = v_heatmap.TransposeValidator()
- self._validators["uid"] = v_heatmap.UidValidator()
- self._validators["uirevision"] = v_heatmap.UirevisionValidator()
- self._validators["visible"] = v_heatmap.VisibleValidator()
- self._validators["x"] = v_heatmap.XValidator()
- self._validators["x0"] = v_heatmap.X0Validator()
- self._validators["xaxis"] = v_heatmap.XAxisValidator()
- self._validators["xcalendar"] = v_heatmap.XcalendarValidator()
- self._validators["xgap"] = v_heatmap.XgapValidator()
- self._validators["xsrc"] = v_heatmap.XsrcValidator()
- self._validators["xtype"] = v_heatmap.XtypeValidator()
- self._validators["y"] = v_heatmap.YValidator()
- self._validators["y0"] = v_heatmap.Y0Validator()
- self._validators["yaxis"] = v_heatmap.YAxisValidator()
- self._validators["ycalendar"] = v_heatmap.YcalendarValidator()
- self._validators["ygap"] = v_heatmap.YgapValidator()
- self._validators["ysrc"] = v_heatmap.YsrcValidator()
- self._validators["ytype"] = v_heatmap.YtypeValidator()
- self._validators["z"] = v_heatmap.ZValidator()
- self._validators["zauto"] = v_heatmap.ZautoValidator()
- self._validators["zhoverformat"] = v_heatmap.ZhoverformatValidator()
- self._validators["zmax"] = v_heatmap.ZmaxValidator()
- self._validators["zmid"] = v_heatmap.ZmidValidator()
- self._validators["zmin"] = v_heatmap.ZminValidator()
- self._validators["zsmooth"] = v_heatmap.ZsmoothValidator()
- self._validators["zsrc"] = v_heatmap.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoverongaps", None)
- self["hoverongaps"] = hoverongaps if hoverongaps is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("transpose", None)
- self["transpose"] = transpose if transpose is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xgap", None)
- self["xgap"] = xgap if xgap is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("xtype", None)
- self["xtype"] = xtype if xtype is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ygap", None)
- self["ygap"] = ygap if ygap is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("ytype", None)
- self["ytype"] = ytype if ytype is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zhoverformat", None)
- self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsmooth", None)
- self["zsmooth"] = zsmooth if zsmooth is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "heatmap"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="heatmap", val="heatmap"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Funnelarea(_BaseTraceType):
-
- # aspectratio
- # -----------
- @property
- def aspectratio(self):
- """
- Sets the ratio between height and width
-
- The 'aspectratio' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["aspectratio"]
-
- @aspectratio.setter
- def aspectratio(self, val):
- self["aspectratio"] = val
-
- # baseratio
- # ---------
- @property
- def baseratio(self):
- """
- Sets the ratio between bottom length and maximum top length.
-
- The 'baseratio' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["baseratio"]
-
- @baseratio.setter
- def baseratio(self, val):
- self["baseratio"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dlabel
- # ------
- @property
- def dlabel(self):
- """
- Sets the label step. See `label0` for more info.
-
- The 'dlabel' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dlabel"]
-
- @dlabel.setter
- def dlabel(self, val):
- self["dlabel"] = 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.funnelarea.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 funnelarea
- trace .
- row
- If there is a layout grid, use the domain for
- this row in the grid for this funnelarea trace
- .
- x
- Sets the horizontal domain of this funnelarea
- trace (in plot fraction).
- y
- Sets the vertical domain of this funnelarea
- trace (in plot fraction).
-
- Returns
- -------
- plotly.graph_objs.funnelarea.Domain
- """
- return self["domain"]
-
- @domain.setter
- def domain(self, val):
- self["domain"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.funnelarea.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `label`, `color`, `value`, `text` and `percent`.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each sector. If a
- single string, the same string appears for all data points. If
- an array of string, the items are mapped in order of this
- trace's sectors. To be seen, trace `hoverinfo` must contain a
- "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `textinfo` lying inside the sector.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.funnelarea.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # label0
- # ------
- @property
- def label0(self):
- """
- Alternate to `labels`. Builds a numeric set of labels. Use with
- `dlabel` where `label0` is the starting label and `dlabel` the
- step.
-
- The 'label0' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["label0"]
-
- @label0.setter
- def label0(self, val):
- self["label0"] = val
-
- # labels
- # ------
- @property
- def labels(self):
- """
- Sets the sector labels. If `labels` entries are duplicated, we
- sum associated `values` or simply count occurrences if `values`
- is not provided. For other array attributes (including color)
- we use the first non-empty entry among all occurrences of the
- label.
-
- The 'labels' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["labels"]
-
- @labels.setter
- def labels(self, val):
- self["labels"] = val
-
- # labelssrc
- # ---------
- @property
- def labelssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for labels .
-
- The 'labelssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["labelssrc"]
-
- @labelssrc.setter
- def labelssrc(self, val):
- self["labelssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnelarea.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- colors
- Sets the color of each sector. If not
- specified, the default trace color set is used
- to pick the sector colors.
- colorssrc
- Sets the source reference on Chart Studio Cloud
- for colors .
- line
- :class:`plotly.graph_objects.funnelarea.marker.
- Line` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.funnelarea.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # scalegroup
- # ----------
- @property
- def scalegroup(self):
- """
- If there are multiple funnelareas that should be sized
- according to their totals, link them by providing a non-empty
- group id here shared by every trace in the same group.
-
- The 'scalegroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["scalegroup"]
-
- @scalegroup.setter
- def scalegroup(self, val):
- self["scalegroup"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnelarea.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.funnelarea.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each sector. If trace
- `textinfo` contains a "text" flag, these elements will be seen
- on the chart. If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in the
- hover labels.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `textinfo`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnelarea.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.funnelarea.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph.
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Specifies the location of the `textinfo`.
-
- The 'textposition' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'none']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `label`, `color`, `value`, `text` and
- `percent`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = 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.funnelarea.Title`
- - A dict of string/value properties that will be passed
- to the Title constructor
-
- Supported dict properties:
-
- font
- Sets the font used for `title`. Note that the
- title's font used to be set by the now
- deprecated `titlefont` attribute.
- position
- Specifies the location of the `title`. Note
- that the title's position used to be set by the
- now deprecated `titleposition` attribute.
- text
- Sets the title of the chart. If it is empty, no
- title is displayed. 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
- -------
- plotly.graph_objs.funnelarea.Title
- """
- return self["title"]
-
- @title.setter
- def title(self, val):
- self["title"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # values
- # ------
- @property
- def values(self):
- """
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
-
- The 'values' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["values"]
-
- @values.setter
- def values(self, val):
- self["values"] = val
-
- # valuessrc
- # ---------
- @property
- def valuessrc(self):
- """
- Sets the source reference on Chart Studio Cloud for values .
-
- The 'valuessrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["valuessrc"]
-
- @valuessrc.setter
- def valuessrc(self, val):
- self["valuessrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- aspectratio
- Sets the ratio between height and width
- baseratio
- Sets the ratio between bottom length and maximum top
- length.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dlabel
- Sets the label step. See `label0` for more info.
- domain
- :class:`plotly.graph_objects.funnelarea.Domain`
- instance or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.funnelarea.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `label`, `color`, `value`,
- `text` and `percent`. Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- label0
- Alternate to `labels`. Builds a numeric set of labels.
- Use with `dlabel` where `label0` is the starting label
- and `dlabel` the step.
- labels
- Sets the sector labels. If `labels` entries are
- duplicated, we sum associated `values` or simply count
- occurrences if `values` is not provided. For other
- array attributes (including color) we use the first
- non-empty entry among all occurrences of the label.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.funnelarea.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- scalegroup
- If there are multiple funnelareas that should be sized
- according to their totals, link them by providing a
- non-empty group id here shared by every trace in the
- same group.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.funnelarea.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Specifies the location of the `textinfo`.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `label`,
- `color`, `value`, `text` and `percent`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- title
- :class:`plotly.graph_objects.funnelarea.Title` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- aspectratio=None,
- baseratio=None,
- customdata=None,
- customdatasrc=None,
- dlabel=None,
- domain=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextfont=None,
- label0=None,
- labels=None,
- labelssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- scalegroup=None,
- showlegend=None,
- stream=None,
- text=None,
- textfont=None,
- textinfo=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- title=None,
- uid=None,
- uirevision=None,
- values=None,
- valuessrc=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Funnelarea object
-
- Visualize stages in a process using area-encoded trapezoids.
- This trace can be used to show data in a part-to-whole
- representation similar to a "pie" trace, wherein each item
- appears in a single stage. See also the "funnel" trace type for
- a different approach to visualizing funnel data.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Funnelarea`
- aspectratio
- Sets the ratio between height and width
- baseratio
- Sets the ratio between bottom length and maximum top
- length.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dlabel
- Sets the label step. See `label0` for more info.
- domain
- :class:`plotly.graph_objects.funnelarea.Domain`
- instance or dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.funnelarea.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `label`, `color`, `value`,
- `text` and `percent`. Anything contained in tag
- `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each sector.
- If a single string, the same string appears for all
- data points. If an array of string, the items are
- mapped in order of this trace's sectors. To be seen,
- trace `hoverinfo` must contain a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextfont
- Sets the font used for `textinfo` lying inside the
- sector.
- label0
- Alternate to `labels`. Builds a numeric set of labels.
- Use with `dlabel` where `label0` is the starting label
- and `dlabel` the step.
- labels
- Sets the sector labels. If `labels` entries are
- duplicated, we sum associated `values` or simply count
- occurrences if `values` is not provided. For other
- array attributes (including color) we use the first
- non-empty entry among all occurrences of the label.
- labelssrc
- Sets the source reference on Chart Studio Cloud for
- labels .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.funnelarea.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- scalegroup
- If there are multiple funnelareas that should be sized
- according to their totals, link them by providing a
- non-empty group id here shared by every trace in the
- same group.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.funnelarea.Stream`
- instance or dict with compatible properties
- text
- Sets text elements associated with each sector. If
- trace `textinfo` contains a "text" flag, these elements
- will be seen on the chart. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
- textfont
- Sets the font used for `textinfo`.
- textinfo
- Determines which trace information appear on the graph.
- textposition
- Specifies the location of the `textinfo`.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `label`,
- `color`, `value`, `text` and `percent`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- title
- :class:`plotly.graph_objects.funnelarea.Title` instance
- or dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- values
- Sets the values of the sectors. If omitted, we count
- occurrences of each label.
- valuessrc
- Sets the source reference on Chart Studio Cloud for
- values .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Funnelarea
- """
- super(Funnelarea, self).__init__("funnelarea")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Funnelarea
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Funnelarea`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import funnelarea as v_funnelarea
-
- # Initialize validators
- # ---------------------
- self._validators["aspectratio"] = v_funnelarea.AspectratioValidator()
- self._validators["baseratio"] = v_funnelarea.BaseratioValidator()
- self._validators["customdata"] = v_funnelarea.CustomdataValidator()
- self._validators["customdatasrc"] = v_funnelarea.CustomdatasrcValidator()
- self._validators["dlabel"] = v_funnelarea.DlabelValidator()
- self._validators["domain"] = v_funnelarea.DomainValidator()
- self._validators["hoverinfo"] = v_funnelarea.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_funnelarea.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_funnelarea.HoverlabelValidator()
- self._validators["hovertemplate"] = v_funnelarea.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_funnelarea.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_funnelarea.HovertextValidator()
- self._validators["hovertextsrc"] = v_funnelarea.HovertextsrcValidator()
- self._validators["ids"] = v_funnelarea.IdsValidator()
- self._validators["idssrc"] = v_funnelarea.IdssrcValidator()
- self._validators["insidetextfont"] = v_funnelarea.InsidetextfontValidator()
- self._validators["label0"] = v_funnelarea.Label0Validator()
- self._validators["labels"] = v_funnelarea.LabelsValidator()
- self._validators["labelssrc"] = v_funnelarea.LabelssrcValidator()
- self._validators["legendgroup"] = v_funnelarea.LegendgroupValidator()
- self._validators["marker"] = v_funnelarea.MarkerValidator()
- self._validators["meta"] = v_funnelarea.MetaValidator()
- self._validators["metasrc"] = v_funnelarea.MetasrcValidator()
- self._validators["name"] = v_funnelarea.NameValidator()
- self._validators["opacity"] = v_funnelarea.OpacityValidator()
- self._validators["scalegroup"] = v_funnelarea.ScalegroupValidator()
- self._validators["showlegend"] = v_funnelarea.ShowlegendValidator()
- self._validators["stream"] = v_funnelarea.StreamValidator()
- self._validators["text"] = v_funnelarea.TextValidator()
- self._validators["textfont"] = v_funnelarea.TextfontValidator()
- self._validators["textinfo"] = v_funnelarea.TextinfoValidator()
- self._validators["textposition"] = v_funnelarea.TextpositionValidator()
- self._validators["textpositionsrc"] = v_funnelarea.TextpositionsrcValidator()
- self._validators["textsrc"] = v_funnelarea.TextsrcValidator()
- self._validators["texttemplate"] = v_funnelarea.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_funnelarea.TexttemplatesrcValidator()
- self._validators["title"] = v_funnelarea.TitleValidator()
- self._validators["uid"] = v_funnelarea.UidValidator()
- self._validators["uirevision"] = v_funnelarea.UirevisionValidator()
- self._validators["values"] = v_funnelarea.ValuesValidator()
- self._validators["valuessrc"] = v_funnelarea.ValuessrcValidator()
- self._validators["visible"] = v_funnelarea.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("aspectratio", None)
- self["aspectratio"] = aspectratio if aspectratio is not None else _v
- _v = arg.pop("baseratio", None)
- self["baseratio"] = baseratio if baseratio is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dlabel", None)
- self["dlabel"] = dlabel if dlabel is not None else _v
- _v = arg.pop("domain", None)
- self["domain"] = domain if domain is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("label0", None)
- self["label0"] = label0 if label0 is not None else _v
- _v = arg.pop("labels", None)
- self["labels"] = labels if labels is not None else _v
- _v = arg.pop("labelssrc", None)
- self["labelssrc"] = labelssrc if labelssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("scalegroup", None)
- self["scalegroup"] = scalegroup if scalegroup is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("title", None)
- self["title"] = title if title is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("values", None)
- self["values"] = values if values is not None else _v
- _v = arg.pop("valuessrc", None)
- self["valuessrc"] = valuessrc if valuessrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "funnelarea"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="funnelarea", val="funnelarea"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Funnel(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether the text nodes are clipped about the subplot
- axes. To show the text nodes above axis lines and tick labels,
- make sure to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # connector
- # ---------
- @property
- def connector(self):
- """
- The 'connector' property is an instance of Connector
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Connector`
- - A dict of string/value properties that will be passed
- to the Connector constructor
-
- Supported dict properties:
-
- fillcolor
- Sets the fill color.
- line
- :class:`plotly.graph_objects.funnel.connector.L
- ine` instance or dict with compatible
- properties
- visible
- Determines if connector regions and lines are
- drawn.
-
- Returns
- -------
- plotly.graph_objs.funnel.Connector
- """
- return self["connector"]
-
- @connector.setter
- def connector(self, val):
- self["connector"] = val
-
- # constraintext
- # -------------
- @property
- def constraintext(self):
- """
- Constrain the size of text inside or outside a bar to be no
- larger than the bar itself.
-
- The 'constraintext' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'both', 'none']
-
- Returns
- -------
- Any
- """
- return self["constraintext"]
-
- @constraintext.setter
- def constraintext(self, val):
- self["constraintext"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters
- (e.g. 'name+x')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.funnel.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `percentInitial`, `percentPrevious` and
- `percentTotal`. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextanchor
- # ----------------
- @property
- def insidetextanchor(self):
- """
- Determines if texts are kept at center or start/end points in
- `textposition` "inside" mode.
-
- The 'insidetextanchor' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['end', 'middle', 'start']
-
- Returns
- -------
- Any
- """
- return self["insidetextanchor"]
-
- @insidetextanchor.setter
- def insidetextanchor(self, val):
- self["insidetextanchor"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `text` lying inside the bar.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.funnel.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.funnel.marker.Colo
- rBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.funnel.marker.Line
- ` instance or dict with compatible properties
- opacity
- Sets the opacity of the bars.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.funnel.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # offset
- # ------
- @property
- def offset(self):
- """
- Shifts the position where the bar is drawn (in position axis
- units). In "group" barmode, traces that set "offset" will be
- excluded and drawn in "overlay" mode instead.
-
- The 'offset' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["offset"]
-
- @offset.setter
- def offset(self, val):
- self["offset"] = val
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the funnels. With "v" ("h"), the value
- of the each bar spans along the vertical (horizontal). By
- default funnels are tend to be oriented horizontally; unless
- only "y" array is presented or orientation is set to "v". Also
- regarding graphs including only 'horizontal' funnels,
- "autorange" on the "y-axis" are set to "reversed".
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `text` lying outside the bar.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.funnel.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.funnel.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textangle
- # ---------
- @property
- def textangle(self):
- """
- Sets the angle of the tick labels with respect to the bar. For
- example, a `tickangle` of -90 draws the tick labels vertically.
- With "auto" the texts may automatically be rotated to fit with
- the maximum size in bars.
-
- The 'textangle' property is a angle (in degrees) that may be
- specified as a number between -180 and 180. Numeric values outside this
- range are converted to the equivalent value
- (e.g. 270 is converted to -90).
-
- Returns
- -------
- int|float
- """
- return self["textangle"]
-
- @textangle.setter
- def textangle(self, val):
- self["textangle"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `text`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.funnel.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.funnel.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textinfo
- # --------
- @property
- def textinfo(self):
- """
- Determines which trace information appear on the graph. In the
- case of having multiple funnels, percentages & totals are
- computed separately (per trace).
-
- The 'textinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters
- (e.g. 'label+text')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["textinfo"]
-
- @textinfo.setter
- def textinfo(self, val):
- self["textinfo"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Specifies the location of the `text`. "inside" positions `text`
- inside, next to the bar end (rotated and scaled if needed).
- "outside" positions `text` outside, next to the bar end (scaled
- if needed), unless there is another bar stacked on this one,
- then the text gets pushed inside. "auto" tries to position
- `text` inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
-
- The 'textposition' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'auto', 'none']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `percentInitial`, `percentPrevious`,
- `percentTotal`, `label` and `value`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the bar width (in position axis units).
-
- 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
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- connector
- :class:`plotly.graph_objects.funnel.Connector` instance
- or dict with compatible properties
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.funnel.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `percentInitial`,
- `percentPrevious` and `percentTotal`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.funnel.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the funnels. With "v" ("h"),
- the value of the each bar spans along the vertical
- (horizontal). By default funnels are tend to be
- oriented horizontally; unless only "y" array is
- presented or orientation is set to "v". Also regarding
- graphs including only 'horizontal' funnels, "autorange"
- on the "y-axis" are set to "reversed".
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.funnel.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textinfo
- Determines which trace information appear on the graph.
- In the case of having multiple funnels, percentages &
- totals are computed separately (per trace).
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `percentInitial`, `percentPrevious`, `percentTotal`,
- `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- cliponaxis=None,
- connector=None,
- constraintext=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextanchor=None,
- insidetextfont=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- offset=None,
- offsetgroup=None,
- opacity=None,
- orientation=None,
- outsidetextfont=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textangle=None,
- textfont=None,
- textinfo=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- width=None,
- x=None,
- x0=None,
- xaxis=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Funnel object
-
- Visualize stages in a process using length-encoded bars. This
- trace can be used to show data in either a part-to-whole
- representation wherein each item appears in a single stage, or
- in a "drop-off" representation wherein each item appears in
- each stage it traversed. See also the "funnelarea" trace type
- for a different approach to visualizing funnel data.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Funnel`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- connector
- :class:`plotly.graph_objects.funnel.Connector` instance
- or dict with compatible properties
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.funnel.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `percentInitial`,
- `percentPrevious` and `percentTotal`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.funnel.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the funnels. With "v" ("h"),
- the value of the each bar spans along the vertical
- (horizontal). By default funnels are tend to be
- oriented horizontally; unless only "y" array is
- presented or orientation is set to "v". Also regarding
- graphs including only 'horizontal' funnels, "autorange"
- on the "y-axis" are set to "reversed".
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.funnel.Stream` instance or
- dict with compatible properties
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textinfo
- Determines which trace information appear on the graph.
- In the case of having multiple funnels, percentages &
- totals are computed separately (per trace).
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables
- `percentInitial`, `percentPrevious`, `percentTotal`,
- `label` and `value`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Funnel
- """
- super(Funnel, self).__init__("funnel")
-
- # 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.Funnel
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Funnel`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import funnel as v_funnel
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_funnel.AlignmentgroupValidator()
- self._validators["cliponaxis"] = v_funnel.CliponaxisValidator()
- self._validators["connector"] = v_funnel.ConnectorValidator()
- self._validators["constraintext"] = v_funnel.ConstraintextValidator()
- self._validators["customdata"] = v_funnel.CustomdataValidator()
- self._validators["customdatasrc"] = v_funnel.CustomdatasrcValidator()
- self._validators["dx"] = v_funnel.DxValidator()
- self._validators["dy"] = v_funnel.DyValidator()
- self._validators["hoverinfo"] = v_funnel.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_funnel.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_funnel.HoverlabelValidator()
- self._validators["hovertemplate"] = v_funnel.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_funnel.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_funnel.HovertextValidator()
- self._validators["hovertextsrc"] = v_funnel.HovertextsrcValidator()
- self._validators["ids"] = v_funnel.IdsValidator()
- self._validators["idssrc"] = v_funnel.IdssrcValidator()
- self._validators["insidetextanchor"] = v_funnel.InsidetextanchorValidator()
- self._validators["insidetextfont"] = v_funnel.InsidetextfontValidator()
- self._validators["legendgroup"] = v_funnel.LegendgroupValidator()
- self._validators["marker"] = v_funnel.MarkerValidator()
- self._validators["meta"] = v_funnel.MetaValidator()
- self._validators["metasrc"] = v_funnel.MetasrcValidator()
- self._validators["name"] = v_funnel.NameValidator()
- self._validators["offset"] = v_funnel.OffsetValidator()
- self._validators["offsetgroup"] = v_funnel.OffsetgroupValidator()
- self._validators["opacity"] = v_funnel.OpacityValidator()
- self._validators["orientation"] = v_funnel.OrientationValidator()
- self._validators["outsidetextfont"] = v_funnel.OutsidetextfontValidator()
- self._validators["selectedpoints"] = v_funnel.SelectedpointsValidator()
- self._validators["showlegend"] = v_funnel.ShowlegendValidator()
- self._validators["stream"] = v_funnel.StreamValidator()
- self._validators["text"] = v_funnel.TextValidator()
- self._validators["textangle"] = v_funnel.TextangleValidator()
- self._validators["textfont"] = v_funnel.TextfontValidator()
- self._validators["textinfo"] = v_funnel.TextinfoValidator()
- self._validators["textposition"] = v_funnel.TextpositionValidator()
- self._validators["textpositionsrc"] = v_funnel.TextpositionsrcValidator()
- self._validators["textsrc"] = v_funnel.TextsrcValidator()
- self._validators["texttemplate"] = v_funnel.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_funnel.TexttemplatesrcValidator()
- self._validators["uid"] = v_funnel.UidValidator()
- self._validators["uirevision"] = v_funnel.UirevisionValidator()
- self._validators["visible"] = v_funnel.VisibleValidator()
- self._validators["width"] = v_funnel.WidthValidator()
- self._validators["x"] = v_funnel.XValidator()
- self._validators["x0"] = v_funnel.X0Validator()
- self._validators["xaxis"] = v_funnel.XAxisValidator()
- self._validators["xsrc"] = v_funnel.XsrcValidator()
- self._validators["y"] = v_funnel.YValidator()
- self._validators["y0"] = v_funnel.Y0Validator()
- self._validators["yaxis"] = v_funnel.YAxisValidator()
- self._validators["ysrc"] = v_funnel.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("connector", None)
- self["connector"] = connector if connector is not None else _v
- _v = arg.pop("constraintext", None)
- self["constraintext"] = constraintext if constraintext is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextanchor", None)
- self["insidetextanchor"] = (
- insidetextanchor if insidetextanchor is not None else _v
- )
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("offset", None)
- self["offset"] = offset if offset is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textangle", None)
- self["textangle"] = textangle if textangle is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textinfo", None)
- self["textinfo"] = textinfo if textinfo is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "funnel"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="funnel", val="funnel"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Densitymapbox(_BaseTraceType):
-
- # 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
-
- # below
- # -----
- @property
- def below(self):
- """
- Determines if the densitymapbox trace will be inserted before
- the layer with the specified ID. By default, densitymapbox
- traces are placed below the first layer of type symbol If 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.densitymapbox.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.density
- mapbox.colorbar.Tickformatstop` instances or
- dicts with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.densitymapbox.colorbar.tickformatstopdefaults
- ), sets the default property values to use for
- elements of
- densitymapbox.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.densitymapbox.colo
- rbar.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- densitymapbox.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
- densitymapbox.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.densitymapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'lon+lat')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.densitymapbox.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (lon,lat) pair If
- a single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (lon,lat) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # lat
- # ---
- @property
- def lat(self):
- """
- Sets the latitude coordinates (in degrees North).
-
- The 'lat' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lat"]
-
- @lat.setter
- def lat(self, val):
- self["lat"] = val
-
- # latsrc
- # ------
- @property
- def latsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lat .
-
- The 'latsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["latsrc"]
-
- @latsrc.setter
- def latsrc(self, val):
- self["latsrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lon
- # ---
- @property
- def lon(self):
- """
- Sets the longitude coordinates (in degrees East).
-
- The 'lon' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lon"]
-
- @lon.setter
- def lon(self, val):
- self["lon"] = val
-
- # lonsrc
- # ------
- @property
- def lonsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lon .
-
- The 'lonsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lonsrc"]
-
- @lonsrc.setter
- def lonsrc(self, val):
- self["lonsrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # radius
- # ------
- @property
- def radius(self):
- """
- Sets the radius of influence of one `lon` / `lat` point in
- pixels. Increasing the value makes the densitymapbox trace
- smoother, but less detailed.
-
- The 'radius' property is a number and may be specified as:
- - An int or float in the interval [1, inf]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["radius"]
-
- @radius.setter
- def radius(self, val):
- self["radius"] = val
-
- # radiussrc
- # ---------
- @property
- def radiussrc(self):
- """
- Sets the source reference on Chart Studio Cloud for radius .
-
- The 'radiussrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["radiussrc"]
-
- @radiussrc.setter
- def radiussrc(self, val):
- self["radiussrc"] = val
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.densitymapbox.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.densitymapbox.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- mapbox subplot. If "mapbox" (the default value), the data refer
- to `layout.mapbox`. If "mapbox2", the data refer to
- `layout.mapbox2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'mapbox', that may be specified as the string 'mapbox'
- optionally followed by an integer >= 1
- (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (lon,lat) pair If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (lon,lat) coordinates. If trace `hoverinfo`
- contains a "text" flag and "hovertext" is not set, these
- elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the points' weight. For example, a value of 10 would be
- equivalent to having 10 points of weight 1 in the same spot
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- below
- Determines if the densitymapbox trace will be inserted
- before the layer with the specified ID. By default,
- densitymapbox traces are placed below the first layer
- of type symbol If set to '', the layer will be inserted
- above every existing layer.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.densitymapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.densitymapbox.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (lon,lat)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- radius
- Sets the radius of influence of one `lon` / `lat` point
- in pixels. Increasing the value makes the densitymapbox
- trace smoother, but less detailed.
- radiussrc
- Sets the source reference on Chart Studio Cloud for
- radius .
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.densitymapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets text elements associated with each (lon,lat) pair
- If a single string, the same string appears over all
- the data points. If an array of string, the items are
- mapped in order to the this trace's (lon,lat)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the points' weight. For example, a value of 10
- would be equivalent to having 10 points of weight 1 in
- the same spot
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- below=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- lat=None,
- latsrc=None,
- legendgroup=None,
- lon=None,
- lonsrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- radius=None,
- radiussrc=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- subplot=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- z=None,
- zauto=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Densitymapbox object
-
- Draws a bivariate kernel density estimation with a Gaussian
- kernel from `lon` and `lat` coordinates and optional `z` values
- using a colorscale.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Densitymapbox`
- 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.
- below
- Determines if the densitymapbox trace will be inserted
- before the layer with the specified ID. By default,
- densitymapbox traces are placed below the first layer
- of type symbol If set to '', the layer will be inserted
- above every existing layer.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.densitymapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.densitymapbox.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (lon,lat)
- pair If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (lon,lat)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- lat
- Sets the latitude coordinates (in degrees North).
- latsrc
- Sets the source reference on Chart Studio Cloud for
- lat .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lon
- Sets the longitude coordinates (in degrees East).
- lonsrc
- Sets the source reference on Chart Studio Cloud for
- lon .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- radius
- Sets the radius of influence of one `lon` / `lat` point
- in pixels. Increasing the value makes the densitymapbox
- trace smoother, but less detailed.
- radiussrc
- Sets the source reference on Chart Studio Cloud for
- radius .
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.densitymapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets text elements associated with each (lon,lat) pair
- If a single string, the same string appears over all
- the data points. If an array of string, the items are
- mapped in order to the this trace's (lon,lat)
- coordinates. If trace `hoverinfo` contains a "text"
- flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the points' weight. For example, a value of 10
- would be equivalent to having 10 points of weight 1 in
- the same spot
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Densitymapbox
- """
- super(Densitymapbox, self).__init__("densitymapbox")
-
- # 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.Densitymapbox
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Densitymapbox`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import densitymapbox as v_densitymapbox
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_densitymapbox.AutocolorscaleValidator()
- self._validators["below"] = v_densitymapbox.BelowValidator()
- self._validators["coloraxis"] = v_densitymapbox.ColoraxisValidator()
- self._validators["colorbar"] = v_densitymapbox.ColorBarValidator()
- self._validators["colorscale"] = v_densitymapbox.ColorscaleValidator()
- self._validators["customdata"] = v_densitymapbox.CustomdataValidator()
- self._validators["customdatasrc"] = v_densitymapbox.CustomdatasrcValidator()
- self._validators["hoverinfo"] = v_densitymapbox.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_densitymapbox.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_densitymapbox.HoverlabelValidator()
- self._validators["hovertemplate"] = v_densitymapbox.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_densitymapbox.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_densitymapbox.HovertextValidator()
- self._validators["hovertextsrc"] = v_densitymapbox.HovertextsrcValidator()
- self._validators["ids"] = v_densitymapbox.IdsValidator()
- self._validators["idssrc"] = v_densitymapbox.IdssrcValidator()
- self._validators["lat"] = v_densitymapbox.LatValidator()
- self._validators["latsrc"] = v_densitymapbox.LatsrcValidator()
- self._validators["legendgroup"] = v_densitymapbox.LegendgroupValidator()
- self._validators["lon"] = v_densitymapbox.LonValidator()
- self._validators["lonsrc"] = v_densitymapbox.LonsrcValidator()
- self._validators["meta"] = v_densitymapbox.MetaValidator()
- self._validators["metasrc"] = v_densitymapbox.MetasrcValidator()
- self._validators["name"] = v_densitymapbox.NameValidator()
- self._validators["opacity"] = v_densitymapbox.OpacityValidator()
- self._validators["radius"] = v_densitymapbox.RadiusValidator()
- self._validators["radiussrc"] = v_densitymapbox.RadiussrcValidator()
- self._validators["reversescale"] = v_densitymapbox.ReversescaleValidator()
- self._validators["showlegend"] = v_densitymapbox.ShowlegendValidator()
- self._validators["showscale"] = v_densitymapbox.ShowscaleValidator()
- self._validators["stream"] = v_densitymapbox.StreamValidator()
- self._validators["subplot"] = v_densitymapbox.SubplotValidator()
- self._validators["text"] = v_densitymapbox.TextValidator()
- self._validators["textsrc"] = v_densitymapbox.TextsrcValidator()
- self._validators["uid"] = v_densitymapbox.UidValidator()
- self._validators["uirevision"] = v_densitymapbox.UirevisionValidator()
- self._validators["visible"] = v_densitymapbox.VisibleValidator()
- self._validators["z"] = v_densitymapbox.ZValidator()
- self._validators["zauto"] = v_densitymapbox.ZautoValidator()
- self._validators["zmax"] = v_densitymapbox.ZmaxValidator()
- self._validators["zmid"] = v_densitymapbox.ZmidValidator()
- self._validators["zmin"] = v_densitymapbox.ZminValidator()
- self._validators["zsrc"] = v_densitymapbox.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("below", None)
- self["below"] = below if below is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("lat", None)
- self["lat"] = lat if lat is not None else _v
- _v = arg.pop("latsrc", None)
- self["latsrc"] = latsrc if latsrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lon", None)
- self["lon"] = lon if lon is not None else _v
- _v = arg.pop("lonsrc", None)
- self["lonsrc"] = lonsrc if lonsrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("radius", None)
- self["radius"] = radius if radius is not None else _v
- _v = arg.pop("radiussrc", None)
- self["radiussrc"] = radiussrc if radiussrc is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "densitymapbox"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="densitymapbox", val="densitymapbox"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Contourcarpet(_BaseTraceType):
-
- # a
- # -
- @property
- def a(self):
- """
- Sets the x coordinates.
-
- The 'a' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["a"]
-
- @a.setter
- def a(self, val):
- self["a"] = val
-
- # a0
- # --
- @property
- def a0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'a0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["a0"]
-
- @a0.setter
- def a0(self, val):
- self["a0"] = val
-
- # asrc
- # ----
- @property
- def asrc(self):
- """
- Sets the source reference on Chart Studio Cloud for a .
-
- The 'asrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["asrc"]
-
- @asrc.setter
- def asrc(self, val):
- self["asrc"] = val
-
- # atype
- # -----
- @property
- def atype(self):
- """
- If "array", the heatmap's x coordinates are given by "x" (the
- default behavior when `x` is provided). If "scaled", the
- heatmap's x coordinates are given by "x0" and "dx" (the default
- behavior when `x` is not provided).
-
- The 'atype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["atype"]
-
- @atype.setter
- def atype(self, val):
- self["atype"] = val
-
- # 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
-
- # autocontour
- # -----------
- @property
- def autocontour(self):
- """
- Determines whether or not the contour level attributes are
- picked by an algorithm. If True, the number of contour levels
- can be set in `ncontours`. If False, set the contour level
- attributes in `contours`.
-
- The 'autocontour' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autocontour"]
-
- @autocontour.setter
- def autocontour(self, val):
- self["autocontour"] = val
-
- # b
- # -
- @property
- def b(self):
- """
- Sets the y coordinates.
-
- The 'b' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["b"]
-
- @b.setter
- def b(self, val):
- self["b"] = val
-
- # b0
- # --
- @property
- def b0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'b0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["b0"]
-
- @b0.setter
- def b0(self, val):
- self["b0"] = val
-
- # bsrc
- # ----
- @property
- def bsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for b .
-
- The 'bsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["bsrc"]
-
- @bsrc.setter
- def bsrc(self, val):
- self["bsrc"] = val
-
- # btype
- # -----
- @property
- def btype(self):
- """
- If "array", the heatmap's y coordinates are given by "y" (the
- default behavior when `y` is provided) If "scaled", the
- heatmap's y coordinates are given by "y0" and "dy" (the default
- behavior when `y` is not provided)
-
- The 'btype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["btype"]
-
- @btype.setter
- def btype(self, val):
- self["btype"] = val
-
- # carpet
- # ------
- @property
- def carpet(self):
- """
- The `carpet` of the carpet axes on which this contour trace
- lies
-
- The 'carpet' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["carpet"]
-
- @carpet.setter
- def carpet(self, val):
- self["carpet"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.contourcarpet.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.contour
- carpet.colorbar.Tickformatstop` instances or
- dicts with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.contourcarpet.colorbar.tickformatstopdefaults
- ), sets the default property values to use for
- elements of
- contourcarpet.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.contourcarpet.colo
- rbar.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- contourcarpet.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
- contourcarpet.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.contourcarpet.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # contours
- # --------
- @property
- def contours(self):
- """
- The 'contours' property is an instance of Contours
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.contourcarpet.Contours`
- - A dict of string/value properties that will be passed
- to the Contours constructor
-
- Supported dict properties:
-
- 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-language which is very similar
- to Python, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#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
- -------
- plotly.graph_objs.contourcarpet.Contours
- """
- return self["contours"]
-
- @contours.setter
- def contours(self, val):
- self["contours"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # da
- # --
- @property
- def da(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'da' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["da"]
-
- @da.setter
- def da(self, val):
- self["da"] = val
-
- # db
- # --
- @property
- def db(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'db' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["db"]
-
- @db.setter
- def db(self, val):
- self["db"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line color,
- marker color, or marker line color, whichever is available.
-
- 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
- - A number that will be interpreted as a color
- according to contourcarpet.colorscale
-
- Returns
- -------
- str
- """
- return self["fillcolor"]
-
- @fillcolor.setter
- def fillcolor(self, val):
- self["fillcolor"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.contourcarpet.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.contourcarpet.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # ncontours
- # ---------
- @property
- def ncontours(self):
- """
- Sets the maximum number of contour levels. The actual number of
- contours will be chosen automatically to be less than or equal
- to the value of `ncontours`. Has an effect only if
- `autocontour` is True or if `contours.size` is missing.
-
- The 'ncontours' 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["ncontours"]
-
- @ncontours.setter
- def ncontours(self, val):
- self["ncontours"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.contourcarpet.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.contourcarpet.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # transpose
- # ---------
- @property
- def transpose(self):
- """
- Transposes the z data.
-
- The 'transpose' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["transpose"]
-
- @transpose.setter
- def transpose(self, val):
- self["transpose"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- a
- Sets the x coordinates.
- a0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- atype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- b
- Sets the y coordinates.
- b0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- btype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- carpet
- The `carpet` of the carpet axes on which this contour
- trace lies
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.contourcarpet.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contours
- :class:`plotly.graph_objects.contourcarpet.Contours`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- da
- Sets the x coordinate step. See `x0` for more info.
- db
- Sets the y coordinate step. See `y0` for more info.
- fillcolor
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line
- color, marker color, or marker line color, whichever is
- available.
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.contourcarpet.Line`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.contourcarpet.Stream`
- instance or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- a=None,
- a0=None,
- asrc=None,
- atype=None,
- autocolorscale=None,
- autocontour=None,
- b=None,
- b0=None,
- bsrc=None,
- btype=None,
- carpet=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- contours=None,
- customdata=None,
- customdatasrc=None,
- da=None,
- db=None,
- fillcolor=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- meta=None,
- metasrc=None,
- name=None,
- ncontours=None,
- opacity=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- transpose=None,
- uid=None,
- uirevision=None,
- visible=None,
- xaxis=None,
- yaxis=None,
- z=None,
- zauto=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Contourcarpet object
-
- Plots contours on either the first carpet axis or the carpet
- axis with a matching `carpet` attribute. Data `z` is
- interpreted as matching that of the corresponding carpet axis.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Contourcarpet`
- a
- Sets the x coordinates.
- a0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- atype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- b
- Sets the y coordinates.
- b0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- btype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- carpet
- The `carpet` of the carpet axes on which this contour
- trace lies
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.contourcarpet.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- contours
- :class:`plotly.graph_objects.contourcarpet.Contours`
- instance or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- da
- Sets the x coordinate step. See `x0` for more info.
- db
- Sets the y coordinate step. See `y0` for more info.
- fillcolor
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line
- color, marker color, or marker line color, whichever is
- available.
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.contourcarpet.Line`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.contourcarpet.Stream`
- instance or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Contourcarpet
- """
- super(Contourcarpet, self).__init__("contourcarpet")
-
- # 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
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Contourcarpet`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import contourcarpet as v_contourcarpet
-
- # Initialize validators
- # ---------------------
- self._validators["a"] = v_contourcarpet.AValidator()
- self._validators["a0"] = v_contourcarpet.A0Validator()
- self._validators["asrc"] = v_contourcarpet.AsrcValidator()
- self._validators["atype"] = v_contourcarpet.AtypeValidator()
- self._validators["autocolorscale"] = v_contourcarpet.AutocolorscaleValidator()
- self._validators["autocontour"] = v_contourcarpet.AutocontourValidator()
- self._validators["b"] = v_contourcarpet.BValidator()
- self._validators["b0"] = v_contourcarpet.B0Validator()
- self._validators["bsrc"] = v_contourcarpet.BsrcValidator()
- self._validators["btype"] = v_contourcarpet.BtypeValidator()
- self._validators["carpet"] = v_contourcarpet.CarpetValidator()
- self._validators["coloraxis"] = v_contourcarpet.ColoraxisValidator()
- self._validators["colorbar"] = v_contourcarpet.ColorBarValidator()
- self._validators["colorscale"] = v_contourcarpet.ColorscaleValidator()
- self._validators["contours"] = v_contourcarpet.ContoursValidator()
- self._validators["customdata"] = v_contourcarpet.CustomdataValidator()
- self._validators["customdatasrc"] = v_contourcarpet.CustomdatasrcValidator()
- self._validators["da"] = v_contourcarpet.DaValidator()
- self._validators["db"] = v_contourcarpet.DbValidator()
- self._validators["fillcolor"] = v_contourcarpet.FillcolorValidator()
- self._validators["hovertext"] = v_contourcarpet.HovertextValidator()
- self._validators["hovertextsrc"] = v_contourcarpet.HovertextsrcValidator()
- self._validators["ids"] = v_contourcarpet.IdsValidator()
- self._validators["idssrc"] = v_contourcarpet.IdssrcValidator()
- self._validators["legendgroup"] = v_contourcarpet.LegendgroupValidator()
- self._validators["line"] = v_contourcarpet.LineValidator()
- self._validators["meta"] = v_contourcarpet.MetaValidator()
- self._validators["metasrc"] = v_contourcarpet.MetasrcValidator()
- self._validators["name"] = v_contourcarpet.NameValidator()
- self._validators["ncontours"] = v_contourcarpet.NcontoursValidator()
- self._validators["opacity"] = v_contourcarpet.OpacityValidator()
- self._validators["reversescale"] = v_contourcarpet.ReversescaleValidator()
- self._validators["showlegend"] = v_contourcarpet.ShowlegendValidator()
- self._validators["showscale"] = v_contourcarpet.ShowscaleValidator()
- self._validators["stream"] = v_contourcarpet.StreamValidator()
- self._validators["text"] = v_contourcarpet.TextValidator()
- self._validators["textsrc"] = v_contourcarpet.TextsrcValidator()
- self._validators["transpose"] = v_contourcarpet.TransposeValidator()
- self._validators["uid"] = v_contourcarpet.UidValidator()
- self._validators["uirevision"] = v_contourcarpet.UirevisionValidator()
- self._validators["visible"] = v_contourcarpet.VisibleValidator()
- self._validators["xaxis"] = v_contourcarpet.XAxisValidator()
- self._validators["yaxis"] = v_contourcarpet.YAxisValidator()
- self._validators["z"] = v_contourcarpet.ZValidator()
- self._validators["zauto"] = v_contourcarpet.ZautoValidator()
- self._validators["zmax"] = v_contourcarpet.ZmaxValidator()
- self._validators["zmid"] = v_contourcarpet.ZmidValidator()
- self._validators["zmin"] = v_contourcarpet.ZminValidator()
- self._validators["zsrc"] = v_contourcarpet.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("a", None)
- self["a"] = a if a is not None else _v
- _v = arg.pop("a0", None)
- self["a0"] = a0 if a0 is not None else _v
- _v = arg.pop("asrc", None)
- self["asrc"] = asrc if asrc is not None else _v
- _v = arg.pop("atype", None)
- self["atype"] = atype if atype is not None else _v
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("autocontour", None)
- self["autocontour"] = autocontour if autocontour is not None else _v
- _v = arg.pop("b", None)
- self["b"] = b if b is not None else _v
- _v = arg.pop("b0", None)
- self["b0"] = b0 if b0 is not None else _v
- _v = arg.pop("bsrc", None)
- self["bsrc"] = bsrc if bsrc is not None else _v
- _v = arg.pop("btype", None)
- self["btype"] = btype if btype is not None else _v
- _v = arg.pop("carpet", None)
- self["carpet"] = carpet if carpet is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("contours", None)
- self["contours"] = contours if contours is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("da", None)
- self["da"] = da if da is not None else _v
- _v = arg.pop("db", None)
- self["db"] = db if db is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("ncontours", None)
- self["ncontours"] = ncontours if ncontours is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("transpose", None)
- self["transpose"] = transpose if transpose is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "contourcarpet"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="contourcarpet", val="contourcarpet"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Contour(_BaseTraceType):
-
- # 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
-
- # autocontour
- # -----------
- @property
- def autocontour(self):
- """
- Determines whether or not the contour level attributes are
- picked by an algorithm. If True, the number of contour levels
- can be set in `ncontours`. If False, set the contour level
- attributes in `contours`.
-
- The 'autocontour' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autocontour"]
-
- @autocontour.setter
- def autocontour(self, val):
- self["autocontour"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.contour.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.contour
- .colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.contour.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of contour.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.contour.colorbar.T
- itle` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- contour.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
- contour.colorbar.title.side instead. Determines
- the location of color bar's title with respect
- to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.contour.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # connectgaps
- # -----------
- @property
- def connectgaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the `z` data are filled in. It is defaulted to true if `z`
- is a one dimensional array otherwise it is defaulted to false.
-
- The 'connectgaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["connectgaps"]
-
- @connectgaps.setter
- def connectgaps(self, val):
- self["connectgaps"] = val
-
- # contours
- # --------
- @property
- def contours(self):
- """
- The 'contours' property is an instance of Contours
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.contour.Contours`
- - A dict of string/value properties that will be passed
- to the Contours constructor
-
- Supported dict properties:
-
- coloring
- Determines the coloring method showing the
- contour values. If "fill", coloring is done
- evenly between each contour level If "heatmap",
- a heatmap gradient coloring is applied 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-language which is very similar
- to Python, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#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
- -------
- plotly.graph_objs.contour.Contours
- """
- return self["contours"]
-
- @contours.setter
- def contours(self, val):
- self["contours"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line color,
- marker color, or marker line color, whichever is available.
-
- 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
- - A number that will be interpreted as a color
- according to contour.colorscale
-
- Returns
- -------
- str
- """
- return self["fillcolor"]
-
- @fillcolor.setter
- def fillcolor(self, val):
- self["fillcolor"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.contour.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.contour.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoverongaps
- # -----------
- @property
- def hoverongaps(self):
- """
- Determines whether or not gaps (i.e. {nan} or missing values)
- in the `z` data have hover labels associated with them.
-
- The 'hoverongaps' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["hoverongaps"]
-
- @hoverongaps.setter
- def hoverongaps(self, val):
- self["hoverongaps"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.contour.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.contour.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # ncontours
- # ---------
- @property
- def ncontours(self):
- """
- Sets the maximum number of contour levels. The actual number of
- contours will be chosen automatically to be less than or equal
- to the value of `ncontours`. Has an effect only if
- `autocontour` is True or if `contours.size` is missing.
-
- The 'ncontours' 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["ncontours"]
-
- @ncontours.setter
- def ncontours(self, val):
- self["ncontours"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.contour.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.contour.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each z value.
-
- The 'text' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # transpose
- # ---------
- @property
- def transpose(self):
- """
- Transposes the z data.
-
- The 'transpose' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["transpose"]
-
- @transpose.setter
- def transpose(self, val):
- self["transpose"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # xtype
- # -----
- @property
- def xtype(self):
- """
- If "array", the heatmap's x coordinates are given by "x" (the
- default behavior when `x` is provided). If "scaled", the
- heatmap's x coordinates are given by "x0" and "dx" (the default
- behavior when `x` is not provided).
-
- The 'xtype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["xtype"]
-
- @xtype.setter
- def xtype(self, val):
- self["xtype"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # ytype
- # -----
- @property
- def ytype(self):
- """
- If "array", the heatmap's y coordinates are given by "y" (the
- default behavior when `y` is provided) If "scaled", the
- heatmap's y coordinates are given by "y0" and "dy" (the default
- behavior when `y` is not provided)
-
- The 'ytype' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['array', 'scaled']
-
- Returns
- -------
- Any
- """
- return self["ytype"]
-
- @ytype.setter
- def ytype(self, val):
- self["ytype"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z data.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zhoverformat
- # ------------
- @property
- def zhoverformat(self):
- """
- Sets the hover text formatting rule using d3 formatting mini-
- languages which are very similar to those in Python. See:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
-
- The 'zhoverformat' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["zhoverformat"]
-
- @zhoverformat.setter
- def zhoverformat(self, val):
- self["zhoverformat"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.contour.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in. It is defaulted
- to true if `z` is a one dimensional array otherwise it
- is defaulted to false.
- contours
- :class:`plotly.graph_objects.contour.Contours` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- fillcolor
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line
- color, marker color, or marker line color, whichever is
- available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.contour.Hoverlabel`
- instance or dict with compatible properties
- hoverongaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data have hover labels associated
- with them.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.contour.Line` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.contour.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- autocontour=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- connectgaps=None,
- contours=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoverongaps=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- line=None,
- meta=None,
- metasrc=None,
- name=None,
- ncontours=None,
- opacity=None,
- reversescale=None,
- showlegend=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- transpose=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- xtype=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ysrc=None,
- ytype=None,
- z=None,
- zauto=None,
- zhoverformat=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Contour object
-
- The data from which contour lines are computed is set in `z`.
- Data in `z` must be a 2D list of numbers. Say that `z` has N
- rows and M columns, then by default, these N rows correspond to
- N y coordinates (set in `y` or auto-generated) and the M
- columns correspond to M x coordinates (set in `x` or auto-
- generated). By setting `transpose` to True, the above behavior
- is flipped.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Contour`
- 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.
- autocontour
- Determines whether or not the contour level attributes
- are picked by an algorithm. If True, the number of
- contour levels can be set in `ncontours`. If False, set
- the contour level attributes in `contours`.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.contour.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- connectgaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data are filled in. It is defaulted
- to true if `z` is a one dimensional array otherwise it
- is defaulted to false.
- contours
- :class:`plotly.graph_objects.contour.Contours` instance
- or dict with compatible properties
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- fillcolor
- Sets the fill color if `contours.type` is "constraint".
- Defaults to a half-transparent variant of the line
- color, marker color, or marker line color, whichever is
- available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.contour.Hoverlabel`
- instance or dict with compatible properties
- hoverongaps
- Determines whether or not gaps (i.e. {nan} or missing
- values) in the `z` data have hover labels associated
- with them.
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.contour.Line` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- ncontours
- Sets the maximum number of contour levels. The actual
- number of contours will be chosen automatically to be
- less than or equal to the value of `ncontours`. Has an
- effect only if `autocontour` is True or if
- `contours.size` is missing.
- opacity
- Sets the opacity of the trace.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.contour.Stream` instance
- or dict with compatible properties
- text
- Sets the text elements associated with each z value.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- transpose
- Transposes the z data.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- xtype
- If "array", the heatmap's x coordinates are given by
- "x" (the default behavior when `x` is provided). If
- "scaled", the heatmap's x coordinates are given by "x0"
- and "dx" (the default behavior when `x` is not
- provided).
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- ytype
- If "array", the heatmap's y coordinates are given by
- "y" (the default behavior when `y` is provided) If
- "scaled", the heatmap's y coordinates are given by "y0"
- and "dy" (the default behavior when `y` is not
- provided)
- z
- Sets the z data.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zhoverformat
- Sets the hover text formatting rule using d3 formatting
- mini-languages which are very similar to those in
- Python. See: https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Contour
- """
- super(Contour, self).__init__("contour")
-
- # 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.Contour
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Contour`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import contour as v_contour
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_contour.AutocolorscaleValidator()
- self._validators["autocontour"] = v_contour.AutocontourValidator()
- self._validators["coloraxis"] = v_contour.ColoraxisValidator()
- self._validators["colorbar"] = v_contour.ColorBarValidator()
- self._validators["colorscale"] = v_contour.ColorscaleValidator()
- self._validators["connectgaps"] = v_contour.ConnectgapsValidator()
- self._validators["contours"] = v_contour.ContoursValidator()
- self._validators["customdata"] = v_contour.CustomdataValidator()
- self._validators["customdatasrc"] = v_contour.CustomdatasrcValidator()
- self._validators["dx"] = v_contour.DxValidator()
- self._validators["dy"] = v_contour.DyValidator()
- self._validators["fillcolor"] = v_contour.FillcolorValidator()
- self._validators["hoverinfo"] = v_contour.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_contour.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_contour.HoverlabelValidator()
- self._validators["hoverongaps"] = v_contour.HoverongapsValidator()
- self._validators["hovertemplate"] = v_contour.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_contour.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_contour.HovertextValidator()
- self._validators["hovertextsrc"] = v_contour.HovertextsrcValidator()
- self._validators["ids"] = v_contour.IdsValidator()
- self._validators["idssrc"] = v_contour.IdssrcValidator()
- self._validators["legendgroup"] = v_contour.LegendgroupValidator()
- self._validators["line"] = v_contour.LineValidator()
- self._validators["meta"] = v_contour.MetaValidator()
- self._validators["metasrc"] = v_contour.MetasrcValidator()
- self._validators["name"] = v_contour.NameValidator()
- self._validators["ncontours"] = v_contour.NcontoursValidator()
- self._validators["opacity"] = v_contour.OpacityValidator()
- self._validators["reversescale"] = v_contour.ReversescaleValidator()
- self._validators["showlegend"] = v_contour.ShowlegendValidator()
- self._validators["showscale"] = v_contour.ShowscaleValidator()
- self._validators["stream"] = v_contour.StreamValidator()
- self._validators["text"] = v_contour.TextValidator()
- self._validators["textsrc"] = v_contour.TextsrcValidator()
- self._validators["transpose"] = v_contour.TransposeValidator()
- self._validators["uid"] = v_contour.UidValidator()
- self._validators["uirevision"] = v_contour.UirevisionValidator()
- self._validators["visible"] = v_contour.VisibleValidator()
- self._validators["x"] = v_contour.XValidator()
- self._validators["x0"] = v_contour.X0Validator()
- self._validators["xaxis"] = v_contour.XAxisValidator()
- self._validators["xcalendar"] = v_contour.XcalendarValidator()
- self._validators["xsrc"] = v_contour.XsrcValidator()
- self._validators["xtype"] = v_contour.XtypeValidator()
- self._validators["y"] = v_contour.YValidator()
- self._validators["y0"] = v_contour.Y0Validator()
- self._validators["yaxis"] = v_contour.YAxisValidator()
- self._validators["ycalendar"] = v_contour.YcalendarValidator()
- self._validators["ysrc"] = v_contour.YsrcValidator()
- self._validators["ytype"] = v_contour.YtypeValidator()
- self._validators["z"] = v_contour.ZValidator()
- self._validators["zauto"] = v_contour.ZautoValidator()
- self._validators["zhoverformat"] = v_contour.ZhoverformatValidator()
- self._validators["zmax"] = v_contour.ZmaxValidator()
- self._validators["zmid"] = v_contour.ZmidValidator()
- self._validators["zmin"] = v_contour.ZminValidator()
- self._validators["zsrc"] = v_contour.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("autocontour", None)
- self["autocontour"] = autocontour if autocontour is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("connectgaps", None)
- self["connectgaps"] = connectgaps if connectgaps is not None else _v
- _v = arg.pop("contours", None)
- self["contours"] = contours if contours is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoverongaps", None)
- self["hoverongaps"] = hoverongaps if hoverongaps is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("ncontours", None)
- self["ncontours"] = ncontours if ncontours is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("transpose", None)
- self["transpose"] = transpose if transpose is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("xtype", None)
- self["xtype"] = xtype if xtype is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("ytype", None)
- self["ytype"] = ytype if ytype is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zhoverformat", None)
- self["zhoverformat"] = zhoverformat if zhoverformat is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "contour"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="contour", val="contour"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Cone(_BaseTraceType):
-
- # anchor
- # ------
- @property
- def anchor(self):
- """
- Sets the cones' anchor with respect to their x/y/z positions.
- Note that "cm" denote the cone's center of mass which
- corresponds to 1/4 from the tail to tip.
-
- The 'anchor' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['tip', 'tail', 'cm', 'center']
-
- Returns
- -------
- Any
- """
- return self["anchor"]
-
- @anchor.setter
- def anchor(self, val):
- self["anchor"] = val
-
- # 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. 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 u/v/w norm 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.cone.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.cone.co
- lorbar.Tickformatstop` instances or dicts with
- compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.cone.colorbar.tickformatstopdefaults), sets
- the default property values to use for elements
- of cone.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.cone.colorbar.Titl
- e` instance or dict with compatible properties
- titlefont
- Deprecated: Please use cone.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 cone.colorbar.title.side
- instead. Determines the location of color bar's
- title with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.cone.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.cone.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.cone.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variable `norm` Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # lighting
- # --------
- @property
- def lighting(self):
- """
- The 'lighting' property is an instance of Lighting
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.cone.Lighting`
- - A dict of string/value properties that will be passed
- to the Lighting constructor
-
- Supported dict properties:
-
- ambient
- Ambient light increases overall color
- visibility but can wash out the image.
- diffuse
- Represents the extent that incident rays are
- reflected in a range of angles.
- facenormalsepsilon
- Epsilon for face normals calculation avoids
- math issues arising from degenerate geometry.
- fresnel
- Represents the reflectance as a dependency of
- the viewing angle; e.g. paper is reflective
- when viewing it from the edge of the paper
- (almost 90 degrees), causing shine.
- roughness
- Alters specular reflection; the rougher the
- surface, the wider and less contrasty the
- shine.
- specular
- Represents the level that incident rays are
- reflected in a single direction, causing shine.
- vertexnormalsepsilon
- Epsilon for vertex normals calculation avoids
- math issues arising from degenerate geometry.
-
- Returns
- -------
- plotly.graph_objs.cone.Lighting
- """
- return self["lighting"]
-
- @lighting.setter
- def lighting(self, val):
- self["lighting"] = val
-
- # lightposition
- # -------------
- @property
- def lightposition(self):
- """
- The 'lightposition' property is an instance of Lightposition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.cone.Lightposition`
- - A dict of string/value properties that will be passed
- to the Lightposition constructor
-
- Supported dict properties:
-
- x
- Numeric vector, representing the X coordinate
- for each vertex.
- y
- Numeric vector, representing the Y coordinate
- for each vertex.
- z
- Numeric vector, representing the Z coordinate
- for each vertex.
-
- Returns
- -------
- plotly.graph_objs.cone.Lightposition
- """
- return self["lightposition"]
-
- @lightposition.setter
- def lightposition(self, val):
- self["lightposition"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 surface. Please note that in the case
- of using high `opacity` values for example a value greater than
- or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
- an overlay of multiple transparent surfaces may not perfectly
- be sorted in depth by the webgl API. This behavior may be
- improved in the near future and is subject to change.
-
- 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
-
- # 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
-
- # scene
- # -----
- @property
- def scene(self):
- """
- Sets a reference between this trace's 3D coordinate system and
- a 3D scene. If "scene" (the default value), the (x,y,z)
- coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
- coordinates refer to `layout.scene2`, and so on.
-
- The 'scene' property is an identifier of a particular
- subplot, of type 'scene', that may be specified as the string 'scene'
- optionally followed by an integer >= 1
- (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
-
- Returns
- -------
- str
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # sizemode
- # --------
- @property
- def sizemode(self):
- """
- Determines whether `sizeref` is set as a "scaled" (i.e
- unitless) scalar (normalized by the max u/v/w norm in the
- vector field) or as "absolute" value (in the same units as the
- vector field).
-
- The 'sizemode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['scaled', 'absolute']
-
- Returns
- -------
- Any
- """
- return self["sizemode"]
-
- @sizemode.setter
- def sizemode(self, val):
- self["sizemode"] = val
-
- # sizeref
- # -------
- @property
- def sizeref(self):
- """
- Adjusts the cone size scaling. The size of the cones is
- determined by their u/v/w norm multiplied a factor and
- `sizeref`. This factor (computed internally) corresponds to the
- minimum "time" to travel across two successive x/y/z positions
- at the average velocity of those two successive positions. All
- cones in a given trace use the same factor. With `sizemode` set
- to "scaled", `sizeref` is unitless, its default value is 0.5
- With `sizemode` set to "absolute", `sizeref` has the same units
- as the u/v/w vector field, its the default value is half the
- sample's maximum vector norm.
-
- The 'sizeref' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
-
- Returns
- -------
- int|float
- """
- return self["sizeref"]
-
- @sizeref.setter
- def sizeref(self, val):
- self["sizeref"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.cone.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.cone.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with the cones. If trace
- `hoverinfo` contains a "text" flag and "hovertext" is not set,
- these elements will be seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # u
- # -
- @property
- def u(self):
- """
- Sets the x components of the vector field.
-
- The 'u' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["u"]
-
- @u.setter
- def u(self, val):
- self["u"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # usrc
- # ----
- @property
- def usrc(self):
- """
- Sets the source reference on Chart Studio Cloud for u .
-
- The 'usrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["usrc"]
-
- @usrc.setter
- def usrc(self, val):
- self["usrc"] = val
-
- # v
- # -
- @property
- def v(self):
- """
- Sets the y components of the vector field.
-
- The 'v' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["v"]
-
- @v.setter
- def v(self, val):
- self["v"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # vsrc
- # ----
- @property
- def vsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for v .
-
- The 'vsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["vsrc"]
-
- @vsrc.setter
- def vsrc(self, val):
- self["vsrc"] = val
-
- # w
- # -
- @property
- def w(self):
- """
- Sets the z components of the vector field.
-
- The 'w' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["w"]
-
- @w.setter
- def w(self, val):
- self["w"] = val
-
- # wsrc
- # ----
- @property
- def wsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for w .
-
- The 'wsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["wsrc"]
-
- @wsrc.setter
- def wsrc(self, val):
- self["wsrc"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates of the vector field and of the displayed
- cones.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates of the vector field and of the displayed
- cones.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the z coordinates of the vector field and of the displayed
- cones.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- anchor
- Sets the cones' anchor with respect to their x/y/z
- positions. Note that "cm" denote the cone's center of
- mass which corresponds to 1/4 from the tail to tip.
- 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as u/v/w norm and if set, `cmax`
- must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.cone.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.cone.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `norm` Anything contained in
- tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.cone.Lighting` instance or
- dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.cone.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- sizemode
- Determines whether `sizeref` is set as a "scaled" (i.e
- unitless) scalar (normalized by the max u/v/w norm in
- the vector field) or as "absolute" value (in the same
- units as the vector field).
- sizeref
- Adjusts the cone size scaling. The size of the cones is
- determined by their u/v/w norm multiplied a factor and
- `sizeref`. This factor (computed internally)
- corresponds to the minimum "time" to travel across two
- successive x/y/z positions at the average velocity of
- those two successive positions. All cones in a given
- trace use the same factor. With `sizemode` set to
- "scaled", `sizeref` is unitless, its default value is
- 0.5 With `sizemode` set to "absolute", `sizeref` has
- the same units as the u/v/w vector field, its the
- default value is half the sample's maximum vector norm.
- stream
- :class:`plotly.graph_objects.cone.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with the cones. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- u
- Sets the x components of the vector field.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- usrc
- Sets the source reference on Chart Studio Cloud for u
- .
- v
- Sets the y components of the vector field.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- vsrc
- Sets the source reference on Chart Studio Cloud for v
- .
- w
- Sets the z components of the vector field.
- wsrc
- Sets the source reference on Chart Studio Cloud for w
- .
- x
- Sets the x coordinates of the vector field and of the
- displayed cones.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates of the vector field and of the
- displayed cones.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates of the vector field and of the
- displayed cones.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- anchor=None,
- autocolorscale=None,
- cauto=None,
- cmax=None,
- cmid=None,
- cmin=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- lighting=None,
- lightposition=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- reversescale=None,
- scene=None,
- showlegend=None,
- showscale=None,
- sizemode=None,
- sizeref=None,
- stream=None,
- text=None,
- textsrc=None,
- u=None,
- uid=None,
- uirevision=None,
- usrc=None,
- v=None,
- visible=None,
- vsrc=None,
- w=None,
- wsrc=None,
- x=None,
- xsrc=None,
- y=None,
- ysrc=None,
- z=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Cone object
-
- Use cone traces to visualize vector fields. Specify a vector
- field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and
- 3 vector component arrays `u`, `v`, `w`. The cones are drawn
- exactly at the positions given by `x`, `y` and `z`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Cone`
- anchor
- Sets the cones' anchor with respect to their x/y/z
- positions. Note that "cm" denote the cone's center of
- mass which corresponds to 1/4 from the tail to tip.
- 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
- effect when `cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Value should
- have the same units as u/v/w norm and if set, `cmax`
- must be set as well.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.cone.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: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.cone.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `norm` Anything contained in
- tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- lighting
- :class:`plotly.graph_objects.cone.Lighting` instance or
- dict with compatible properties
- lightposition
- :class:`plotly.graph_objects.cone.Lightposition`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the surface. Please note that in
- the case of using high `opacity` values for example a
- value greater than or equal to 0.5 on two surfaces (and
- 0.25 with four surfaces), an overlay of multiple
- transparent surfaces may not perfectly be sorted in
- depth by the webgl API. This behavior may be improved
- in the near future and is subject to change.
- 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.
- scene
- Sets a reference between this trace's 3D coordinate
- system and a 3D scene. If "scene" (the default value),
- the (x,y,z) coordinates refer to `layout.scene`. If
- "scene2", the (x,y,z) coordinates refer to
- `layout.scene2`, and so on.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- sizemode
- Determines whether `sizeref` is set as a "scaled" (i.e
- unitless) scalar (normalized by the max u/v/w norm in
- the vector field) or as "absolute" value (in the same
- units as the vector field).
- sizeref
- Adjusts the cone size scaling. The size of the cones is
- determined by their u/v/w norm multiplied a factor and
- `sizeref`. This factor (computed internally)
- corresponds to the minimum "time" to travel across two
- successive x/y/z positions at the average velocity of
- those two successive positions. All cones in a given
- trace use the same factor. With `sizemode` set to
- "scaled", `sizeref` is unitless, its default value is
- 0.5 With `sizemode` set to "absolute", `sizeref` has
- the same units as the u/v/w vector field, its the
- default value is half the sample's maximum vector norm.
- stream
- :class:`plotly.graph_objects.cone.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with the cones. If
- trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- u
- Sets the x components of the vector field.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- usrc
- Sets the source reference on Chart Studio Cloud for u
- .
- v
- Sets the y components of the vector field.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- vsrc
- Sets the source reference on Chart Studio Cloud for v
- .
- w
- Sets the z components of the vector field.
- wsrc
- Sets the source reference on Chart Studio Cloud for w
- .
- x
- Sets the x coordinates of the vector field and of the
- displayed cones.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates of the vector field and of the
- displayed cones.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- z
- Sets the z coordinates of the vector field and of the
- displayed cones.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Cone
- """
- super(Cone, self).__init__("cone")
-
- # 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.Cone
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Cone`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import cone as v_cone
-
- # Initialize validators
- # ---------------------
- self._validators["anchor"] = v_cone.AnchorValidator()
- self._validators["autocolorscale"] = v_cone.AutocolorscaleValidator()
- self._validators["cauto"] = v_cone.CautoValidator()
- self._validators["cmax"] = v_cone.CmaxValidator()
- self._validators["cmid"] = v_cone.CmidValidator()
- self._validators["cmin"] = v_cone.CminValidator()
- self._validators["coloraxis"] = v_cone.ColoraxisValidator()
- self._validators["colorbar"] = v_cone.ColorBarValidator()
- self._validators["colorscale"] = v_cone.ColorscaleValidator()
- self._validators["customdata"] = v_cone.CustomdataValidator()
- self._validators["customdatasrc"] = v_cone.CustomdatasrcValidator()
- self._validators["hoverinfo"] = v_cone.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_cone.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_cone.HoverlabelValidator()
- self._validators["hovertemplate"] = v_cone.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_cone.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_cone.HovertextValidator()
- self._validators["hovertextsrc"] = v_cone.HovertextsrcValidator()
- self._validators["ids"] = v_cone.IdsValidator()
- self._validators["idssrc"] = v_cone.IdssrcValidator()
- self._validators["legendgroup"] = v_cone.LegendgroupValidator()
- self._validators["lighting"] = v_cone.LightingValidator()
- self._validators["lightposition"] = v_cone.LightpositionValidator()
- self._validators["meta"] = v_cone.MetaValidator()
- self._validators["metasrc"] = v_cone.MetasrcValidator()
- self._validators["name"] = v_cone.NameValidator()
- self._validators["opacity"] = v_cone.OpacityValidator()
- self._validators["reversescale"] = v_cone.ReversescaleValidator()
- self._validators["scene"] = v_cone.SceneValidator()
- self._validators["showlegend"] = v_cone.ShowlegendValidator()
- self._validators["showscale"] = v_cone.ShowscaleValidator()
- self._validators["sizemode"] = v_cone.SizemodeValidator()
- self._validators["sizeref"] = v_cone.SizerefValidator()
- self._validators["stream"] = v_cone.StreamValidator()
- self._validators["text"] = v_cone.TextValidator()
- self._validators["textsrc"] = v_cone.TextsrcValidator()
- self._validators["u"] = v_cone.UValidator()
- self._validators["uid"] = v_cone.UidValidator()
- self._validators["uirevision"] = v_cone.UirevisionValidator()
- self._validators["usrc"] = v_cone.UsrcValidator()
- self._validators["v"] = v_cone.VValidator()
- self._validators["visible"] = v_cone.VisibleValidator()
- self._validators["vsrc"] = v_cone.VsrcValidator()
- self._validators["w"] = v_cone.WValidator()
- self._validators["wsrc"] = v_cone.WsrcValidator()
- self._validators["x"] = v_cone.XValidator()
- self._validators["xsrc"] = v_cone.XsrcValidator()
- self._validators["y"] = v_cone.YValidator()
- self._validators["ysrc"] = v_cone.YsrcValidator()
- self._validators["z"] = v_cone.ZValidator()
- self._validators["zsrc"] = v_cone.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("anchor", None)
- self["anchor"] = anchor if anchor is not None else _v
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("cauto", None)
- self["cauto"] = cauto if cauto is not None else _v
- _v = arg.pop("cmax", None)
- self["cmax"] = cmax if cmax is not None else _v
- _v = arg.pop("cmid", None)
- self["cmid"] = cmid if cmid is not None else _v
- _v = arg.pop("cmin", None)
- self["cmin"] = cmin if cmin is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("lighting", None)
- self["lighting"] = lighting if lighting is not None else _v
- _v = arg.pop("lightposition", None)
- self["lightposition"] = lightposition if lightposition is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("sizemode", None)
- self["sizemode"] = sizemode if sizemode is not None else _v
- _v = arg.pop("sizeref", None)
- self["sizeref"] = sizeref if sizeref is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("u", None)
- self["u"] = u if u is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("usrc", None)
- self["usrc"] = usrc if usrc is not None else _v
- _v = arg.pop("v", None)
- self["v"] = v if v is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("vsrc", None)
- self["vsrc"] = vsrc if vsrc is not None else _v
- _v = arg.pop("w", None)
- self["w"] = w if w is not None else _v
- _v = arg.pop("wsrc", None)
- self["wsrc"] = wsrc if wsrc is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "cone"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="cone", val="cone"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Choroplethmapbox(_BaseTraceType):
-
- # 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
-
- # below
- # -----
- @property
- def below(self):
- """
- Determines if the choropleth polygons will be inserted before
- the layer with the specified ID. By default, choroplethmapbox
- traces are placed above the water layers. If 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.choroplethmapbox.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.choropl
- ethmapbox.colorbar.Tickformatstop` instances or
- dicts with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.choroplethmapbox.colorbar.tickformatstopdefau
- lts), sets the default property values to use
- for elements of
- choroplethmapbox.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.choroplethmapbox.c
- olorbar.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- choroplethmapbox.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
- choroplethmapbox.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.choroplethmapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # featureidkey
- # ------------
- @property
- def featureidkey(self):
- """
- Sets the key in GeoJSON features which is used as id to match
- the items included in the `locations` array. Support nested
- property, for example "properties.name".
-
- The 'featureidkey' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["featureidkey"]
-
- @featureidkey.setter
- def featureidkey(self, val):
- self["featureidkey"] = val
-
- # geojson
- # -------
- @property
- def geojson(self):
- """
- Sets the GeoJSON data associated with this trace. It can be set
- as a valid GeoJSON object or as a URL string. Note that we only
- accept GeoJSONs of type "FeatureCollection" or "Feature" with
- geometries of type "Polygon" or "MultiPolygon".
-
- The 'geojson' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["geojson"]
-
- @geojson.setter
- def geojson(self, val):
- self["geojson"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'location+z')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.choroplethmapbox.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variable `properties` Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # locations
- # ---------
- @property
- def locations(self):
- """
- Sets which features found in "geojson" to plot using their
- feature `id` field.
-
- The 'locations' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["locations"]
-
- @locations.setter
- def locations(self, val):
- self["locations"] = val
-
- # locationssrc
- # ------------
- @property
- def locationssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for locations
- .
-
- The 'locationssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["locationssrc"]
-
- @locationssrc.setter
- def locationssrc(self, val):
- self["locationssrc"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- line
- :class:`plotly.graph_objects.choroplethmapbox.m
- arker.Line` instance or dict with compatible
- properties
- opacity
- Sets the opacity of the locations.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
-
- Returns
- -------
- plotly.graph_objs.choroplethmapbox.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.choroplethmapbox.s
- elected.Marker` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.choroplethmapbox.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.choroplethmapbox.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- mapbox subplot. If "mapbox" (the default value), the data refer
- to `layout.mapbox`. If "mapbox2", the data refer to
- `layout.mapbox2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'mapbox', that may be specified as the string 'mapbox'
- optionally followed by an integer >= 1
- (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each location.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.choroplethmapbox.u
- nselected.Marker` instance or dict with
- compatible properties
-
- Returns
- -------
- plotly.graph_objs.choroplethmapbox.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the color values.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- below
- Determines if the choropleth polygons will be inserted
- before the layer with the specified ID. By default,
- choroplethmapbox traces are placed above the water
- layers. If set to '', the layer will be inserted above
- every existing layer.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.choroplethmapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array.
- Support nested property, for example "properties.name".
- geojson
- Sets the GeoJSON data associated with this trace. It
- can be set as a valid GeoJSON object or as a URL
- string. Note that we only accept GeoJSONs of type
- "FeatureCollection" or "Feature" with geometries of
- type "Polygon" or "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe
- l` instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `properties` Anything contained
- in tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- locations
- Sets which features found in "geojson" to plot using
- their feature `id` field.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- marker
- :class:`plotly.graph_objects.choroplethmapbox.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- selected
- :class:`plotly.graph_objects.choroplethmapbox.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.choroplethmapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets the text elements associated with each location.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.choroplethmapbox.Unselecte
- d` instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the color values.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- below=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- featureidkey=None,
- geojson=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- locations=None,
- locationssrc=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- reversescale=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- showscale=None,
- stream=None,
- subplot=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- z=None,
- zauto=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Choroplethmapbox object
-
- GeoJSON features to be filled are set in `geojson` The data
- that describes the choropleth value-to-color mapping is set in
- `locations` and `z`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of
- :class:`plotly.graph_objs.Choroplethmapbox`
- 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.
- below
- Determines if the choropleth polygons will be inserted
- before the layer with the specified ID. By default,
- choroplethmapbox traces are placed above the water
- layers. If set to '', the layer will be inserted above
- every existing layer.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.choroplethmapbox.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array.
- Support nested property, for example "properties.name".
- geojson
- Sets the GeoJSON data associated with this trace. It
- can be set as a valid GeoJSON object or as a URL
- string. Note that we only accept GeoJSONs of type
- "FeatureCollection" or "Feature" with geometries of
- type "Polygon" or "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe
- l` instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variable `properties` Anything contained
- in tag `` is displayed in the secondary box, for
- example "{fullData.name}". To hide the
- secondary box completely, use an empty tag
- ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- locations
- Sets which features found in "geojson" to plot using
- their feature `id` field.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- marker
- :class:`plotly.graph_objects.choroplethmapbox.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- selected
- :class:`plotly.graph_objects.choroplethmapbox.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.choroplethmapbox.Stream`
- instance or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a mapbox subplot. If "mapbox" (the default value),
- the data refer to `layout.mapbox`. If "mapbox2", the
- data refer to `layout.mapbox2`, and so on.
- text
- Sets the text elements associated with each location.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.choroplethmapbox.Unselecte
- d` instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the color values.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Choroplethmapbox
- """
- super(Choroplethmapbox, self).__init__("choroplethmapbox")
-
- # 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.Choroplethmapbox
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Choroplethmapbox`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import choroplethmapbox as v_choroplethmapbox
-
- # Initialize validators
- # ---------------------
- self._validators[
- "autocolorscale"
- ] = v_choroplethmapbox.AutocolorscaleValidator()
- self._validators["below"] = v_choroplethmapbox.BelowValidator()
- self._validators["coloraxis"] = v_choroplethmapbox.ColoraxisValidator()
- self._validators["colorbar"] = v_choroplethmapbox.ColorBarValidator()
- self._validators["colorscale"] = v_choroplethmapbox.ColorscaleValidator()
- self._validators["customdata"] = v_choroplethmapbox.CustomdataValidator()
- self._validators["customdatasrc"] = v_choroplethmapbox.CustomdatasrcValidator()
- self._validators["featureidkey"] = v_choroplethmapbox.FeatureidkeyValidator()
- self._validators["geojson"] = v_choroplethmapbox.GeojsonValidator()
- self._validators["hoverinfo"] = v_choroplethmapbox.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_choroplethmapbox.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_choroplethmapbox.HoverlabelValidator()
- self._validators["hovertemplate"] = v_choroplethmapbox.HovertemplateValidator()
- self._validators[
- "hovertemplatesrc"
- ] = v_choroplethmapbox.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_choroplethmapbox.HovertextValidator()
- self._validators["hovertextsrc"] = v_choroplethmapbox.HovertextsrcValidator()
- self._validators["ids"] = v_choroplethmapbox.IdsValidator()
- self._validators["idssrc"] = v_choroplethmapbox.IdssrcValidator()
- self._validators["legendgroup"] = v_choroplethmapbox.LegendgroupValidator()
- self._validators["locations"] = v_choroplethmapbox.LocationsValidator()
- self._validators["locationssrc"] = v_choroplethmapbox.LocationssrcValidator()
- self._validators["marker"] = v_choroplethmapbox.MarkerValidator()
- self._validators["meta"] = v_choroplethmapbox.MetaValidator()
- self._validators["metasrc"] = v_choroplethmapbox.MetasrcValidator()
- self._validators["name"] = v_choroplethmapbox.NameValidator()
- self._validators["reversescale"] = v_choroplethmapbox.ReversescaleValidator()
- self._validators["selected"] = v_choroplethmapbox.SelectedValidator()
- self._validators[
- "selectedpoints"
- ] = v_choroplethmapbox.SelectedpointsValidator()
- self._validators["showlegend"] = v_choroplethmapbox.ShowlegendValidator()
- self._validators["showscale"] = v_choroplethmapbox.ShowscaleValidator()
- self._validators["stream"] = v_choroplethmapbox.StreamValidator()
- self._validators["subplot"] = v_choroplethmapbox.SubplotValidator()
- self._validators["text"] = v_choroplethmapbox.TextValidator()
- self._validators["textsrc"] = v_choroplethmapbox.TextsrcValidator()
- self._validators["uid"] = v_choroplethmapbox.UidValidator()
- self._validators["uirevision"] = v_choroplethmapbox.UirevisionValidator()
- self._validators["unselected"] = v_choroplethmapbox.UnselectedValidator()
- self._validators["visible"] = v_choroplethmapbox.VisibleValidator()
- self._validators["z"] = v_choroplethmapbox.ZValidator()
- self._validators["zauto"] = v_choroplethmapbox.ZautoValidator()
- self._validators["zmax"] = v_choroplethmapbox.ZmaxValidator()
- self._validators["zmid"] = v_choroplethmapbox.ZmidValidator()
- self._validators["zmin"] = v_choroplethmapbox.ZminValidator()
- self._validators["zsrc"] = v_choroplethmapbox.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("below", None)
- self["below"] = below if below is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("featureidkey", None)
- self["featureidkey"] = featureidkey if featureidkey is not None else _v
- _v = arg.pop("geojson", None)
- self["geojson"] = geojson if geojson is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("locations", None)
- self["locations"] = locations if locations is not None else _v
- _v = arg.pop("locationssrc", None)
- self["locationssrc"] = locationssrc if locationssrc is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "choroplethmapbox"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="choroplethmapbox", val="choroplethmapbox"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Choropleth(_BaseTraceType):
-
- # 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
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- Sets a reference to a shared color axis. References to these
- shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
- etc. Settings for these shared color axes are set in the
- layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
- Note that multiple color scales can be linked to the same color
- axis.
-
- The 'coloraxis' property is an identifier of a particular
- subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
- optionally followed by an integer >= 1
- (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
-
- Returns
- -------
- str
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = 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.choropleth.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", 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" 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.
- 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".
- 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* (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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.choropl
- eth.colorbar.Tickformatstop` instances or dicts
- with compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.choropleth.colorbar.tickformatstopdefaults),
- sets the default property values to use for
- elements of choropleth.colorbar.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- ticksuffix
- Sets a tick label suffix.
- ticktext
- Sets the text displayed at the ticks position
- via `tickvals`. Only has an effect if
- `tickmode` is set to "array". Used with
- `tickvals`.
- ticktextsrc
- Sets the source reference on Chart Studio Cloud
- for ticktext .
- tickvals
- Sets the values at which ticks on this axis
- appear. Only has an effect if `tickmode` is set
- to "array". Used with `ticktext`.
- tickvalssrc
- Sets the source reference on Chart Studio Cloud
- for tickvals .
- tickwidth
- Sets the tick width (in px).
- title
- :class:`plotly.graph_objects.choropleth.colorba
- r.Title` instance or dict with compatible
- properties
- titlefont
- Deprecated: Please use
- choropleth.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
- choropleth.colorbar.title.side instead.
- Determines the location of color bar's title
- with respect to the color bar. 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).
- 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.
- xpad
- Sets the amount of padding (in px) along the x
- direction.
- y
- Sets the y position of the color bar (in plot
- fraction).
- 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.
- ypad
- Sets the amount of padding (in px) along the y
- direction.
-
- Returns
- -------
- plotly.graph_objs.choropleth.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name string of the
- following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
- ridis,Cividis.
-
- 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', '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', '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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # featureidkey
- # ------------
- @property
- def featureidkey(self):
- """
- Sets the key in GeoJSON features which is used as id to match
- the items included in the `locations` array. Only has an effect
- when `geojson` is set. Support nested property, for example
- "properties.name".
-
- The 'featureidkey' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["featureidkey"]
-
- @featureidkey.setter
- def featureidkey(self, val):
- self["featureidkey"] = val
-
- # geo
- # ---
- @property
- def geo(self):
- """
- Sets a reference between this trace's geospatial coordinates
- and a geographic map. If "geo" (the default value), the
- geospatial coordinates refer to `layout.geo`. If "geo2", the
- geospatial coordinates refer to `layout.geo2`, and so on.
-
- The 'geo' property is an identifier of a particular
- subplot, of type 'geo', that may be specified as the string 'geo'
- optionally followed by an integer >= 1
- (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.)
-
- Returns
- -------
- str
- """
- return self["geo"]
-
- @geo.setter
- def geo(self, val):
- self["geo"] = val
-
- # geojson
- # -------
- @property
- def geojson(self):
- """
- Sets optional GeoJSON data associated with this trace. If not
- given, the features on the base map are used. It can be set as
- a valid GeoJSON object or as a URL string. Note that we only
- accept GeoJSONs of type "FeatureCollection" or "Feature" with
- geometries of type "Polygon" or "MultiPolygon".
-
- The 'geojson' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["geojson"]
-
- @geojson.setter
- def geojson(self, val):
- self["geojson"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'location+z')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.choropleth.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # locationmode
- # ------------
- @property
- def locationmode(self):
- """
- Determines the set of locations used to match entries in
- `locations` to regions on the map. Values "ISO-3", "USA-
- states", *country names* correspond to features on the base map
- and value "geojson-id" corresponds to features from a custom
- GeoJSON linked to the `geojson` attribute.
-
- The 'locationmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['ISO-3', 'USA-states', 'country names', 'geojson-id']
-
- Returns
- -------
- Any
- """
- return self["locationmode"]
-
- @locationmode.setter
- def locationmode(self, val):
- self["locationmode"] = val
-
- # locations
- # ---------
- @property
- def locations(self):
- """
- Sets the coordinates via location IDs or names. See
- `locationmode` for more info.
-
- The 'locations' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["locations"]
-
- @locations.setter
- def locations(self, val):
- self["locations"] = val
-
- # locationssrc
- # ------------
- @property
- def locationssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for locations
- .
-
- The 'locationssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["locationssrc"]
-
- @locationssrc.setter
- def locationssrc(self, val):
- self["locationssrc"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choropleth.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- line
- :class:`plotly.graph_objects.choropleth.marker.
- Line` instance or dict with compatible
- properties
- opacity
- Sets the opacity of the locations.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
-
- Returns
- -------
- plotly.graph_objs.choropleth.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # reversescale
- # ------------
- @property
- def reversescale(self):
- """
- Reverses the color mapping if true. If true, `zmin` will
- correspond to the last color in the array and `zmax` 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
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choropleth.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.choropleth.selecte
- d.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.choropleth.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choropleth.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.choropleth.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each location.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.choropleth.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.choropleth.unselec
- ted.Marker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.choropleth.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # z
- # -
- @property
- def z(self):
- """
- Sets the color values.
-
- The 'z' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["z"]
-
- @z.setter
- def z(self, val):
- self["z"] = val
-
- # zauto
- # -----
- @property
- def zauto(self):
- """
- Determines whether or not the color domain is computed with
- respect to the input data (here in `z`) or the bounds set in
- `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
- are set by the user.
-
- The 'zauto' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["zauto"]
-
- @zauto.setter
- def zauto(self, val):
- self["zauto"] = val
-
- # zmax
- # ----
- @property
- def zmax(self):
- """
- Sets the upper bound of the color domain. Value should have the
- same units as in `z` and if set, `zmin` must be set as well.
-
- The 'zmax' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmax"]
-
- @zmax.setter
- def zmax(self, val):
- self["zmax"] = val
-
- # zmid
- # ----
- @property
- def zmid(self):
- """
- Sets the mid-point of the color domain by scaling `zmin` and/or
- `zmax` to be equidistant to this point. Value should have the
- same units as in `z`. Has no effect when `zauto` is `false`.
-
- The 'zmid' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmid"]
-
- @zmid.setter
- def zmid(self, val):
- self["zmid"] = val
-
- # zmin
- # ----
- @property
- def zmin(self):
- """
- Sets the lower bound of the color domain. Value should have the
- same units as in `z` and if set, `zmax` must be set as well.
-
- The 'zmin' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["zmin"]
-
- @zmin.setter
- def zmin(self, val):
- self["zmin"] = val
-
- # zsrc
- # ----
- @property
- def zsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for z .
-
- The 'zsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["zsrc"]
-
- @zsrc.setter
- def zsrc(self, val):
- self["zsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.choropleth.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array. Only
- has an effect when `geojson` is set. Support nested
- property, for example "properties.name".
- geo
- Sets a reference between this trace's geospatial
- coordinates and a geographic map. If "geo" (the default
- value), the geospatial coordinates refer to
- `layout.geo`. If "geo2", the geospatial coordinates
- refer to `layout.geo2`, and so on.
- geojson
- Sets optional GeoJSON data associated with this trace.
- If not given, the features on the base map are used. It
- can be set as a valid GeoJSON object or as a URL
- string. Note that we only accept GeoJSONs of type
- "FeatureCollection" or "Feature" with geometries of
- type "Polygon" or "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.choropleth.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- locationmode
- Determines the set of locations used to match entries
- in `locations` to regions on the map. Values "ISO-3",
- "USA-states", *country names* correspond to features on
- the base map and value "geojson-id" corresponds to
- features from a custom GeoJSON linked to the `geojson`
- attribute.
- locations
- Sets the coordinates via location IDs or names. See
- `locationmode` for more info.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- marker
- :class:`plotly.graph_objects.choropleth.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- selected
- :class:`plotly.graph_objects.choropleth.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.choropleth.Stream`
- instance or dict with compatible properties
- text
- Sets the text elements associated with each location.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.choropleth.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the color values.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
- """
-
- def __init__(
- self,
- arg=None,
- autocolorscale=None,
- coloraxis=None,
- colorbar=None,
- colorscale=None,
- customdata=None,
- customdatasrc=None,
- featureidkey=None,
- geo=None,
- geojson=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- locationmode=None,
- locations=None,
- locationssrc=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- reversescale=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- showscale=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- z=None,
- zauto=None,
- zmax=None,
- zmid=None,
- zmin=None,
- zsrc=None,
- **kwargs
- ):
- """
- Construct a new Choropleth object
-
- The data that describes the choropleth value-to-color mapping
- is set in `z`. The geographic locations corresponding to each
- value in `z` are set in `locations`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Choropleth`
- 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.
- coloraxis
- Sets a reference to a shared color axis. References to
- these shared color axes are "coloraxis", "coloraxis2",
- "coloraxis3", etc. Settings for these shared color axes
- are set in the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple color
- scales can be linked to the same color axis.
- colorbar
- :class:`plotly.graph_objects.choropleth.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`zmin` and `zmax`.
- Alternatively, `colorscale` may be a palette name
- string of the following list: Greys,YlGnBu,Greens,YlOrR
- d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
- ot,Blackbody,Earth,Electric,Viridis,Cividis.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- featureidkey
- Sets the key in GeoJSON features which is used as id to
- match the items included in the `locations` array. Only
- has an effect when `geojson` is set. Support nested
- property, for example "properties.name".
- geo
- Sets a reference between this trace's geospatial
- coordinates and a geographic map. If "geo" (the default
- value), the geospatial coordinates refer to
- `layout.geo`. If "geo2", the geospatial coordinates
- refer to `layout.geo2`, and so on.
- geojson
- Sets optional GeoJSON data associated with this trace.
- If not given, the features on the base map are used. It
- can be set as a valid GeoJSON object or as a URL
- string. Note that we only accept GeoJSONs of type
- "FeatureCollection" or "Feature" with geometries of
- type "Polygon" or "MultiPolygon".
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.choropleth.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- locationmode
- Determines the set of locations used to match entries
- in `locations` to regions on the map. Values "ISO-3",
- "USA-states", *country names* correspond to features on
- the base map and value "geojson-id" corresponds to
- features from a custom GeoJSON linked to the `geojson`
- attribute.
- locations
- Sets the coordinates via location IDs or names. See
- `locationmode` for more info.
- locationssrc
- Sets the source reference on Chart Studio Cloud for
- locations .
- marker
- :class:`plotly.graph_objects.choropleth.Marker`
- instance or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- reversescale
- Reverses the color mapping if true. If true, `zmin`
- will correspond to the last color in the array and
- `zmax` will correspond to the first color.
- selected
- :class:`plotly.graph_objects.choropleth.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- showscale
- Determines whether or not a colorbar is displayed for
- this trace.
- stream
- :class:`plotly.graph_objects.choropleth.Stream`
- instance or dict with compatible properties
- text
- Sets the text elements associated with each location.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.choropleth.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- z
- Sets the color values.
- zauto
- Determines whether or not the color domain is computed
- with respect to the input data (here in `z`) or the
- bounds set in `zmin` and `zmax` Defaults to `false`
- when `zmin` and `zmax` are set by the user.
- zmax
- Sets the upper bound of the color domain. Value should
- have the same units as in `z` and if set, `zmin` must
- be set as well.
- zmid
- Sets the mid-point of the color domain by scaling
- `zmin` and/or `zmax` to be equidistant to this point.
- Value should have the same units as in `z`. Has no
- effect when `zauto` is `false`.
- zmin
- Sets the lower bound of the color domain. Value should
- have the same units as in `z` and if set, `zmax` must
- be set as well.
- zsrc
- Sets the source reference on Chart Studio Cloud for z
- .
-
- Returns
- -------
- Choropleth
- """
- super(Choropleth, self).__init__("choropleth")
-
- # 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.Choropleth
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Choropleth`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import choropleth as v_choropleth
-
- # Initialize validators
- # ---------------------
- self._validators["autocolorscale"] = v_choropleth.AutocolorscaleValidator()
- self._validators["coloraxis"] = v_choropleth.ColoraxisValidator()
- self._validators["colorbar"] = v_choropleth.ColorBarValidator()
- self._validators["colorscale"] = v_choropleth.ColorscaleValidator()
- self._validators["customdata"] = v_choropleth.CustomdataValidator()
- self._validators["customdatasrc"] = v_choropleth.CustomdatasrcValidator()
- self._validators["featureidkey"] = v_choropleth.FeatureidkeyValidator()
- self._validators["geo"] = v_choropleth.GeoValidator()
- self._validators["geojson"] = v_choropleth.GeojsonValidator()
- self._validators["hoverinfo"] = v_choropleth.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_choropleth.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_choropleth.HoverlabelValidator()
- self._validators["hovertemplate"] = v_choropleth.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_choropleth.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_choropleth.HovertextValidator()
- self._validators["hovertextsrc"] = v_choropleth.HovertextsrcValidator()
- self._validators["ids"] = v_choropleth.IdsValidator()
- self._validators["idssrc"] = v_choropleth.IdssrcValidator()
- self._validators["legendgroup"] = v_choropleth.LegendgroupValidator()
- self._validators["locationmode"] = v_choropleth.LocationmodeValidator()
- self._validators["locations"] = v_choropleth.LocationsValidator()
- self._validators["locationssrc"] = v_choropleth.LocationssrcValidator()
- self._validators["marker"] = v_choropleth.MarkerValidator()
- self._validators["meta"] = v_choropleth.MetaValidator()
- self._validators["metasrc"] = v_choropleth.MetasrcValidator()
- self._validators["name"] = v_choropleth.NameValidator()
- self._validators["reversescale"] = v_choropleth.ReversescaleValidator()
- self._validators["selected"] = v_choropleth.SelectedValidator()
- self._validators["selectedpoints"] = v_choropleth.SelectedpointsValidator()
- self._validators["showlegend"] = v_choropleth.ShowlegendValidator()
- self._validators["showscale"] = v_choropleth.ShowscaleValidator()
- self._validators["stream"] = v_choropleth.StreamValidator()
- self._validators["text"] = v_choropleth.TextValidator()
- self._validators["textsrc"] = v_choropleth.TextsrcValidator()
- self._validators["uid"] = v_choropleth.UidValidator()
- self._validators["uirevision"] = v_choropleth.UirevisionValidator()
- self._validators["unselected"] = v_choropleth.UnselectedValidator()
- self._validators["visible"] = v_choropleth.VisibleValidator()
- self._validators["z"] = v_choropleth.ZValidator()
- self._validators["zauto"] = v_choropleth.ZautoValidator()
- self._validators["zmax"] = v_choropleth.ZmaxValidator()
- self._validators["zmid"] = v_choropleth.ZmidValidator()
- self._validators["zmin"] = v_choropleth.ZminValidator()
- self._validators["zsrc"] = v_choropleth.ZsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("autocolorscale", None)
- self["autocolorscale"] = autocolorscale if autocolorscale is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorbar", None)
- self["colorbar"] = colorbar if colorbar is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("featureidkey", None)
- self["featureidkey"] = featureidkey if featureidkey is not None else _v
- _v = arg.pop("geo", None)
- self["geo"] = geo if geo is not None else _v
- _v = arg.pop("geojson", None)
- self["geojson"] = geojson if geojson is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("locationmode", None)
- self["locationmode"] = locationmode if locationmode is not None else _v
- _v = arg.pop("locations", None)
- self["locations"] = locations if locations is not None else _v
- _v = arg.pop("locationssrc", None)
- self["locationssrc"] = locationssrc if locationssrc is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("reversescale", None)
- self["reversescale"] = reversescale if reversescale is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("showscale", None)
- self["showscale"] = showscale if showscale is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("z", None)
- self["z"] = z if z is not None else _v
- _v = arg.pop("zauto", None)
- self["zauto"] = zauto if zauto is not None else _v
- _v = arg.pop("zmax", None)
- self["zmax"] = zmax if zmax is not None else _v
- _v = arg.pop("zmid", None)
- self["zmid"] = zmid if zmid is not None else _v
- _v = arg.pop("zmin", None)
- self["zmin"] = zmin if zmin is not None else _v
- _v = arg.pop("zsrc", None)
- self["zsrc"] = zsrc if zsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "choropleth"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="choropleth", val="choropleth"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Carpet(_BaseTraceType):
-
- # a
- # -
- @property
- def a(self):
- """
- An array containing values of the first parameter value
-
- The 'a' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["a"]
-
- @a.setter
- def a(self, val):
- self["a"] = val
-
- # a0
- # --
- @property
- def a0(self):
- """
- Alternate to `a`. Builds a linear space of a coordinates. Use
- with `da` where `a0` is the starting coordinate and `da` the
- step.
-
- The 'a0' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["a0"]
-
- @a0.setter
- def a0(self, val):
- self["a0"] = val
-
- # aaxis
- # -----
- @property
- def aaxis(self):
- """
- The 'aaxis' property is an instance of Aaxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.carpet.Aaxis`
- - A dict of string/value properties that will be passed
- to the Aaxis constructor
-
- Supported dict properties:
-
- arraydtick
- The stride between grid lines along the axis
- arraytick0
- The starting index of grid lines along the axis
- autorange
- Determines whether or not the range of this
- axis is computed in relation to the input data.
- See `rangemode` for more info. If `range` is
- provided, then `autorange` is set to False.
- categoryarray
- Sets the order in which categories on this axis
- appear. Only has an effect if `categoryorder`
- is set to "array". Used with `categoryorder`.
- categoryarraysrc
- Sets the source reference on Chart Studio Cloud
- for categoryarray .
- categoryorder
- Specifies the ordering logic for the case of
- categorical variables. By default, plotly uses
- "trace", which specifies the order that is
- present in the data supplied. Set
- `categoryorder` to *category ascending* or
- *category descending* if order should be
- determined by the alphanumerical order of the
- category names. Set `categoryorder` to "array"
- to derive the ordering from the attribute
- `categoryarray`. If a category is not found in
- the `categoryarray` array, the sorting behavior
- for that attribute will be identical to the
- "trace" mode. The unspecified categories will
- follow the categories in `categoryarray`.
- cheatertype
-
- color
- Sets default for all colors associated with
- this axis all at once: line, font, tick, and
- grid colors. Grid color is lightened by
- blending this with the plot background
- Individual pieces can override this.
- dtick
- The stride between grid lines along the axis
- endline
- Determines whether or not a line is drawn at
- along the final value of this axis. If True,
- the end line is drawn on top of the grid lines.
- endlinecolor
- Sets the line color of the end line.
- endlinewidth
- Sets the width (in px) of the end line.
- 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.
- fixedrange
- Determines whether or not this axis is zoom-
- able. If true, then zoom is disabled.
- gridcolor
- Sets the axis line color.
- gridwidth
- Sets the width (in px) of the axis line.
- labelpadding
- Extra padding between label and the axis
- labelprefix
- Sets a axis label prefix.
- labelsuffix
- Sets a axis label suffix.
- linecolor
- Sets the axis line color.
- linewidth
- Sets the width (in px) of the axis line.
- minorgridcolor
- Sets the color of the grid lines.
- minorgridcount
- Sets the number of minor grid ticks per major
- grid tick
- minorgridwidth
- Sets the width (in px) of the grid lines.
- nticks
- Specifies the maximum number of ticks for the
- particular axis. The actual number of ticks
- will be chosen automatically to be less than or
- equal to `nticks`. Has an effect only if
- `tickmode` is set to "auto".
- range
- Sets the range of this axis. If the axis `type`
- is "log", then you must take the log of your
- desired range (e.g. to set the range from 1 to
- 100, set the range from 0 to 2). If the axis
- `type` is "date", it should be date strings,
- like date data, though Date objects and unix
- milliseconds will be accepted and converted to
- strings. If the axis `type` is "category", it
- should be numbers, using the scale where each
- category is assigned a serial number from zero
- in the order it appears.
- rangemode
- If "normal", the range is computed in relation
- to the extrema of the input data. If *tozero*`,
- the range extends to 0, regardless of the input
- data If "nonnegative", the range is non-
- negative, regardless of the input data.
- 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.
- 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 axis labels are drawn on the
- low side, the high side, both, or neither side
- of the axis.
- 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.
- smoothing
-
- startline
- Determines whether or not a line is drawn at
- along the starting value of this axis. If True,
- the start line is drawn on top of the grid
- lines.
- startlinecolor
- Sets the line color of the start line.
- startlinewidth
- Sets the width (in px) of the start line.
- tick0
- The starting index of grid lines along the axis
- tickangle
- Sets the angle of the tick labels with respect
- to the horizontal. For example, a `tickangle`
- of -90 draws the tick labels vertically.
- 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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see: We add one item to d3's
- date formatter: "%{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.carpet.
- aaxis.Tickformatstop` instances or dicts with
- compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.carpet.aaxis.tickformatstopdefaults), sets
- the default property values to use for elements
- of carpet.aaxis.tickformatstops
- tickmode
-
- tickprefix
- Sets a tick label prefix.
- 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 .
- title
- :class:`plotly.graph_objects.carpet.aaxis.Title
- ` instance or dict with compatible properties
- titlefont
- Deprecated: Please use carpet.aaxis.title.font
- instead. Sets this axis' title font. Note that
- the title's font used to be set by the now
- deprecated `titlefont` attribute.
- titleoffset
- Deprecated: Please use
- carpet.aaxis.title.offset instead. An
- additional amount by which to offset the title
- from the tick labels, given in pixels. Note
- that this used to be set by the now deprecated
- `titleoffset` attribute.
- type
- Sets the axis type. By default, plotly attempts
- to determined the axis type by looking into the
- data of the traces that referenced the axis in
- question.
-
- Returns
- -------
- plotly.graph_objs.carpet.Aaxis
- """
- return self["aaxis"]
-
- @aaxis.setter
- def aaxis(self, val):
- self["aaxis"] = val
-
- # asrc
- # ----
- @property
- def asrc(self):
- """
- Sets the source reference on Chart Studio Cloud for a .
-
- The 'asrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["asrc"]
-
- @asrc.setter
- def asrc(self, val):
- self["asrc"] = val
-
- # b
- # -
- @property
- def b(self):
- """
- A two dimensional array of y coordinates at each carpet point.
-
- The 'b' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["b"]
-
- @b.setter
- def b(self, val):
- self["b"] = val
-
- # b0
- # --
- @property
- def b0(self):
- """
- Alternate to `b`. Builds a linear space of a coordinates. Use
- with `db` where `b0` is the starting coordinate and `db` the
- step.
-
- The 'b0' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["b0"]
-
- @b0.setter
- def b0(self, val):
- self["b0"] = val
-
- # baxis
- # -----
- @property
- def baxis(self):
- """
- The 'baxis' property is an instance of Baxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.carpet.Baxis`
- - A dict of string/value properties that will be passed
- to the Baxis constructor
-
- Supported dict properties:
-
- arraydtick
- The stride between grid lines along the axis
- arraytick0
- The starting index of grid lines along the axis
- autorange
- Determines whether or not the range of this
- axis is computed in relation to the input data.
- See `rangemode` for more info. If `range` is
- provided, then `autorange` is set to False.
- categoryarray
- Sets the order in which categories on this axis
- appear. Only has an effect if `categoryorder`
- is set to "array". Used with `categoryorder`.
- categoryarraysrc
- Sets the source reference on Chart Studio Cloud
- for categoryarray .
- categoryorder
- Specifies the ordering logic for the case of
- categorical variables. By default, plotly uses
- "trace", which specifies the order that is
- present in the data supplied. Set
- `categoryorder` to *category ascending* or
- *category descending* if order should be
- determined by the alphanumerical order of the
- category names. Set `categoryorder` to "array"
- to derive the ordering from the attribute
- `categoryarray`. If a category is not found in
- the `categoryarray` array, the sorting behavior
- for that attribute will be identical to the
- "trace" mode. The unspecified categories will
- follow the categories in `categoryarray`.
- cheatertype
-
- color
- Sets default for all colors associated with
- this axis all at once: line, font, tick, and
- grid colors. Grid color is lightened by
- blending this with the plot background
- Individual pieces can override this.
- dtick
- The stride between grid lines along the axis
- endline
- Determines whether or not a line is drawn at
- along the final value of this axis. If True,
- the end line is drawn on top of the grid lines.
- endlinecolor
- Sets the line color of the end line.
- endlinewidth
- Sets the width (in px) of the end line.
- 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.
- fixedrange
- Determines whether or not this axis is zoom-
- able. If true, then zoom is disabled.
- gridcolor
- Sets the axis line color.
- gridwidth
- Sets the width (in px) of the axis line.
- labelpadding
- Extra padding between label and the axis
- labelprefix
- Sets a axis label prefix.
- labelsuffix
- Sets a axis label suffix.
- linecolor
- Sets the axis line color.
- linewidth
- Sets the width (in px) of the axis line.
- minorgridcolor
- Sets the color of the grid lines.
- minorgridcount
- Sets the number of minor grid ticks per major
- grid tick
- minorgridwidth
- Sets the width (in px) of the grid lines.
- nticks
- Specifies the maximum number of ticks for the
- particular axis. The actual number of ticks
- will be chosen automatically to be less than or
- equal to `nticks`. Has an effect only if
- `tickmode` is set to "auto".
- range
- Sets the range of this axis. If the axis `type`
- is "log", then you must take the log of your
- desired range (e.g. to set the range from 1 to
- 100, set the range from 0 to 2). If the axis
- `type` is "date", it should be date strings,
- like date data, though Date objects and unix
- milliseconds will be accepted and converted to
- strings. If the axis `type` is "category", it
- should be numbers, using the scale where each
- category is assigned a serial number from zero
- in the order it appears.
- rangemode
- If "normal", the range is computed in relation
- to the extrema of the input data. If *tozero*`,
- the range extends to 0, regardless of the input
- data If "nonnegative", the range is non-
- negative, regardless of the input data.
- 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.
- 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 axis labels are drawn on the
- low side, the high side, both, or neither side
- of the axis.
- 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.
- smoothing
-
- startline
- Determines whether or not a line is drawn at
- along the starting value of this axis. If True,
- the start line is drawn on top of the grid
- lines.
- startlinecolor
- Sets the line color of the start line.
- startlinewidth
- Sets the width (in px) of the start line.
- tick0
- The starting index of grid lines along the axis
- tickangle
- Sets the angle of the tick labels with respect
- to the horizontal. For example, a `tickangle`
- of -90 draws the tick labels vertically.
- 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:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see: We add one item to d3's
- date formatter: "%{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.carpet.
- baxis.Tickformatstop` instances or dicts with
- compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.dat
- a.carpet.baxis.tickformatstopdefaults), sets
- the default property values to use for elements
- of carpet.baxis.tickformatstops
- tickmode
-
- tickprefix
- Sets a tick label prefix.
- 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 .
- title
- :class:`plotly.graph_objects.carpet.baxis.Title
- ` instance or dict with compatible properties
- titlefont
- Deprecated: Please use carpet.baxis.title.font
- instead. Sets this axis' title font. Note that
- the title's font used to be set by the now
- deprecated `titlefont` attribute.
- titleoffset
- Deprecated: Please use
- carpet.baxis.title.offset instead. An
- additional amount by which to offset the title
- from the tick labels, given in pixels. Note
- that this used to be set by the now deprecated
- `titleoffset` attribute.
- type
- Sets the axis type. By default, plotly attempts
- to determined the axis type by looking into the
- data of the traces that referenced the axis in
- question.
-
- Returns
- -------
- plotly.graph_objs.carpet.Baxis
- """
- return self["baxis"]
-
- @baxis.setter
- def baxis(self, val):
- self["baxis"] = val
-
- # bsrc
- # ----
- @property
- def bsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for b .
-
- The 'bsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["bsrc"]
-
- @bsrc.setter
- def bsrc(self, val):
- self["bsrc"] = val
-
- # carpet
- # ------
- @property
- def carpet(self):
- """
- An identifier for this carpet, so that `scattercarpet` and
- `contourcarpet` traces can specify a carpet plot on which they
- lie
-
- The 'carpet' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["carpet"]
-
- @carpet.setter
- def carpet(self, val):
- self["carpet"] = val
-
- # cheaterslope
- # ------------
- @property
- def cheaterslope(self):
- """
- The shift applied to each successive row of data in creating a
- cheater plot. Only used if `x` is been ommitted.
-
- The 'cheaterslope' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["cheaterslope"]
-
- @cheaterslope.setter
- def cheaterslope(self, val):
- self["cheaterslope"] = val
-
- # color
- # -----
- @property
- def color(self):
- """
- 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.
-
- 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
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # da
- # --
- @property
- def da(self):
- """
- Sets the a coordinate step. See `a0` for more info.
-
- The 'da' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["da"]
-
- @da.setter
- def da(self, val):
- self["da"] = val
-
- # db
- # --
- @property
- def db(self):
- """
- Sets the b coordinate step. See `b0` for more info.
-
- The 'db' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["db"]
-
- @db.setter
- def db(self, val):
- self["db"] = val
-
- # font
- # ----
- @property
- def font(self):
- """
- The default font used for axis & tick labels on this carpet
-
- The 'font' property is an instance of Font
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.carpet.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.carpet.Font
- """
- return self["font"]
-
- @font.setter
- def font(self, val):
- self["font"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.carpet.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.carpet.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- A two dimensional array of x coordinates at each carpet point.
- If ommitted, the plot is a cheater plot and the xaxis is hidden
- by default.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- A two dimensional array of y coordinates at each carpet point.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- a
- An array containing values of the first parameter value
- a0
- Alternate to `a`. Builds a linear space of a
- coordinates. Use with `da` where `a0` is the starting
- coordinate and `da` the step.
- aaxis
- :class:`plotly.graph_objects.carpet.Aaxis` instance or
- dict with compatible properties
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- A two dimensional array of y coordinates at each carpet
- point.
- b0
- Alternate to `b`. Builds a linear space of a
- coordinates. Use with `db` where `b0` is the starting
- coordinate and `db` the step.
- baxis
- :class:`plotly.graph_objects.carpet.Baxis` instance or
- dict with compatible properties
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- carpet
- An identifier for this carpet, so that `scattercarpet`
- and `contourcarpet` traces can specify a carpet plot on
- which they lie
- cheaterslope
- The shift applied to each successive row of data in
- creating a cheater plot. Only used if `x` is been
- ommitted.
- 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.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- da
- Sets the a coordinate step. See `a0` for more info.
- db
- Sets the b coordinate step. See `b0` for more info.
- font
- The default font used for axis & tick labels on this
- carpet
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- stream
- :class:`plotly.graph_objects.carpet.Stream` instance or
- dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- A two dimensional array of x coordinates at each carpet
- point. If ommitted, the plot is a cheater plot and the
- xaxis is hidden by default.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- A two dimensional array of y coordinates at each carpet
- point.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- a=None,
- a0=None,
- aaxis=None,
- asrc=None,
- b=None,
- b0=None,
- baxis=None,
- bsrc=None,
- carpet=None,
- cheaterslope=None,
- color=None,
- customdata=None,
- customdatasrc=None,
- da=None,
- db=None,
- font=None,
- ids=None,
- idssrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- stream=None,
- uid=None,
- uirevision=None,
- visible=None,
- x=None,
- xaxis=None,
- xsrc=None,
- y=None,
- yaxis=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Carpet object
-
- The data describing carpet axis layout is set in `y` and
- (optionally) also `x`. If only `y` is present, `x` the plot is
- interpreted as a cheater plot and is filled in using the `y`
- values. `x` and `y` may either be 2D arrays matching with each
- dimension matching that of `a` and `b`, or they may be 1D
- arrays with total length equal to that of `a` and `b`.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Carpet`
- a
- An array containing values of the first parameter value
- a0
- Alternate to `a`. Builds a linear space of a
- coordinates. Use with `da` where `a0` is the starting
- coordinate and `da` the step.
- aaxis
- :class:`plotly.graph_objects.carpet.Aaxis` instance or
- dict with compatible properties
- asrc
- Sets the source reference on Chart Studio Cloud for a
- .
- b
- A two dimensional array of y coordinates at each carpet
- point.
- b0
- Alternate to `b`. Builds a linear space of a
- coordinates. Use with `db` where `b0` is the starting
- coordinate and `db` the step.
- baxis
- :class:`plotly.graph_objects.carpet.Baxis` instance or
- dict with compatible properties
- bsrc
- Sets the source reference on Chart Studio Cloud for b
- .
- carpet
- An identifier for this carpet, so that `scattercarpet`
- and `contourcarpet` traces can specify a carpet plot on
- which they lie
- cheaterslope
- The shift applied to each successive row of data in
- creating a cheater plot. Only used if `x` is been
- ommitted.
- 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.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- da
- Sets the a coordinate step. See `a0` for more info.
- db
- Sets the b coordinate step. See `b0` for more info.
- font
- The default font used for axis & tick labels on this
- carpet
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- stream
- :class:`plotly.graph_objects.carpet.Stream` instance or
- dict with compatible properties
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- x
- A two dimensional array of x coordinates at each carpet
- point. If ommitted, the plot is a cheater plot and the
- xaxis is hidden by default.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- A two dimensional array of y coordinates at each carpet
- point.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Carpet
- """
- super(Carpet, self).__init__("carpet")
-
- # 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.Carpet
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Carpet`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import carpet as v_carpet
-
- # Initialize validators
- # ---------------------
- self._validators["a"] = v_carpet.AValidator()
- self._validators["a0"] = v_carpet.A0Validator()
- self._validators["aaxis"] = v_carpet.AaxisValidator()
- self._validators["asrc"] = v_carpet.AsrcValidator()
- self._validators["b"] = v_carpet.BValidator()
- self._validators["b0"] = v_carpet.B0Validator()
- self._validators["baxis"] = v_carpet.BaxisValidator()
- self._validators["bsrc"] = v_carpet.BsrcValidator()
- self._validators["carpet"] = v_carpet.CarpetValidator()
- self._validators["cheaterslope"] = v_carpet.CheaterslopeValidator()
- self._validators["color"] = v_carpet.ColorValidator()
- self._validators["customdata"] = v_carpet.CustomdataValidator()
- self._validators["customdatasrc"] = v_carpet.CustomdatasrcValidator()
- self._validators["da"] = v_carpet.DaValidator()
- self._validators["db"] = v_carpet.DbValidator()
- self._validators["font"] = v_carpet.FontValidator()
- self._validators["ids"] = v_carpet.IdsValidator()
- self._validators["idssrc"] = v_carpet.IdssrcValidator()
- self._validators["meta"] = v_carpet.MetaValidator()
- self._validators["metasrc"] = v_carpet.MetasrcValidator()
- self._validators["name"] = v_carpet.NameValidator()
- self._validators["opacity"] = v_carpet.OpacityValidator()
- self._validators["stream"] = v_carpet.StreamValidator()
- self._validators["uid"] = v_carpet.UidValidator()
- self._validators["uirevision"] = v_carpet.UirevisionValidator()
- self._validators["visible"] = v_carpet.VisibleValidator()
- self._validators["x"] = v_carpet.XValidator()
- self._validators["xaxis"] = v_carpet.XAxisValidator()
- self._validators["xsrc"] = v_carpet.XsrcValidator()
- self._validators["y"] = v_carpet.YValidator()
- self._validators["yaxis"] = v_carpet.YAxisValidator()
- self._validators["ysrc"] = v_carpet.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("a", None)
- self["a"] = a if a is not None else _v
- _v = arg.pop("a0", None)
- self["a0"] = a0 if a0 is not None else _v
- _v = arg.pop("aaxis", None)
- self["aaxis"] = aaxis if aaxis is not None else _v
- _v = arg.pop("asrc", None)
- self["asrc"] = asrc if asrc is not None else _v
- _v = arg.pop("b", None)
- self["b"] = b if b is not None else _v
- _v = arg.pop("b0", None)
- self["b0"] = b0 if b0 is not None else _v
- _v = arg.pop("baxis", None)
- self["baxis"] = baxis if baxis is not None else _v
- _v = arg.pop("bsrc", None)
- self["bsrc"] = bsrc if bsrc is not None else _v
- _v = arg.pop("carpet", None)
- self["carpet"] = carpet if carpet is not None else _v
- _v = arg.pop("cheaterslope", None)
- self["cheaterslope"] = cheaterslope if cheaterslope is not None else _v
- _v = arg.pop("color", None)
- self["color"] = color if color is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("da", None)
- self["da"] = da if da is not None else _v
- _v = arg.pop("db", None)
- self["db"] = db if db is not None else _v
- _v = arg.pop("font", None)
- self["font"] = font if font is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "carpet"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="carpet", val="carpet"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Candlestick(_BaseTraceType):
-
- # close
- # -----
- @property
- def close(self):
- """
- Sets the close values.
-
- The 'close' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["close"]
-
- @close.setter
- def close(self, val):
- self["close"] = val
-
- # closesrc
- # --------
- @property
- def closesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for close .
-
- The 'closesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["closesrc"]
-
- @closesrc.setter
- def closesrc(self, val):
- self["closesrc"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # decreasing
- # ----------
- @property
- def decreasing(self):
- """
- The 'decreasing' property is an instance of Decreasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.candlestick.Decreasing`
- - A dict of string/value properties that will be passed
- to the Decreasing constructor
-
- Supported dict properties:
-
- fillcolor
- Sets the fill color. Defaults to a half-
- transparent variant of the line color, marker
- color, or marker line color, whichever is
- available.
- line
- :class:`plotly.graph_objects.candlestick.decrea
- sing.Line` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.candlestick.Decreasing
- """
- return self["decreasing"]
-
- @decreasing.setter
- def decreasing(self, val):
- self["decreasing"] = val
-
- # high
- # ----
- @property
- def high(self):
- """
- Sets the high values.
-
- The 'high' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["high"]
-
- @high.setter
- def high(self, val):
- self["high"] = val
-
- # highsrc
- # -------
- @property
- def highsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for high .
-
- The 'highsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["highsrc"]
-
- @highsrc.setter
- def highsrc(self, val):
- self["highsrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
- split
- Show hover information (open, close, high, low)
- in separate labels.
-
- Returns
- -------
- plotly.graph_objs.candlestick.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # increasing
- # ----------
- @property
- def increasing(self):
- """
- The 'increasing' property is an instance of Increasing
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.candlestick.Increasing`
- - A dict of string/value properties that will be passed
- to the Increasing constructor
-
- Supported dict properties:
-
- fillcolor
- Sets the fill color. Defaults to a half-
- transparent variant of the line color, marker
- color, or marker line color, whichever is
- available.
- line
- :class:`plotly.graph_objects.candlestick.increa
- sing.Line` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.candlestick.Increasing
- """
- return self["increasing"]
-
- @increasing.setter
- def increasing(self, val):
- self["increasing"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.candlestick.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- width
- Sets the width (in px) of line bounding the
- box(es). Note that this style setting can also
- be set per direction via
- `increasing.line.width` and
- `decreasing.line.width`.
-
- Returns
- -------
- plotly.graph_objs.candlestick.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # low
- # ---
- @property
- def low(self):
- """
- Sets the low values.
-
- The 'low' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["low"]
-
- @low.setter
- def low(self, val):
- self["low"] = val
-
- # lowsrc
- # ------
- @property
- def lowsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for low .
-
- The 'lowsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lowsrc"]
-
- @lowsrc.setter
- def lowsrc(self, val):
- self["lowsrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # open
- # ----
- @property
- def open(self):
- """
- Sets the open values.
-
- The 'open' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["open"]
-
- @open.setter
- def open(self, val):
- self["open"] = val
-
- # opensrc
- # -------
- @property
- def opensrc(self):
- """
- Sets the source reference on Chart Studio Cloud for open .
-
- The 'opensrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["opensrc"]
-
- @opensrc.setter
- def opensrc(self, val):
- self["opensrc"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.candlestick.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.candlestick.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets hover text elements associated with each sample point. If
- a single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- this trace's sample points.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # whiskerwidth
- # ------------
- @property
- def whiskerwidth(self):
- """
- Sets the width of the whiskers relative to the box' width. For
- example, with 1, the whiskers are as wide as the box(es).
-
- The 'whiskerwidth' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["whiskerwidth"]
-
- @whiskerwidth.setter
- def whiskerwidth(self, val):
- self["whiskerwidth"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates. If absent, linear coordinate will be
- generated.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- close
- Sets the close values.
- closesrc
- Sets the source reference on Chart Studio Cloud for
- close .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.candlestick.Decreasing`
- instance or dict with compatible properties
- high
- Sets the high values.
- highsrc
- Sets the source reference on Chart Studio Cloud for
- high .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.candlestick.Hoverlabel`
- instance or dict with compatible properties
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.candlestick.Increasing`
- instance or dict with compatible properties
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.candlestick.Line` instance
- or dict with compatible properties
- low
- Sets the low values.
- lowsrc
- Sets the source reference on Chart Studio Cloud for
- low .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- open
- Sets the open values.
- opensrc
- Sets the source reference on Chart Studio Cloud for
- open .
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.candlestick.Stream`
- instance or dict with compatible properties
- text
- Sets hover text elements associated with each sample
- point. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to this trace's sample points.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- whiskerwidth
- Sets the width of the whiskers relative to the box'
- width. For example, with 1, the whiskers are as wide as
- the box(es).
- x
- Sets the x coordinates. If absent, linear coordinate
- will be generated.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- """
-
- def __init__(
- self,
- arg=None,
- close=None,
- closesrc=None,
- customdata=None,
- customdatasrc=None,
- decreasing=None,
- high=None,
- highsrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- increasing=None,
- legendgroup=None,
- line=None,
- low=None,
- lowsrc=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- open=None,
- opensrc=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- whiskerwidth=None,
- x=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- yaxis=None,
- **kwargs
- ):
- """
- Construct a new Candlestick object
-
- The candlestick is a style of financial chart describing open,
- high, low and close for a given `x` coordinate (most likely
- time). The boxes represent the spread between the `open` and
- `close` values and the lines represent the spread between the
- `low` and `high` values Sample points where the close value is
- higher (lower) then the open value are called increasing
- (decreasing). By default, increasing candles are drawn in green
- whereas decreasing are drawn in red.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Candlestick`
- close
- Sets the close values.
- closesrc
- Sets the source reference on Chart Studio Cloud for
- close .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- decreasing
- :class:`plotly.graph_objects.candlestick.Decreasing`
- instance or dict with compatible properties
- high
- Sets the high values.
- highsrc
- Sets the source reference on Chart Studio Cloud for
- high .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.candlestick.Hoverlabel`
- instance or dict with compatible properties
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- increasing
- :class:`plotly.graph_objects.candlestick.Increasing`
- instance or dict with compatible properties
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.candlestick.Line` instance
- or dict with compatible properties
- low
- Sets the low values.
- lowsrc
- Sets the source reference on Chart Studio Cloud for
- low .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- open
- Sets the open values.
- opensrc
- Sets the source reference on Chart Studio Cloud for
- open .
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.candlestick.Stream`
- instance or dict with compatible properties
- text
- Sets hover text elements associated with each sample
- point. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to this trace's sample points.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- whiskerwidth
- Sets the width of the whiskers relative to the box'
- width. For example, with 1, the whiskers are as wide as
- the box(es).
- x
- Sets the x coordinates. If absent, linear coordinate
- will be generated.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
-
- Returns
- -------
- Candlestick
- """
- super(Candlestick, self).__init__("candlestick")
-
- # 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.Candlestick
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Candlestick`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import candlestick as v_candlestick
-
- # Initialize validators
- # ---------------------
- self._validators["close"] = v_candlestick.CloseValidator()
- self._validators["closesrc"] = v_candlestick.ClosesrcValidator()
- self._validators["customdata"] = v_candlestick.CustomdataValidator()
- self._validators["customdatasrc"] = v_candlestick.CustomdatasrcValidator()
- self._validators["decreasing"] = v_candlestick.DecreasingValidator()
- self._validators["high"] = v_candlestick.HighValidator()
- self._validators["highsrc"] = v_candlestick.HighsrcValidator()
- self._validators["hoverinfo"] = v_candlestick.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_candlestick.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_candlestick.HoverlabelValidator()
- self._validators["hovertext"] = v_candlestick.HovertextValidator()
- self._validators["hovertextsrc"] = v_candlestick.HovertextsrcValidator()
- self._validators["ids"] = v_candlestick.IdsValidator()
- self._validators["idssrc"] = v_candlestick.IdssrcValidator()
- self._validators["increasing"] = v_candlestick.IncreasingValidator()
- self._validators["legendgroup"] = v_candlestick.LegendgroupValidator()
- self._validators["line"] = v_candlestick.LineValidator()
- self._validators["low"] = v_candlestick.LowValidator()
- self._validators["lowsrc"] = v_candlestick.LowsrcValidator()
- self._validators["meta"] = v_candlestick.MetaValidator()
- self._validators["metasrc"] = v_candlestick.MetasrcValidator()
- self._validators["name"] = v_candlestick.NameValidator()
- self._validators["opacity"] = v_candlestick.OpacityValidator()
- self._validators["open"] = v_candlestick.OpenValidator()
- self._validators["opensrc"] = v_candlestick.OpensrcValidator()
- self._validators["selectedpoints"] = v_candlestick.SelectedpointsValidator()
- self._validators["showlegend"] = v_candlestick.ShowlegendValidator()
- self._validators["stream"] = v_candlestick.StreamValidator()
- self._validators["text"] = v_candlestick.TextValidator()
- self._validators["textsrc"] = v_candlestick.TextsrcValidator()
- self._validators["uid"] = v_candlestick.UidValidator()
- self._validators["uirevision"] = v_candlestick.UirevisionValidator()
- self._validators["visible"] = v_candlestick.VisibleValidator()
- self._validators["whiskerwidth"] = v_candlestick.WhiskerwidthValidator()
- self._validators["x"] = v_candlestick.XValidator()
- self._validators["xaxis"] = v_candlestick.XAxisValidator()
- self._validators["xcalendar"] = v_candlestick.XcalendarValidator()
- self._validators["xsrc"] = v_candlestick.XsrcValidator()
- self._validators["yaxis"] = v_candlestick.YAxisValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("close", None)
- self["close"] = close if close is not None else _v
- _v = arg.pop("closesrc", None)
- self["closesrc"] = closesrc if closesrc is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("decreasing", None)
- self["decreasing"] = decreasing if decreasing is not None else _v
- _v = arg.pop("high", None)
- self["high"] = high if high is not None else _v
- _v = arg.pop("highsrc", None)
- self["highsrc"] = highsrc if highsrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("increasing", None)
- self["increasing"] = increasing if increasing is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("low", None)
- self["low"] = low if low is not None else _v
- _v = arg.pop("lowsrc", None)
- self["lowsrc"] = lowsrc if lowsrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("open", None)
- self["open"] = open if open is not None else _v
- _v = arg.pop("opensrc", None)
- self["opensrc"] = opensrc if opensrc is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("whiskerwidth", None)
- self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "candlestick"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="candlestick", val="candlestick"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Box(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # boxmean
- # -------
- @property
- def boxmean(self):
- """
- If True, the mean of the box(es)' underlying distribution is
- drawn as a dashed line inside the box(es). If "sd" the standard
- deviation is also drawn. Defaults to True when `mean` is set.
- Defaults to "sd" when `sd` is set Otherwise defaults to False.
-
- The 'boxmean' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, 'sd', False]
-
- Returns
- -------
- Any
- """
- return self["boxmean"]
-
- @boxmean.setter
- def boxmean(self, val):
- self["boxmean"] = val
-
- # boxpoints
- # ---------
- @property
- def boxpoints(self):
- """
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier points
- are shown and points either less than 4*Q1-3*Q3 or greater than
- 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all
- sample points are shown If False, only the box(es) are shown
- with no sample points Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is set.
- Defaults to "all" under the q1/median/q3 signature. Otherwise
- defaults to "outliers".
-
- The 'boxpoints' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['all', 'outliers', 'suspectedoutliers', False]
-
- Returns
- -------
- Any
- """
- return self["boxpoints"]
-
- @boxpoints.setter
- def boxpoints(self, val):
- self["boxpoints"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step for multi-box traces set using
- q1/median/q3.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step for multi-box traces set using
- q1/median/q3.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # fillcolor
- # ---------
- @property
- def fillcolor(self):
- """
- Sets the fill color. Defaults to a half-transparent variant of
- the line color, marker color, or marker line color, whichever
- is available.
-
- 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
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.box.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.box.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hoveron
- # -------
- @property
- def hoveron(self):
- """
- Do the hover effects highlight individual boxes or sample
- points or both?
-
- The 'hoveron' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['boxes', 'points'] joined with '+' characters
- (e.g. 'boxes+points')
-
- Returns
- -------
- Any
- """
- return self["hoveron"]
-
- @hoveron.setter
- def hoveron(self, val):
- self["hoveron"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # jitter
- # ------
- @property
- def jitter(self):
- """
- Sets the amount of jitter in the sample points drawn. If 0, the
- sample points align along the distribution axis. If 1, the
- sample points are drawn in a random jitter of width equal to
- the width of the box(es).
-
- The 'jitter' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["jitter"]
-
- @jitter.setter
- def jitter(self, val):
- self["jitter"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # 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.box.Line`
- - A dict of string/value properties that will be passed
- to the Line constructor
-
- Supported dict properties:
-
- color
- Sets the color of line bounding the box(es).
- width
- Sets the width (in px) of line bounding the
- box(es).
-
- Returns
- -------
- plotly.graph_objs.box.Line
- """
- return self["line"]
-
- @line.setter
- def line(self, val):
- self["line"] = val
-
- # lowerfence
- # ----------
- @property
- def lowerfence(self):
- """
- Sets the lower fence values. There should be as many items as
- the number of boxes desired. This attribute has effect only
- under the q1/median/q3 signature. If `lowerfence` is not
- provided but a sample (in `y` or `x`) is set, we compute the
- lower as the last sample point below 1.5 times the IQR.
-
- The 'lowerfence' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["lowerfence"]
-
- @lowerfence.setter
- def lowerfence(self, val):
- self["lowerfence"] = val
-
- # lowerfencesrc
- # -------------
- @property
- def lowerfencesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for lowerfence
- .
-
- The 'lowerfencesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["lowerfencesrc"]
-
- @lowerfencesrc.setter
- def lowerfencesrc(self, val):
- self["lowerfencesrc"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.box.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- line
- :class:`plotly.graph_objects.box.marker.Line`
- instance or dict with compatible properties
- opacity
- Sets the marker opacity.
- outliercolor
- Sets the color of the outlier sample points.
- size
- Sets the marker size (in px).
- symbol
- Sets the marker symbol type. Adding 100 is
- equivalent to appending "-open" to a symbol
- name. Adding 200 is equivalent to appending
- "-dot" to a symbol name. Adding 300 is
- equivalent to appending "-open-dot" or "dot-
- open" to a symbol name.
-
- Returns
- -------
- plotly.graph_objs.box.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # mean
- # ----
- @property
- def mean(self):
- """
- Sets the mean values. There should be as many items as the
- number of boxes desired. This attribute has effect only under
- the q1/median/q3 signature. If `mean` is not provided but a
- sample (in `y` or `x`) is set, we compute the mean for each box
- using the sample values.
-
- The 'mean' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["mean"]
-
- @mean.setter
- def mean(self, val):
- self["mean"] = val
-
- # meansrc
- # -------
- @property
- def meansrc(self):
- """
- Sets the source reference on Chart Studio Cloud for mean .
-
- The 'meansrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["meansrc"]
-
- @meansrc.setter
- def meansrc(self, val):
- self["meansrc"] = val
-
- # median
- # ------
- @property
- def median(self):
- """
- Sets the median values. There should be as many items as the
- number of boxes desired.
-
- The 'median' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["median"]
-
- @median.setter
- def median(self, val):
- self["median"] = val
-
- # mediansrc
- # ---------
- @property
- def mediansrc(self):
- """
- Sets the source reference on Chart Studio Cloud for median .
-
- The 'mediansrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["mediansrc"]
-
- @mediansrc.setter
- def mediansrc(self, val):
- self["mediansrc"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover. For box traces, the name will also be used for
- the position coordinate, if `x` and `x0` (`y` and `y0` if
- horizontal) are missing and the position axis is categorical
-
- 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
-
- # notched
- # -------
- @property
- def notched(self):
- """
- Determines whether or not notches are drawn. Notches displays a
- confidence interval around the median. We compute the
- confidence interval as median +/- 1.57 * IQR / sqrt(N), where
- IQR is the interquartile range and N is the sample size. If two
- boxes' notches do not overlap there is 95% confidence their
- medians differ. See
- https://sites.google.com/site/davidsstatistics/home/notched-
- box-plots for more info. Defaults to False unless `notchwidth`
- or `notchspan` is set.
-
- The 'notched' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["notched"]
-
- @notched.setter
- def notched(self, val):
- self["notched"] = val
-
- # notchspan
- # ---------
- @property
- def notchspan(self):
- """
- Sets the notch span from the boxes' `median` values. There
- should be as many items as the number of boxes desired. This
- attribute has effect only under the q1/median/q3 signature. If
- `notchspan` is not provided but a sample (in `y` or `x`) is
- set, we compute it as 1.57 * IQR / sqrt(N), where N is the
- sample size.
-
- The 'notchspan' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["notchspan"]
-
- @notchspan.setter
- def notchspan(self, val):
- self["notchspan"] = val
-
- # notchspansrc
- # ------------
- @property
- def notchspansrc(self):
- """
- Sets the source reference on Chart Studio Cloud for notchspan
- .
-
- The 'notchspansrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["notchspansrc"]
-
- @notchspansrc.setter
- def notchspansrc(self, val):
- self["notchspansrc"] = val
-
- # notchwidth
- # ----------
- @property
- def notchwidth(self):
- """
- Sets the width of the notches relative to the box' width. For
- example, with 0, the notches are as wide as the box(es).
-
- The 'notchwidth' property is a number and may be specified as:
- - An int or float in the interval [0, 0.5]
-
- Returns
- -------
- int|float
- """
- return self["notchwidth"]
-
- @notchwidth.setter
- def notchwidth(self, val):
- self["notchwidth"] = val
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the box(es). If "v" ("h"), the
- distribution is visualized along the vertical (horizontal).
-
- 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
-
- # pointpos
- # --------
- @property
- def pointpos(self):
- """
- Sets the position of the sample points in relation to the
- box(es). If 0, the sample points are places over the center of
- the box(es). Positive (negative) values correspond to positions
- to the right (left) for vertical boxes and above (below) for
- horizontal boxes
-
- The 'pointpos' property is a number and may be specified as:
- - An int or float in the interval [-2, 2]
-
- Returns
- -------
- int|float
- """
- return self["pointpos"]
-
- @pointpos.setter
- def pointpos(self, val):
- self["pointpos"] = val
-
- # q1
- # --
- @property
- def q1(self):
- """
- Sets the Quartile 1 values. There should be as many items as
- the number of boxes desired.
-
- The 'q1' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["q1"]
-
- @q1.setter
- def q1(self, val):
- self["q1"] = val
-
- # q1src
- # -----
- @property
- def q1src(self):
- """
- Sets the source reference on Chart Studio Cloud for q1 .
-
- The 'q1src' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["q1src"]
-
- @q1src.setter
- def q1src(self, val):
- self["q1src"] = val
-
- # q3
- # --
- @property
- def q3(self):
- """
- Sets the Quartile 3 values. There should be as many items as
- the number of boxes desired.
-
- The 'q3' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["q3"]
-
- @q3.setter
- def q3(self, val):
- self["q3"] = val
-
- # q3src
- # -----
- @property
- def q3src(self):
- """
- Sets the source reference on Chart Studio Cloud for q3 .
-
- The 'q3src' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["q3src"]
-
- @q3src.setter
- def q3src(self, val):
- self["q3src"] = val
-
- # quartilemethod
- # --------------
- @property
- def quartilemethod(self):
- """
- Sets the method used to compute the sample's Q1 and Q3
- quartiles. The "linear" method uses the 25th percentile for Q1
- and 75th percentile for Q3 as computed using method #10 (listed
- on http://www.amstat.org/publications/jse/v14n3/langford.html).
- The "exclusive" method uses the median to divide the ordered
- dataset into two halves if the sample is odd, it does not
- include the median in either half - Q1 is then the median of
- the lower half and Q3 the median of the upper half. The
- "inclusive" method also uses the median to divide the ordered
- dataset into two halves but if the sample is odd, it includes
- the median in both halves - Q1 is then the median of the lower
- half and Q3 the median of the upper half.
-
- The 'quartilemethod' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['linear', 'exclusive', 'inclusive']
-
- Returns
- -------
- Any
- """
- return self["quartilemethod"]
-
- @quartilemethod.setter
- def quartilemethod(self, val):
- self["quartilemethod"] = val
-
- # sd
- # --
- @property
- def sd(self):
- """
- Sets the standard deviation values. There should be as many
- items as the number of boxes desired. This attribute has effect
- only under the q1/median/q3 signature. If `sd` is not provided
- but a sample (in `y` or `x`) is set, we compute the standard
- deviation for each box using the sample values.
-
- The 'sd' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["sd"]
-
- @sd.setter
- def sd(self, val):
- self["sd"] = val
-
- # sdsrc
- # -----
- @property
- def sdsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for sd .
-
- The 'sdsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["sdsrc"]
-
- @sdsrc.setter
- def sdsrc(self, val):
- self["sdsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.box.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.box.selected.Marke
- r` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.box.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.box.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.box.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets the text elements associated with each sample value. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.box.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.box.unselected.Mar
- ker` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.box.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # upperfence
- # ----------
- @property
- def upperfence(self):
- """
- Sets the upper fence values. There should be as many items as
- the number of boxes desired. This attribute has effect only
- under the q1/median/q3 signature. If `upperfence` is not
- provided but a sample (in `y` or `x`) is set, we compute the
- lower as the last sample point above 1.5 times the IQR.
-
- The 'upperfence' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["upperfence"]
-
- @upperfence.setter
- def upperfence(self, val):
- self["upperfence"] = val
-
- # upperfencesrc
- # -------------
- @property
- def upperfencesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for upperfence
- .
-
- The 'upperfencesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["upperfencesrc"]
-
- @upperfencesrc.setter
- def upperfencesrc(self, val):
- self["upperfencesrc"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # whiskerwidth
- # ------------
- @property
- def whiskerwidth(self):
- """
- Sets the width of the whiskers relative to the box' width. For
- example, with 1, the whiskers are as wide as the box(es).
-
- The 'whiskerwidth' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["whiskerwidth"]
-
- @whiskerwidth.setter
- def whiskerwidth(self, val):
- self["whiskerwidth"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the width of the box in data coordinate If 0 (default
- value) the width is automatically selected based on the
- positions of other box traces in the same subplot.
-
- 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
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x sample data or coordinates. See overview for more
- info.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Sets the x coordinate for single-box traces or the starting
- coordinate for multi-box traces set using q1/median/q3. See
- overview for more info.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y sample data or coordinates. See overview for more
- info.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Sets the y coordinate for single-box traces or the starting
- coordinate for multi-box traces set using q1/median/q3. See
- overview for more info.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- boxmean
- If True, the mean of the box(es)' underlying
- distribution is drawn as a dashed line inside the
- box(es). If "sd" the standard deviation is also drawn.
- Defaults to True when `mean` is set. Defaults to "sd"
- when `sd` is set Otherwise defaults to False.
- boxpoints
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier
- points are shown and points either less than 4*Q1-3*Q3
- or greater than 4*Q3-3*Q1 are highlighted (see
- `outliercolor`) If "all", all sample points are shown
- If False, only the box(es) are shown with no sample
- points Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is
- set. Defaults to "all" under the q1/median/q3
- signature. Otherwise defaults to "outliers".
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step for multi-box traces set
- using q1/median/q3.
- dy
- Sets the y coordinate step for multi-box traces set
- using q1/median/q3.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.box.Hoverlabel` instance
- or dict with compatible properties
- hoveron
- Do the hover effects highlight individual boxes or
- sample points or both?
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- jitter
- Sets the amount of jitter in the sample points drawn.
- If 0, the sample points align along the distribution
- axis. If 1, the sample points are drawn in a random
- jitter of width equal to the width of the box(es).
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.box.Line` instance or dict
- with compatible properties
- lowerfence
- Sets the lower fence values. There should be as many
- items as the number of boxes desired. This attribute
- has effect only under the q1/median/q3 signature. If
- `lowerfence` is not provided but a sample (in `y` or
- `x`) is set, we compute the lower as the last sample
- point below 1.5 times the IQR.
- lowerfencesrc
- Sets the source reference on Chart Studio Cloud for
- lowerfence .
- marker
- :class:`plotly.graph_objects.box.Marker` instance or
- dict with compatible properties
- mean
- Sets the mean values. There should be as many items as
- the number of boxes desired. This attribute has effect
- only under the q1/median/q3 signature. If `mean` is not
- provided but a sample (in `y` or `x`) is set, we
- compute the mean for each box using the sample values.
- meansrc
- Sets the source reference on Chart Studio Cloud for
- mean .
- median
- Sets the median values. There should be as many items
- as the number of boxes desired.
- mediansrc
- Sets the source reference on Chart Studio Cloud for
- median .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover. For box traces, the name will
- also be used for the position coordinate, if `x` and
- `x0` (`y` and `y0` if horizontal) are missing and the
- position axis is categorical
- notched
- Determines whether or not notches are drawn. Notches
- displays a confidence interval around the median. We
- compute the confidence interval as median +/- 1.57 *
- IQR / sqrt(N), where IQR is the interquartile range and
- N is the sample size. If two boxes' notches do not
- overlap there is 95% confidence their medians differ.
- See https://sites.google.com/site/davidsstatistics/home
- /notched-box-plots for more info. Defaults to False
- unless `notchwidth` or `notchspan` is set.
- notchspan
- Sets the notch span from the boxes' `median` values.
- There should be as many items as the number of boxes
- desired. This attribute has effect only under the
- q1/median/q3 signature. If `notchspan` is not provided
- but a sample (in `y` or `x`) is set, we compute it as
- 1.57 * IQR / sqrt(N), where N is the sample size.
- notchspansrc
- Sets the source reference on Chart Studio Cloud for
- notchspan .
- notchwidth
- Sets the width of the notches relative to the box'
- width. For example, with 0, the notches are as wide as
- the box(es).
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the box(es). If "v" ("h"), the
- distribution is visualized along the vertical
- (horizontal).
- pointpos
- Sets the position of the sample points in relation to
- the box(es). If 0, the sample points are places over
- the center of the box(es). Positive (negative) values
- correspond to positions to the right (left) for
- vertical boxes and above (below) for horizontal boxes
- q1
- Sets the Quartile 1 values. There should be as many
- items as the number of boxes desired.
- q1src
- Sets the source reference on Chart Studio Cloud for q1
- .
- q3
- Sets the Quartile 3 values. There should be as many
- items as the number of boxes desired.
- q3src
- Sets the source reference on Chart Studio Cloud for q3
- .
- quartilemethod
- Sets the method used to compute the sample's Q1 and Q3
- quartiles. The "linear" method uses the 25th percentile
- for Q1 and 75th percentile for Q3 as computed using
- method #10 (listed on http://www.amstat.org/publication
- s/jse/v14n3/langford.html). The "exclusive" method uses
- the median to divide the ordered dataset into two
- halves if the sample is odd, it does not include the
- median in either half - Q1 is then the median of the
- lower half and Q3 the median of the upper half. The
- "inclusive" method also uses the median to divide the
- ordered dataset into two halves but if the sample is
- odd, it includes the median in both halves - Q1 is then
- the median of the lower half and Q3 the median of the
- upper half.
- sd
- Sets the standard deviation values. There should be as
- many items as the number of boxes desired. This
- attribute has effect only under the q1/median/q3
- signature. If `sd` is not provided but a sample (in `y`
- or `x`) is set, we compute the standard deviation for
- each box using the sample values.
- sdsrc
- Sets the source reference on Chart Studio Cloud for sd
- .
- selected
- :class:`plotly.graph_objects.box.Selected` instance or
- dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.box.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each sample
- value. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.box.Unselected` instance
- or dict with compatible properties
- upperfence
- Sets the upper fence values. There should be as many
- items as the number of boxes desired. This attribute
- has effect only under the q1/median/q3 signature. If
- `upperfence` is not provided but a sample (in `y` or
- `x`) is set, we compute the lower as the last sample
- point above 1.5 times the IQR.
- upperfencesrc
- Sets the source reference on Chart Studio Cloud for
- upperfence .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- whiskerwidth
- Sets the width of the whiskers relative to the box'
- width. For example, with 1, the whiskers are as wide as
- the box(es).
- width
- Sets the width of the box in data coordinate If 0
- (default value) the width is automatically selected
- based on the positions of other box traces in the same
- subplot.
- x
- Sets the x sample data or coordinates. See overview for
- more info.
- x0
- Sets the x coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y sample data or coordinates. See overview for
- more info.
- y0
- Sets the y coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- boxmean=None,
- boxpoints=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- fillcolor=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hoveron=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- jitter=None,
- legendgroup=None,
- line=None,
- lowerfence=None,
- lowerfencesrc=None,
- marker=None,
- mean=None,
- meansrc=None,
- median=None,
- mediansrc=None,
- meta=None,
- metasrc=None,
- name=None,
- notched=None,
- notchspan=None,
- notchspansrc=None,
- notchwidth=None,
- offsetgroup=None,
- opacity=None,
- orientation=None,
- pointpos=None,
- q1=None,
- q1src=None,
- q3=None,
- q3src=None,
- quartilemethod=None,
- sd=None,
- sdsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- text=None,
- textsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- upperfence=None,
- upperfencesrc=None,
- visible=None,
- whiskerwidth=None,
- width=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Box object
-
- Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The
- second quartile (Q2, i.e. the median) is marked by a line
- inside the box. The fences grow outward from the boxes' edges,
- by default they span +/- 1.5 times the interquartile range
- (IQR: Q3-Q1), The sample mean and standard deviation as well as
- notches and the sample, outlier and suspected outliers points
- can be optionally added to the box plot. The values and
- positions corresponding to each boxes can be input using two
- signatures. The first signature expects users to supply the
- sample values in the `y` data array for vertical boxes (`x` for
- horizontal boxes). By supplying an `x` (`y`) array, one box per
- distinct `x` (`y`) value is drawn If no `x` (`y`) list is
- provided, a single box is drawn. In this case, the box is
- positioned with the trace `name` or with `x0` (`y0`) if
- provided. The second signature expects users to supply the
- boxes corresponding Q1, median and Q3 statistics in the `q1`,
- `median` and `q3` data arrays respectively. Other box features
- relying on statistics namely `lowerfence`, `upperfence`,
- `notchspan` can be set directly by the users. To have plotly
- compute them or to show sample points besides the boxes, users
- can set the `y` data array for vertical boxes (`x` for
- horizontal boxes) to a 2D array with the outer length
- corresponding to the number of boxes in the traces and the
- inner length corresponding the sample size.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Box`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- boxmean
- If True, the mean of the box(es)' underlying
- distribution is drawn as a dashed line inside the
- box(es). If "sd" the standard deviation is also drawn.
- Defaults to True when `mean` is set. Defaults to "sd"
- when `sd` is set Otherwise defaults to False.
- boxpoints
- If "outliers", only the sample points lying outside the
- whiskers are shown If "suspectedoutliers", the outlier
- points are shown and points either less than 4*Q1-3*Q3
- or greater than 4*Q3-3*Q1 are highlighted (see
- `outliercolor`) If "all", all sample points are shown
- If False, only the box(es) are shown with no sample
- points Defaults to "suspectedoutliers" when
- `marker.outliercolor` or `marker.line.outliercolor` is
- set. Defaults to "all" under the q1/median/q3
- signature. Otherwise defaults to "outliers".
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step for multi-box traces set
- using q1/median/q3.
- dy
- Sets the y coordinate step for multi-box traces set
- using q1/median/q3.
- fillcolor
- Sets the fill color. Defaults to a half-transparent
- variant of the line color, marker color, or marker line
- color, whichever is available.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.box.Hoverlabel` instance
- or dict with compatible properties
- hoveron
- Do the hover effects highlight individual boxes or
- sample points or both?
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- jitter
- Sets the amount of jitter in the sample points drawn.
- If 0, the sample points align along the distribution
- axis. If 1, the sample points are drawn in a random
- jitter of width equal to the width of the box(es).
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- line
- :class:`plotly.graph_objects.box.Line` instance or dict
- with compatible properties
- lowerfence
- Sets the lower fence values. There should be as many
- items as the number of boxes desired. This attribute
- has effect only under the q1/median/q3 signature. If
- `lowerfence` is not provided but a sample (in `y` or
- `x`) is set, we compute the lower as the last sample
- point below 1.5 times the IQR.
- lowerfencesrc
- Sets the source reference on Chart Studio Cloud for
- lowerfence .
- marker
- :class:`plotly.graph_objects.box.Marker` instance or
- dict with compatible properties
- mean
- Sets the mean values. There should be as many items as
- the number of boxes desired. This attribute has effect
- only under the q1/median/q3 signature. If `mean` is not
- provided but a sample (in `y` or `x`) is set, we
- compute the mean for each box using the sample values.
- meansrc
- Sets the source reference on Chart Studio Cloud for
- mean .
- median
- Sets the median values. There should be as many items
- as the number of boxes desired.
- mediansrc
- Sets the source reference on Chart Studio Cloud for
- median .
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover. For box traces, the name will
- also be used for the position coordinate, if `x` and
- `x0` (`y` and `y0` if horizontal) are missing and the
- position axis is categorical
- notched
- Determines whether or not notches are drawn. Notches
- displays a confidence interval around the median. We
- compute the confidence interval as median +/- 1.57 *
- IQR / sqrt(N), where IQR is the interquartile range and
- N is the sample size. If two boxes' notches do not
- overlap there is 95% confidence their medians differ.
- See https://sites.google.com/site/davidsstatistics/home
- /notched-box-plots for more info. Defaults to False
- unless `notchwidth` or `notchspan` is set.
- notchspan
- Sets the notch span from the boxes' `median` values.
- There should be as many items as the number of boxes
- desired. This attribute has effect only under the
- q1/median/q3 signature. If `notchspan` is not provided
- but a sample (in `y` or `x`) is set, we compute it as
- 1.57 * IQR / sqrt(N), where N is the sample size.
- notchspansrc
- Sets the source reference on Chart Studio Cloud for
- notchspan .
- notchwidth
- Sets the width of the notches relative to the box'
- width. For example, with 0, the notches are as wide as
- the box(es).
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the box(es). If "v" ("h"), the
- distribution is visualized along the vertical
- (horizontal).
- pointpos
- Sets the position of the sample points in relation to
- the box(es). If 0, the sample points are places over
- the center of the box(es). Positive (negative) values
- correspond to positions to the right (left) for
- vertical boxes and above (below) for horizontal boxes
- q1
- Sets the Quartile 1 values. There should be as many
- items as the number of boxes desired.
- q1src
- Sets the source reference on Chart Studio Cloud for q1
- .
- q3
- Sets the Quartile 3 values. There should be as many
- items as the number of boxes desired.
- q3src
- Sets the source reference on Chart Studio Cloud for q3
- .
- quartilemethod
- Sets the method used to compute the sample's Q1 and Q3
- quartiles. The "linear" method uses the 25th percentile
- for Q1 and 75th percentile for Q3 as computed using
- method #10 (listed on http://www.amstat.org/publication
- s/jse/v14n3/langford.html). The "exclusive" method uses
- the median to divide the ordered dataset into two
- halves if the sample is odd, it does not include the
- median in either half - Q1 is then the median of the
- lower half and Q3 the median of the upper half. The
- "inclusive" method also uses the median to divide the
- ordered dataset into two halves but if the sample is
- odd, it includes the median in both halves - Q1 is then
- the median of the lower half and Q3 the median of the
- upper half.
- sd
- Sets the standard deviation values. There should be as
- many items as the number of boxes desired. This
- attribute has effect only under the q1/median/q3
- signature. If `sd` is not provided but a sample (in `y`
- or `x`) is set, we compute the standard deviation for
- each box using the sample values.
- sdsrc
- Sets the source reference on Chart Studio Cloud for sd
- .
- selected
- :class:`plotly.graph_objects.box.Selected` instance or
- dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.box.Stream` instance or
- dict with compatible properties
- text
- Sets the text elements associated with each sample
- value. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.box.Unselected` instance
- or dict with compatible properties
- upperfence
- Sets the upper fence values. There should be as many
- items as the number of boxes desired. This attribute
- has effect only under the q1/median/q3 signature. If
- `upperfence` is not provided but a sample (in `y` or
- `x`) is set, we compute the lower as the last sample
- point above 1.5 times the IQR.
- upperfencesrc
- Sets the source reference on Chart Studio Cloud for
- upperfence .
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- whiskerwidth
- Sets the width of the whiskers relative to the box'
- width. For example, with 1, the whiskers are as wide as
- the box(es).
- width
- Sets the width of the box in data coordinate If 0
- (default value) the width is automatically selected
- based on the positions of other box traces in the same
- subplot.
- x
- Sets the x sample data or coordinates. See overview for
- more info.
- x0
- Sets the x coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y sample data or coordinates. See overview for
- more info.
- y0
- Sets the y coordinate for single-box traces or the
- starting coordinate for multi-box traces set using
- q1/median/q3. See overview for more info.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Box
- """
- super(Box, self).__init__("box")
-
- # 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.Box
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Box`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import box as v_box
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_box.AlignmentgroupValidator()
- self._validators["boxmean"] = v_box.BoxmeanValidator()
- self._validators["boxpoints"] = v_box.BoxpointsValidator()
- self._validators["customdata"] = v_box.CustomdataValidator()
- self._validators["customdatasrc"] = v_box.CustomdatasrcValidator()
- self._validators["dx"] = v_box.DxValidator()
- self._validators["dy"] = v_box.DyValidator()
- self._validators["fillcolor"] = v_box.FillcolorValidator()
- self._validators["hoverinfo"] = v_box.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_box.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_box.HoverlabelValidator()
- self._validators["hoveron"] = v_box.HoveronValidator()
- self._validators["hovertemplate"] = v_box.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_box.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_box.HovertextValidator()
- self._validators["hovertextsrc"] = v_box.HovertextsrcValidator()
- self._validators["ids"] = v_box.IdsValidator()
- self._validators["idssrc"] = v_box.IdssrcValidator()
- self._validators["jitter"] = v_box.JitterValidator()
- self._validators["legendgroup"] = v_box.LegendgroupValidator()
- self._validators["line"] = v_box.LineValidator()
- self._validators["lowerfence"] = v_box.LowerfenceValidator()
- self._validators["lowerfencesrc"] = v_box.LowerfencesrcValidator()
- self._validators["marker"] = v_box.MarkerValidator()
- self._validators["mean"] = v_box.MeanValidator()
- self._validators["meansrc"] = v_box.MeansrcValidator()
- self._validators["median"] = v_box.MedianValidator()
- self._validators["mediansrc"] = v_box.MediansrcValidator()
- self._validators["meta"] = v_box.MetaValidator()
- self._validators["metasrc"] = v_box.MetasrcValidator()
- self._validators["name"] = v_box.NameValidator()
- self._validators["notched"] = v_box.NotchedValidator()
- self._validators["notchspan"] = v_box.NotchspanValidator()
- self._validators["notchspansrc"] = v_box.NotchspansrcValidator()
- self._validators["notchwidth"] = v_box.NotchwidthValidator()
- self._validators["offsetgroup"] = v_box.OffsetgroupValidator()
- self._validators["opacity"] = v_box.OpacityValidator()
- self._validators["orientation"] = v_box.OrientationValidator()
- self._validators["pointpos"] = v_box.PointposValidator()
- self._validators["q1"] = v_box.Q1Validator()
- self._validators["q1src"] = v_box.Q1SrcValidator()
- self._validators["q3"] = v_box.Q3Validator()
- self._validators["q3src"] = v_box.Q3SrcValidator()
- self._validators["quartilemethod"] = v_box.QuartilemethodValidator()
- self._validators["sd"] = v_box.SdValidator()
- self._validators["sdsrc"] = v_box.SdsrcValidator()
- self._validators["selected"] = v_box.SelectedValidator()
- self._validators["selectedpoints"] = v_box.SelectedpointsValidator()
- self._validators["showlegend"] = v_box.ShowlegendValidator()
- self._validators["stream"] = v_box.StreamValidator()
- self._validators["text"] = v_box.TextValidator()
- self._validators["textsrc"] = v_box.TextsrcValidator()
- self._validators["uid"] = v_box.UidValidator()
- self._validators["uirevision"] = v_box.UirevisionValidator()
- self._validators["unselected"] = v_box.UnselectedValidator()
- self._validators["upperfence"] = v_box.UpperfenceValidator()
- self._validators["upperfencesrc"] = v_box.UpperfencesrcValidator()
- self._validators["visible"] = v_box.VisibleValidator()
- self._validators["whiskerwidth"] = v_box.WhiskerwidthValidator()
- self._validators["width"] = v_box.WidthValidator()
- self._validators["x"] = v_box.XValidator()
- self._validators["x0"] = v_box.X0Validator()
- self._validators["xaxis"] = v_box.XAxisValidator()
- self._validators["xcalendar"] = v_box.XcalendarValidator()
- self._validators["xsrc"] = v_box.XsrcValidator()
- self._validators["y"] = v_box.YValidator()
- self._validators["y0"] = v_box.Y0Validator()
- self._validators["yaxis"] = v_box.YAxisValidator()
- self._validators["ycalendar"] = v_box.YcalendarValidator()
- self._validators["ysrc"] = v_box.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("boxmean", None)
- self["boxmean"] = boxmean if boxmean is not None else _v
- _v = arg.pop("boxpoints", None)
- self["boxpoints"] = boxpoints if boxpoints is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("fillcolor", None)
- self["fillcolor"] = fillcolor if fillcolor is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hoveron", None)
- self["hoveron"] = hoveron if hoveron is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("jitter", None)
- self["jitter"] = jitter if jitter is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("line", None)
- self["line"] = line if line is not None else _v
- _v = arg.pop("lowerfence", None)
- self["lowerfence"] = lowerfence if lowerfence is not None else _v
- _v = arg.pop("lowerfencesrc", None)
- self["lowerfencesrc"] = lowerfencesrc if lowerfencesrc is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("mean", None)
- self["mean"] = mean if mean is not None else _v
- _v = arg.pop("meansrc", None)
- self["meansrc"] = meansrc if meansrc is not None else _v
- _v = arg.pop("median", None)
- self["median"] = median if median is not None else _v
- _v = arg.pop("mediansrc", None)
- self["mediansrc"] = mediansrc if mediansrc is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("notched", None)
- self["notched"] = notched if notched is not None else _v
- _v = arg.pop("notchspan", None)
- self["notchspan"] = notchspan if notchspan is not None else _v
- _v = arg.pop("notchspansrc", None)
- self["notchspansrc"] = notchspansrc if notchspansrc is not None else _v
- _v = arg.pop("notchwidth", None)
- self["notchwidth"] = notchwidth if notchwidth is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("pointpos", None)
- self["pointpos"] = pointpos if pointpos is not None else _v
- _v = arg.pop("q1", None)
- self["q1"] = q1 if q1 is not None else _v
- _v = arg.pop("q1src", None)
- self["q1src"] = q1src if q1src is not None else _v
- _v = arg.pop("q3", None)
- self["q3"] = q3 if q3 is not None else _v
- _v = arg.pop("q3src", None)
- self["q3src"] = q3src if q3src is not None else _v
- _v = arg.pop("quartilemethod", None)
- self["quartilemethod"] = quartilemethod if quartilemethod is not None else _v
- _v = arg.pop("sd", None)
- self["sd"] = sd if sd is not None else _v
- _v = arg.pop("sdsrc", None)
- self["sdsrc"] = sdsrc if sdsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("upperfence", None)
- self["upperfence"] = upperfence if upperfence is not None else _v
- _v = arg.pop("upperfencesrc", None)
- self["upperfencesrc"] = upperfencesrc if upperfencesrc is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("whiskerwidth", None)
- self["whiskerwidth"] = whiskerwidth if whiskerwidth is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "box"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="box", val="box"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Barpolar(_BaseTraceType):
-
- # base
- # ----
- @property
- def base(self):
- """
- Sets where the bar base is drawn (in radial axis units). In
- "stack" barmode, traces that set "base" will be excluded and
- drawn in "overlay" mode instead.
-
- The 'base' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["base"]
-
- @base.setter
- def base(self, val):
- self["base"] = val
-
- # basesrc
- # -------
- @property
- def basesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for base .
-
- The 'basesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["basesrc"]
-
- @basesrc.setter
- def basesrc(self, val):
- self["basesrc"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dr
- # --
- @property
- def dr(self):
- """
- Sets the r coordinate step.
-
- The 'dr' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dr"]
-
- @dr.setter
- def dr(self, val):
- self["dr"] = val
-
- # dtheta
- # ------
- @property
- def dtheta(self):
- """
- Sets the theta coordinate step. By default, the `dtheta` step
- equals the subplot's period divided by the length of the `r`
- coordinates.
-
- The 'dtheta' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dtheta"]
-
- @dtheta.setter
- def dtheta(self, val):
- self["dtheta"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
- (e.g. 'r+theta')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.barpolar.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- Anything contained in tag `` is displayed in the
- secondary box, for example "{fullData.name}". To
- hide the secondary box completely, use an empty tag
- ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Same as `text`.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.barpolar.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.barpolar.marker.Co
- lorBar` instance or dict with compatible
- properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.barpolar.marker.Li
- ne` instance or dict with compatible properties
- opacity
- Sets the opacity of the bars.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.barpolar.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # offset
- # ------
- @property
- def offset(self):
- """
- Shifts the angular position where the bar is drawn (in
- "thetatunit" units).
-
- The 'offset' property is a number and may be specified as:
- - An int or float
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["offset"]
-
- @offset.setter
- def offset(self, val):
- self["offset"] = val
-
- # offsetsrc
- # ---------
- @property
- def offsetsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for offset .
-
- The 'offsetsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["offsetsrc"]
-
- @offsetsrc.setter
- def offsetsrc(self, val):
- self["offsetsrc"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # r
- # -
- @property
- def r(self):
- """
- Sets the radial coordinates
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # r0
- # --
- @property
- def r0(self):
- """
- Alternate to `r`. Builds a linear space of r coordinates. Use
- with `dr` where `r0` is the starting coordinate and `dr` the
- step.
-
- The 'r0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["r0"]
-
- @r0.setter
- def r0(self, val):
- self["r0"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.barpolar.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.barpolar.selected.
- Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.barpolar.selected.
- Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.barpolar.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.barpolar.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.barpolar.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # subplot
- # -------
- @property
- def subplot(self):
- """
- Sets a reference between this trace's data coordinates and a
- polar subplot. If "polar" (the default value), the data refer
- to `layout.polar`. If "polar2", the data refer to
- `layout.polar2`, and so on.
-
- The 'subplot' property is an identifier of a particular
- subplot, of type 'polar', that may be specified as the string 'polar'
- optionally followed by an integer >= 1
- (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.)
-
- Returns
- -------
- str
- """
- return self["subplot"]
-
- @subplot.setter
- def subplot(self, val):
- self["subplot"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets hover text elements associated with each bar. If a single
- string, the same string appears over all bars. If an array of
- string, the items are mapped in order to the this trace's
- coordinates.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # theta
- # -----
- @property
- def theta(self):
- """
- Sets the angular coordinates
-
- The 'theta' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["theta"]
-
- @theta.setter
- def theta(self, val):
- self["theta"] = val
-
- # theta0
- # ------
- @property
- def theta0(self):
- """
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the starting
- coordinate and `dtheta` the step.
-
- The 'theta0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["theta0"]
-
- @theta0.setter
- def theta0(self, val):
- self["theta0"] = val
-
- # thetasrc
- # --------
- @property
- def thetasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for theta .
-
- The 'thetasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["thetasrc"]
-
- @thetasrc.setter
- def thetasrc(self, val):
- self["thetasrc"] = val
-
- # thetaunit
- # ---------
- @property
- def thetaunit(self):
- """
- Sets the unit of input "theta" values. Has an effect only when
- on "linear" angular axes.
-
- The 'thetaunit' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['radians', 'degrees', 'gradians']
-
- Returns
- -------
- Any
- """
- return self["thetaunit"]
-
- @thetaunit.setter
- def thetaunit(self, val):
- self["thetaunit"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.barpolar.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.barpolar.unselecte
- d.Marker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.barpolar.unselecte
- d.Textfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.barpolar.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the bar angular width (in "thetaunit" units).
-
- The 'width' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["width"]
-
- @width.setter
- def width(self, val):
- self["width"] = val
-
- # widthsrc
- # --------
- @property
- def widthsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for width .
-
- The 'widthsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["widthsrc"]
-
- @widthsrc.setter
- def widthsrc(self, val):
- self["widthsrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- base
- Sets where the bar base is drawn (in radial axis
- units). In "stack" barmode, traces that set "base" will
- be excluded and drawn in "overlay" mode instead.
- basesrc
- Sets the source reference on Chart Studio Cloud for
- base .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.barpolar.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.barpolar.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the angular position where the bar is drawn (in
- "thetatunit" units).
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.barpolar.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.barpolar.Stream` instance
- or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets hover text elements associated with each bar. If a
- single string, the same string appears over all bars.
- If an array of string, the items are mapped in order to
- the this trace's coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.barpolar.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar angular width (in "thetaunit" units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
- """
-
- def __init__(
- self,
- arg=None,
- base=None,
- basesrc=None,
- customdata=None,
- customdatasrc=None,
- dr=None,
- dtheta=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- offset=None,
- offsetsrc=None,
- opacity=None,
- r=None,
- r0=None,
- rsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- subplot=None,
- text=None,
- textsrc=None,
- theta=None,
- theta0=None,
- thetasrc=None,
- thetaunit=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- width=None,
- widthsrc=None,
- **kwargs
- ):
- """
- Construct a new Barpolar object
-
- The data visualized by the radial span of the bars is set in
- `r`
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Barpolar`
- base
- Sets where the bar base is drawn (in radial axis
- units). In "stack" barmode, traces that set "base" will
- be excluded and drawn in "overlay" mode instead.
- basesrc
- Sets the source reference on Chart Studio Cloud for
- base .
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dr
- Sets the r coordinate step.
- dtheta
- Sets the theta coordinate step. By default, the
- `dtheta` step equals the subplot's period divided by
- the length of the `r` coordinates.
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.barpolar.Hoverlabel`
- instance or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. Anything contained in tag `` is
- displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Same as `text`.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.barpolar.Marker` instance
- or dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the angular position where the bar is drawn (in
- "thetatunit" units).
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- r
- Sets the radial coordinates
- r0
- Alternate to `r`. Builds a linear space of r
- coordinates. Use with `dr` where `r0` is the starting
- coordinate and `dr` the step.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.barpolar.Selected`
- instance or dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.barpolar.Stream` instance
- or dict with compatible properties
- subplot
- Sets a reference between this trace's data coordinates
- and a polar subplot. If "polar" (the default value),
- the data refer to `layout.polar`. If "polar2", the data
- refer to `layout.polar2`, and so on.
- text
- Sets hover text elements associated with each bar. If a
- single string, the same string appears over all bars.
- If an array of string, the items are mapped in order to
- the this trace's coordinates.
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- theta
- Sets the angular coordinates
- theta0
- Alternate to `theta`. Builds a linear space of theta
- coordinates. Use with `dtheta` where `theta0` is the
- starting coordinate and `dtheta` the step.
- thetasrc
- Sets the source reference on Chart Studio Cloud for
- theta .
- thetaunit
- Sets the unit of input "theta" values. Has an effect
- only when on "linear" angular axes.
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.barpolar.Unselected`
- instance or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar angular width (in "thetaunit" units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
-
- Returns
- -------
- Barpolar
- """
- super(Barpolar, self).__init__("barpolar")
-
- # Validate arg
- # ------------
- if arg is None:
- arg = {}
- elif isinstance(arg, self.__class__):
- arg = arg.to_plotly_json()
- elif isinstance(arg, dict):
- arg = _copy.copy(arg)
- else:
- raise ValueError(
- """\
-The first argument to the plotly.graph_objs.Barpolar
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Barpolar`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import barpolar as v_barpolar
-
- # Initialize validators
- # ---------------------
- self._validators["base"] = v_barpolar.BaseValidator()
- self._validators["basesrc"] = v_barpolar.BasesrcValidator()
- self._validators["customdata"] = v_barpolar.CustomdataValidator()
- self._validators["customdatasrc"] = v_barpolar.CustomdatasrcValidator()
- self._validators["dr"] = v_barpolar.DrValidator()
- self._validators["dtheta"] = v_barpolar.DthetaValidator()
- self._validators["hoverinfo"] = v_barpolar.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_barpolar.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_barpolar.HoverlabelValidator()
- self._validators["hovertemplate"] = v_barpolar.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_barpolar.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_barpolar.HovertextValidator()
- self._validators["hovertextsrc"] = v_barpolar.HovertextsrcValidator()
- self._validators["ids"] = v_barpolar.IdsValidator()
- self._validators["idssrc"] = v_barpolar.IdssrcValidator()
- self._validators["legendgroup"] = v_barpolar.LegendgroupValidator()
- self._validators["marker"] = v_barpolar.MarkerValidator()
- self._validators["meta"] = v_barpolar.MetaValidator()
- self._validators["metasrc"] = v_barpolar.MetasrcValidator()
- self._validators["name"] = v_barpolar.NameValidator()
- self._validators["offset"] = v_barpolar.OffsetValidator()
- self._validators["offsetsrc"] = v_barpolar.OffsetsrcValidator()
- self._validators["opacity"] = v_barpolar.OpacityValidator()
- self._validators["r"] = v_barpolar.RValidator()
- self._validators["r0"] = v_barpolar.R0Validator()
- self._validators["rsrc"] = v_barpolar.RsrcValidator()
- self._validators["selected"] = v_barpolar.SelectedValidator()
- self._validators["selectedpoints"] = v_barpolar.SelectedpointsValidator()
- self._validators["showlegend"] = v_barpolar.ShowlegendValidator()
- self._validators["stream"] = v_barpolar.StreamValidator()
- self._validators["subplot"] = v_barpolar.SubplotValidator()
- self._validators["text"] = v_barpolar.TextValidator()
- self._validators["textsrc"] = v_barpolar.TextsrcValidator()
- self._validators["theta"] = v_barpolar.ThetaValidator()
- self._validators["theta0"] = v_barpolar.Theta0Validator()
- self._validators["thetasrc"] = v_barpolar.ThetasrcValidator()
- self._validators["thetaunit"] = v_barpolar.ThetaunitValidator()
- self._validators["uid"] = v_barpolar.UidValidator()
- self._validators["uirevision"] = v_barpolar.UirevisionValidator()
- self._validators["unselected"] = v_barpolar.UnselectedValidator()
- self._validators["visible"] = v_barpolar.VisibleValidator()
- self._validators["width"] = v_barpolar.WidthValidator()
- self._validators["widthsrc"] = v_barpolar.WidthsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("base", None)
- self["base"] = base if base is not None else _v
- _v = arg.pop("basesrc", None)
- self["basesrc"] = basesrc if basesrc is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dr", None)
- self["dr"] = dr if dr is not None else _v
- _v = arg.pop("dtheta", None)
- self["dtheta"] = dtheta if dtheta is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("offset", None)
- self["offset"] = offset if offset is not None else _v
- _v = arg.pop("offsetsrc", None)
- self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("r0", None)
- self["r0"] = r0 if r0 is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("subplot", None)
- self["subplot"] = subplot if subplot is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("theta", None)
- self["theta"] = theta if theta is not None else _v
- _v = arg.pop("theta0", None)
- self["theta0"] = theta0 if theta0 is not None else _v
- _v = arg.pop("thetasrc", None)
- self["thetasrc"] = thetasrc if thetasrc is not None else _v
- _v = arg.pop("thetaunit", None)
- self["thetaunit"] = thetaunit if thetaunit is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("widthsrc", None)
- self["widthsrc"] = widthsrc if widthsrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "barpolar"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="barpolar", val="barpolar"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Bar(_BaseTraceType):
-
- # alignmentgroup
- # --------------
- @property
- def alignmentgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same alignmentgroup. This controls whether bars
- compute their positional range dependently or independently.
-
- The 'alignmentgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["alignmentgroup"]
-
- @alignmentgroup.setter
- def alignmentgroup(self, val):
- self["alignmentgroup"] = val
-
- # base
- # ----
- @property
- def base(self):
- """
- Sets where the bar base is drawn (in position axis units). In
- "stack" or "relative" barmode, traces that set "base" will be
- excluded and drawn in "overlay" mode instead.
-
- The 'base' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["base"]
-
- @base.setter
- def base(self, val):
- self["base"] = val
-
- # basesrc
- # -------
- @property
- def basesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for base .
-
- The 'basesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["basesrc"]
-
- @basesrc.setter
- def basesrc(self, val):
- self["basesrc"] = val
-
- # cliponaxis
- # ----------
- @property
- def cliponaxis(self):
- """
- Determines whether the text nodes are clipped about the subplot
- axes. To show the text nodes above axis lines and tick labels,
- make sure to set `xaxis.layer` and `yaxis.layer` to *below
- traces*.
-
- The 'cliponaxis' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["cliponaxis"]
-
- @cliponaxis.setter
- def cliponaxis(self, val):
- self["cliponaxis"] = val
-
- # constraintext
- # -------------
- @property
- def constraintext(self):
- """
- Constrain the size of text inside or outside a bar to be no
- larger than the bar itself.
-
- The 'constraintext' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'both', 'none']
-
- Returns
- -------
- Any
- """
- return self["constraintext"]
-
- @constraintext.setter
- def constraintext(self, val):
- self["constraintext"] = val
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # dx
- # --
- @property
- def dx(self):
- """
- Sets the x coordinate step. See `x0` for more info.
-
- The 'dx' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dx"]
-
- @dx.setter
- def dx(self, val):
- self["dx"] = val
-
- # dy
- # --
- @property
- def dy(self):
- """
- Sets the y coordinate step. See `y0` for more info.
-
- The 'dy' property is a number and may be specified as:
- - An int or float
-
- Returns
- -------
- int|float
- """
- return self["dy"]
-
- @dy.setter
- def dy(self, val):
- self["dy"] = val
-
- # error_x
- # -------
- @property
- def error_x(self):
- """
- The 'error_x' property is an instance of ErrorX
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.ErrorX`
- - A dict of string/value properties that will be passed
- to the ErrorX constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- copy_ystyle
-
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.bar.ErrorX
- """
- return self["error_x"]
-
- @error_x.setter
- def error_x(self, val):
- self["error_x"] = val
-
- # error_y
- # -------
- @property
- def error_y(self):
- """
- The 'error_y' property is an instance of ErrorY
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.ErrorY`
- - A dict of string/value properties that will be passed
- to the ErrorY constructor
-
- Supported dict properties:
-
- array
- Sets the data corresponding the length of each
- error bar. Values are plotted relative to the
- underlying data.
- arrayminus
- Sets the data corresponding the length of each
- error bar in the bottom (left) direction for
- vertical (horizontal) bars Values are plotted
- relative to the underlying data.
- arrayminussrc
- Sets the source reference on Chart Studio Cloud
- for arrayminus .
- arraysrc
- Sets the source reference on Chart Studio Cloud
- for array .
- color
- Sets the stoke color of the error bars.
- symmetric
- Determines whether or not the error bars have
- the same length in both direction (top/bottom
- for vertical bars, left/right for horizontal
- bars.
- thickness
- Sets the thickness (in px) of the error bars.
- traceref
-
- tracerefminus
-
- type
- Determines the rule used to generate the error
- bars. If *constant`, the bar lengths are of a
- constant value. Set this constant in `value`.
- If "percent", the bar lengths correspond to a
- percentage of underlying data. Set this
- percentage in `value`. If "sqrt", the bar
- lengths correspond to the sqaure of the
- underlying data. If "data", the bar lengths are
- set with data set `array`.
- value
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars.
- valueminus
- Sets the value of either the percentage (if
- `type` is set to "percent") or the constant (if
- `type` is set to "constant") corresponding to
- the lengths of the error bars in the bottom
- (left) direction for vertical (horizontal) bars
- visible
- Determines whether or not this set of error
- bars is visible.
- width
- Sets the width (in px) of the cross-bar at both
- ends of the error bars.
-
- Returns
- -------
- plotly.graph_objs.bar.ErrorY
- """
- return self["error_y"]
-
- @error_y.setter
- def error_y(self, val):
- self["error_y"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.bar.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovertemplate
- # -------------
- @property
- def hovertemplate(self):
- """
- Template string used for rendering the information that appear
- on hover box. Note that this will override `hoverinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. The variables available in
- `hovertemplate` are the ones emitted as event data described at
- this link https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be specified per-
- point (the ones that are `arrayOk: true`) are available.
- variables `value` and `label`. Anything contained in tag
- `` is displayed in the secondary box, for example
- "{fullData.name}". To hide the secondary box
- completely, use an empty tag ``.
-
- The 'hovertemplate' 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["hovertemplate"]
-
- @hovertemplate.setter
- def hovertemplate(self, val):
- self["hovertemplate"] = val
-
- # hovertemplatesrc
- # ----------------
- @property
- def hovertemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
-
- The 'hovertemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertemplatesrc"]
-
- @hovertemplatesrc.setter
- def hovertemplatesrc(self, val):
- self["hovertemplatesrc"] = val
-
- # hovertext
- # ---------
- @property
- def hovertext(self):
- """
- Sets hover text elements associated with each (x,y) pair. If a
- single string, the same string appears over all the data
- points. If an array of string, the items are mapped in order to
- the this trace's (x,y) coordinates. To be seen, trace
- `hoverinfo` must contain a "text" flag.
-
- The 'hovertext' 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["hovertext"]
-
- @hovertext.setter
- def hovertext(self, val):
- self["hovertext"] = val
-
- # hovertextsrc
- # ------------
- @property
- def hovertextsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hovertext
- .
-
- The 'hovertextsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hovertextsrc"]
-
- @hovertextsrc.setter
- def hovertextsrc(self, val):
- self["hovertextsrc"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # insidetextanchor
- # ----------------
- @property
- def insidetextanchor(self):
- """
- Determines if texts are kept at center or start/end points in
- `textposition` "inside" mode.
-
- The 'insidetextanchor' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['end', 'middle', 'start']
-
- Returns
- -------
- Any
- """
- return self["insidetextanchor"]
-
- @insidetextanchor.setter
- def insidetextanchor(self, val):
- self["insidetextanchor"] = val
-
- # insidetextfont
- # --------------
- @property
- def insidetextfont(self):
- """
- Sets the font used for `text` lying inside the bar.
-
- The 'insidetextfont' property is an instance of Insidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Insidetextfont`
- - A dict of string/value properties that will be passed
- to the Insidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.bar.Insidetextfont
- """
- return self["insidetextfont"]
-
- @insidetextfont.setter
- def insidetextfont(self, val):
- self["insidetextfont"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- autocolorscale
- Determines whether the colorscale is a default
- palette (`autocolorscale: true`) or the palette
- determined by `marker.colorscale`. Has an
- effect only if in `marker.color`is set to a
- numerical array. 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
- in `marker.color`) or the bounds set in
- `marker.cmin` and `marker.cmax` Has an effect
- only if in `marker.color`is set to a numerical
- array. Defaults to `false` when `marker.cmin`
- and `marker.cmax` are set by the user.
- cmax
- Sets the upper bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmin` must be set as well.
- cmid
- Sets the mid-point of the color domain by
- scaling `marker.cmin` and/or `marker.cmax` to
- be equidistant to this point. Has an effect
- only if in `marker.color`is set to a numerical
- array. Value should have the same units as in
- `marker.color`. Has no effect when
- `marker.cauto` is `false`.
- cmin
- Sets the lower bound of the color domain. Has
- an effect only if in `marker.color`is set to a
- numerical array. Value should have the same
- units as in `marker.color` and if set,
- `marker.cmax` must be set as well.
- color
- Sets themarkercolor. It accepts either a
- specific color or an array of numbers that are
- mapped to the colorscale relative to the max
- and min values of the array or relative to
- `marker.cmin` and `marker.cmax` if set.
- coloraxis
- Sets a reference to a shared color axis.
- References to these shared color axes are
- "coloraxis", "coloraxis2", "coloraxis3", etc.
- Settings for these shared color axes are set in
- the layout, under `layout.coloraxis`,
- `layout.coloraxis2`, etc. Note that multiple
- color scales can be linked to the same color
- axis.
- colorbar
- :class:`plotly.graph_objects.bar.marker.ColorBa
- r` instance or dict with compatible properties
- colorscale
- Sets the colorscale. Has an effect only if in
- `marker.color`is set to a numerical array. 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`marker.cmin` and
- `marker.cmax`. Alternatively, `colorscale` may
- be a palette name string of the following list:
- Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
- ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
- arth,Electric,Viridis,Cividis.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- line
- :class:`plotly.graph_objects.bar.marker.Line`
- instance or dict with compatible properties
- opacity
- Sets the opacity of the bars.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- reversescale
- Reverses the color mapping if true. Has an
- effect only if in `marker.color`is set to a
- numerical array. If true, `marker.cmin` will
- correspond to the last color in the array and
- `marker.cmax` will correspond to the first
- color.
- showscale
- Determines whether or not a colorbar is
- displayed for this trace. Has an effect only if
- in `marker.color`is set to a numerical array.
-
- Returns
- -------
- plotly.graph_objs.bar.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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
-
- # offset
- # ------
- @property
- def offset(self):
- """
- Shifts the position where the bar is drawn (in position axis
- units). In "group" barmode, traces that set "offset" will be
- excluded and drawn in "overlay" mode instead.
-
- The 'offset' property is a number and may be specified as:
- - An int or float
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["offset"]
-
- @offset.setter
- def offset(self, val):
- self["offset"] = val
-
- # offsetgroup
- # -----------
- @property
- def offsetgroup(self):
- """
- Set several traces linked to the same position axis or matching
- axes to the same offsetgroup where bars of the same position
- coordinate will line up.
-
- The 'offsetgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["offsetgroup"]
-
- @offsetgroup.setter
- def offsetgroup(self, val):
- self["offsetgroup"] = val
-
- # offsetsrc
- # ---------
- @property
- def offsetsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for offset .
-
- The 'offsetsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["offsetsrc"]
-
- @offsetsrc.setter
- def offsetsrc(self, val):
- self["offsetsrc"] = val
-
- # opacity
- # -------
- @property
- def opacity(self):
- """
- Sets the opacity of the trace.
-
- 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
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Sets the orientation of the bars. With "v" ("h"), the value of
- the each bar spans along the vertical (horizontal).
-
- 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
-
- # outsidetextfont
- # ---------------
- @property
- def outsidetextfont(self):
- """
- Sets the font used for `text` lying outside the bar.
-
- The 'outsidetextfont' property is an instance of Outsidetextfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Outsidetextfont`
- - A dict of string/value properties that will be passed
- to the Outsidetextfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.bar.Outsidetextfont
- """
- return self["outsidetextfont"]
-
- @outsidetextfont.setter
- def outsidetextfont(self, val):
- self["outsidetextfont"] = val
-
- # r
- # -
- @property
- def r(self):
- """
- r coordinates in scatter traces are deprecated!Please switch to
- the "scatterpolar" trace type.Sets the radial coordinatesfor
- legacy polar chart only.
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # selected
- # --------
- @property
- def selected(self):
- """
- The 'selected' property is an instance of Selected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Selected`
- - A dict of string/value properties that will be passed
- to the Selected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.bar.selected.Marke
- r` instance or dict with compatible properties
- textfont
- :class:`plotly.graph_objects.bar.selected.Textf
- ont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.bar.Selected
- """
- return self["selected"]
-
- @selected.setter
- def selected(self, val):
- self["selected"] = val
-
- # selectedpoints
- # --------------
- @property
- def selectedpoints(self):
- """
- Array containing integer indices of selected points. Has an
- effect only for traces that support selections. Note that an
- empty array means an empty selection where the `unselected` are
- turned on for all points, whereas, any other non-array values
- means no selection all where the `selected` and `unselected`
- styles have no effect.
-
- The 'selectedpoints' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectedpoints"]
-
- @selectedpoints.setter
- def selectedpoints(self, val):
- self["selectedpoints"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.bar.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # t
- # -
- @property
- def t(self):
- """
- t coordinates in scatter traces are deprecated!Please switch to
- the "scatterpolar" trace type.Sets the angular coordinatesfor
- legacy polar chart only.
-
- The 't' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["t"]
-
- @t.setter
- def t(self, val):
- self["t"] = val
-
- # text
- # ----
- @property
- def text(self):
- """
- Sets text elements associated with each (x,y) pair. If a single
- string, the same string appears over all the data points. If an
- array of string, the items are mapped in order to the this
- trace's (x,y) coordinates. If trace `hoverinfo` contains a
- "text" flag and "hovertext" is not set, these elements will be
- seen in the hover labels.
-
- The 'text' 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["text"]
-
- @text.setter
- def text(self, val):
- self["text"] = val
-
- # textangle
- # ---------
- @property
- def textangle(self):
- """
- Sets the angle of the tick labels with respect to the bar. For
- example, a `tickangle` of -90 draws the tick labels vertically.
- With "auto" the texts may automatically be rotated to fit with
- the maximum size in bars.
-
- The 'textangle' property is a angle (in degrees) that may be
- specified as a number between -180 and 180. Numeric values outside this
- range are converted to the equivalent value
- (e.g. 270 is converted to -90).
-
- Returns
- -------
- int|float
- """
- return self["textangle"]
-
- @textangle.setter
- def textangle(self, val):
- self["textangle"] = val
-
- # textfont
- # --------
- @property
- def textfont(self):
- """
- Sets the font used for `text`.
-
- The 'textfont' property is an instance of Textfont
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Textfont`
- - A dict of string/value properties that will be passed
- to the Textfont constructor
-
- Supported dict properties:
-
- color
-
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- family
- HTML font family - the typeface that will be
- applied by the web browser. The web browser
- will only be able to apply a font if it is
- available on the system which it operates.
- Provide multiple font families, separated by
- commas, to indicate the preference in which to
- apply fonts if they aren't available on the
- system. The Chart Studio Cloud (at
- https://chart-studio.plotly.com or on-premise)
- generates images on a server, where only a
- select number of fonts are installed and
- supported. These include "Arial", "Balto",
- "Courier New", "Droid Sans",, "Droid Serif",
- "Droid Sans Mono", "Gravitas One", "Old
- Standard TT", "Open Sans", "Overpass", "PT Sans
- Narrow", "Raleway", "Times New Roman".
- familysrc
- Sets the source reference on Chart Studio Cloud
- for family .
- size
-
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
-
- Returns
- -------
- plotly.graph_objs.bar.Textfont
- """
- return self["textfont"]
-
- @textfont.setter
- def textfont(self, val):
- self["textfont"] = val
-
- # textposition
- # ------------
- @property
- def textposition(self):
- """
- Specifies the location of the `text`. "inside" positions `text`
- inside, next to the bar end (rotated and scaled if needed).
- "outside" positions `text` outside, next to the bar end (scaled
- if needed), unless there is another bar stacked on this one,
- then the text gets pushed inside. "auto" tries to position
- `text` inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
-
- The 'textposition' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['inside', 'outside', 'auto', 'none']
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["textposition"]
-
- @textposition.setter
- def textposition(self, val):
- self["textposition"] = val
-
- # textpositionsrc
- # ---------------
- @property
- def textpositionsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- textposition .
-
- The 'textpositionsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textpositionsrc"]
-
- @textpositionsrc.setter
- def textpositionsrc(self, val):
- self["textpositionsrc"] = val
-
- # textsrc
- # -------
- @property
- def textsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for text .
-
- The 'textsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["textsrc"]
-
- @textsrc.setter
- def textsrc(self, val):
- self["textsrc"] = val
-
- # texttemplate
- # ------------
- @property
- def texttemplate(self):
- """
- Template string used for rendering the information text that
- appear on points. Note that this will override `textinfo`.
- Variables are inserted using %{variable}, for example "y:
- %{y}". Numbers are formatted using d3-format's syntax
- %{variable:d3-format}, for example "Price: %{y:$.2f}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for details on
- the formatting syntax. Dates are formatted using d3-time-
- format's syntax %{variable|d3-time-format}, for example "Day:
- %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for details on
- the date formatting syntax. Every attributes that can be
- specified per-point (the ones that are `arrayOk: true`) are
- available. variables `value` and `label`.
-
- The 'texttemplate' 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["texttemplate"]
-
- @texttemplate.setter
- def texttemplate(self, val):
- self["texttemplate"] = val
-
- # texttemplatesrc
- # ---------------
- @property
- def texttemplatesrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
-
- The 'texttemplatesrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["texttemplatesrc"]
-
- @texttemplatesrc.setter
- def texttemplatesrc(self, val):
- self["texttemplatesrc"] = val
-
- # tsrc
- # ----
- @property
- def tsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for t .
-
- The 'tsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["tsrc"]
-
- @tsrc.setter
- def tsrc(self, val):
- self["tsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # unselected
- # ----------
- @property
- def unselected(self):
- """
- The 'unselected' property is an instance of Unselected
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.bar.Unselected`
- - A dict of string/value properties that will be passed
- to the Unselected constructor
-
- Supported dict properties:
-
- marker
- :class:`plotly.graph_objects.bar.unselected.Mar
- ker` instance or dict with compatible
- properties
- textfont
- :class:`plotly.graph_objects.bar.unselected.Tex
- tfont` instance or dict with compatible
- properties
-
- Returns
- -------
- plotly.graph_objs.bar.Unselected
- """
- return self["unselected"]
-
- @unselected.setter
- def unselected(self, val):
- self["unselected"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the bar width (in position axis units).
-
- The 'width' property is a number and may be specified as:
- - An int or float in the interval [0, inf]
- - A tuple, list, or one-dimensional numpy array of the above
-
- Returns
- -------
- int|float|numpy.ndarray
- """
- return self["width"]
-
- @width.setter
- def width(self, val):
- self["width"] = val
-
- # widthsrc
- # --------
- @property
- def widthsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for width .
-
- The 'widthsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["widthsrc"]
-
- @widthsrc.setter
- def widthsrc(self, val):
- self["widthsrc"] = val
-
- # x
- # -
- @property
- def x(self):
- """
- Sets the x coordinates.
-
- The 'x' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["x"]
-
- @x.setter
- def x(self, val):
- self["x"] = val
-
- # x0
- # --
- @property
- def x0(self):
- """
- Alternate to `x`. Builds a linear space of x coordinates. Use
- with `dx` where `x0` is the starting coordinate and `dx` the
- step.
-
- The 'x0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["x0"]
-
- @x0.setter
- def x0(self, val):
- self["x0"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- Sets a reference between this trace's x coordinates and a 2D
- cartesian x axis. If "x" (the default value), the x coordinates
- refer to `layout.xaxis`. If "x2", the x coordinates refer to
- `layout.xaxis2`, and so on.
-
- The 'xaxis' property is an identifier of a particular
- subplot, of type 'x', that may be specified as the string 'x'
- optionally followed by an integer >= 1
- (e.g. 'x', 'x1', 'x2', 'x3', etc.)
-
- Returns
- -------
- str
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # xcalendar
- # ---------
- @property
- def xcalendar(self):
- """
- Sets the calendar system to use with `x` date data.
-
- The 'xcalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["xcalendar"]
-
- @xcalendar.setter
- def xcalendar(self, val):
- self["xcalendar"] = val
-
- # xsrc
- # ----
- @property
- def xsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for x .
-
- The 'xsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["xsrc"]
-
- @xsrc.setter
- def xsrc(self, val):
- self["xsrc"] = val
-
- # y
- # -
- @property
- def y(self):
- """
- Sets the y coordinates.
-
- The 'y' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["y"]
-
- @y.setter
- def y(self, val):
- self["y"] = val
-
- # y0
- # --
- @property
- def y0(self):
- """
- Alternate to `y`. Builds a linear space of y coordinates. Use
- with `dy` where `y0` is the starting coordinate and `dy` the
- step.
-
- The 'y0' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["y0"]
-
- @y0.setter
- def y0(self, val):
- self["y0"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- Sets a reference between this trace's y coordinates and a 2D
- cartesian y axis. If "y" (the default value), the y coordinates
- refer to `layout.yaxis`. If "y2", the y coordinates refer to
- `layout.yaxis2`, and so on.
-
- The 'yaxis' property is an identifier of a particular
- subplot, of type 'y', that may be specified as the string 'y'
- optionally followed by an integer >= 1
- (e.g. 'y', 'y1', 'y2', 'y3', etc.)
-
- Returns
- -------
- str
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # ycalendar
- # ---------
- @property
- def ycalendar(self):
- """
- Sets the calendar system to use with `y` date data.
-
- The 'ycalendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["ycalendar"]
-
- @ycalendar.setter
- def ycalendar(self, val):
- self["ycalendar"] = val
-
- # ysrc
- # ----
- @property
- def ysrc(self):
- """
- Sets the source reference on Chart Studio Cloud for y .
-
- The 'ysrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["ysrc"]
-
- @ysrc.setter
- def ysrc(self, val):
- self["ysrc"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- base
- Sets where the bar base is drawn (in position axis
- units). In "stack" or "relative" barmode, traces that
- set "base" will be excluded and drawn in "overlay" mode
- instead.
- basesrc
- Sets the source reference on Chart Studio Cloud for
- base .
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.bar.ErrorX` instance or
- dict with compatible properties
- error_y
- :class:`plotly.graph_objects.bar.ErrorY` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.bar.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `value` and `label`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.bar.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- r
- r coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the radial
- coordinatesfor legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.bar.Selected` instance or
- dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.bar.Stream` instance or
- dict with compatible properties
- t
- t coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the
- angular coordinatesfor legacy polar chart only.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `value` and
- `label`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.bar.Unselected` instance
- or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
- """
-
- def __init__(
- self,
- arg=None,
- alignmentgroup=None,
- base=None,
- basesrc=None,
- cliponaxis=None,
- constraintext=None,
- customdata=None,
- customdatasrc=None,
- dx=None,
- dy=None,
- error_x=None,
- error_y=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- hovertemplate=None,
- hovertemplatesrc=None,
- hovertext=None,
- hovertextsrc=None,
- ids=None,
- idssrc=None,
- insidetextanchor=None,
- insidetextfont=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- offset=None,
- offsetgroup=None,
- offsetsrc=None,
- opacity=None,
- orientation=None,
- outsidetextfont=None,
- r=None,
- rsrc=None,
- selected=None,
- selectedpoints=None,
- showlegend=None,
- stream=None,
- t=None,
- text=None,
- textangle=None,
- textfont=None,
- textposition=None,
- textpositionsrc=None,
- textsrc=None,
- texttemplate=None,
- texttemplatesrc=None,
- tsrc=None,
- uid=None,
- uirevision=None,
- unselected=None,
- visible=None,
- width=None,
- widthsrc=None,
- x=None,
- x0=None,
- xaxis=None,
- xcalendar=None,
- xsrc=None,
- y=None,
- y0=None,
- yaxis=None,
- ycalendar=None,
- ysrc=None,
- **kwargs
- ):
- """
- Construct a new Bar object
-
- The data visualized by the span of the bars is set in `y` if
- `orientation` is set th "v" (the default) and the labels are
- set in `x`. By setting `orientation` to "h", the roles are
- interchanged.
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Bar`
- alignmentgroup
- Set several traces linked to the same position axis or
- matching axes to the same alignmentgroup. This controls
- whether bars compute their positional range dependently
- or independently.
- base
- Sets where the bar base is drawn (in position axis
- units). In "stack" or "relative" barmode, traces that
- set "base" will be excluded and drawn in "overlay" mode
- instead.
- basesrc
- Sets the source reference on Chart Studio Cloud for
- base .
- cliponaxis
- Determines whether the text nodes are clipped about the
- subplot axes. To show the text nodes above axis lines
- and tick labels, make sure to set `xaxis.layer` and
- `yaxis.layer` to *below traces*.
- constraintext
- Constrain the size of text inside or outside a bar to
- be no larger than the bar itself.
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- dx
- Sets the x coordinate step. See `x0` for more info.
- dy
- Sets the y coordinate step. See `y0` for more info.
- error_x
- :class:`plotly.graph_objects.bar.ErrorX` instance or
- dict with compatible properties
- error_y
- :class:`plotly.graph_objects.bar.ErrorY` instance or
- dict with compatible properties
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.bar.Hoverlabel` instance
- or dict with compatible properties
- hovertemplate
- Template string used for rendering the information that
- appear on hover box. Note that this will override
- `hoverinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. The variables
- available in `hovertemplate` are the ones emitted as
- event data described at this link
- https://plotly.com/javascript/plotlyjs-events/#event-
- data. Additionally, every attributes that can be
- specified per-point (the ones that are `arrayOk: true`)
- are available. variables `value` and `label`. Anything
- contained in tag `` is displayed in the
- secondary box, for example
- "{fullData.name}". To hide the secondary
- box completely, use an empty tag ``.
- hovertemplatesrc
- Sets the source reference on Chart Studio Cloud for
- hovertemplate .
- hovertext
- Sets hover text elements associated with each (x,y)
- pair. If a single string, the same string appears over
- all the data points. If an array of string, the items
- are mapped in order to the this trace's (x,y)
- coordinates. To be seen, trace `hoverinfo` must contain
- a "text" flag.
- hovertextsrc
- Sets the source reference on Chart Studio Cloud for
- hovertext .
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- insidetextanchor
- Determines if texts are kept at center or start/end
- points in `textposition` "inside" mode.
- insidetextfont
- Sets the font used for `text` lying inside the bar.
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.bar.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- offset
- Shifts the position where the bar is drawn (in position
- axis units). In "group" barmode, traces that set
- "offset" will be excluded and drawn in "overlay" mode
- instead.
- offsetgroup
- Set several traces linked to the same position axis or
- matching axes to the same offsetgroup where bars of the
- same position coordinate will line up.
- offsetsrc
- Sets the source reference on Chart Studio Cloud for
- offset .
- opacity
- Sets the opacity of the trace.
- orientation
- Sets the orientation of the bars. With "v" ("h"), the
- value of the each bar spans along the vertical
- (horizontal).
- outsidetextfont
- Sets the font used for `text` lying outside the bar.
- r
- r coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the radial
- coordinatesfor legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- selected
- :class:`plotly.graph_objects.bar.Selected` instance or
- dict with compatible properties
- selectedpoints
- Array containing integer indices of selected points.
- Has an effect only for traces that support selections.
- Note that an empty array means an empty selection where
- the `unselected` are turned on for all points, whereas,
- any other non-array values means no selection all where
- the `selected` and `unselected` styles have no effect.
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.bar.Stream` instance or
- dict with compatible properties
- t
- t coordinates in scatter traces are deprecated!Please
- switch to the "scatterpolar" trace type.Sets the
- angular coordinatesfor legacy polar chart only.
- text
- Sets text elements associated with each (x,y) pair. If
- a single string, the same string appears over all the
- data points. If an array of string, the items are
- mapped in order to the this trace's (x,y) coordinates.
- If trace `hoverinfo` contains a "text" flag and
- "hovertext" is not set, these elements will be seen in
- the hover labels.
- textangle
- Sets the angle of the tick labels with respect to the
- bar. For example, a `tickangle` of -90 draws the tick
- labels vertically. With "auto" the texts may
- automatically be rotated to fit with the maximum size
- in bars.
- textfont
- Sets the font used for `text`.
- textposition
- Specifies the location of the `text`. "inside"
- positions `text` inside, next to the bar end (rotated
- and scaled if needed). "outside" positions `text`
- outside, next to the bar end (scaled if needed), unless
- there is another bar stacked on this one, then the text
- gets pushed inside. "auto" tries to position `text`
- inside the bar, but if the bar is too small and no bar
- is stacked on this one the text is moved outside.
- textpositionsrc
- Sets the source reference on Chart Studio Cloud for
- textposition .
- textsrc
- Sets the source reference on Chart Studio Cloud for
- text .
- texttemplate
- Template string used for rendering the information text
- that appear on points. Note that this will override
- `textinfo`. Variables are inserted using %{variable},
- for example "y: %{y}". Numbers are formatted using
- d3-format's syntax %{variable:d3-format}, for example
- "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format for
- details on the formatting syntax. Dates are formatted
- using d3-time-format's syntax %{variable|d3-time-
- format}, for example "Day: %{2019-01-01|%A}".
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format for
- details on the date formatting syntax. Every attributes
- that can be specified per-point (the ones that are
- `arrayOk: true`) are available. variables `value` and
- `label`.
- texttemplatesrc
- Sets the source reference on Chart Studio Cloud for
- texttemplate .
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- unselected
- :class:`plotly.graph_objects.bar.Unselected` instance
- or dict with compatible properties
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- width
- Sets the bar width (in position axis units).
- widthsrc
- Sets the source reference on Chart Studio Cloud for
- width .
- x
- Sets the x coordinates.
- x0
- Alternate to `x`. Builds a linear space of x
- coordinates. Use with `dx` where `x0` is the starting
- coordinate and `dx` the step.
- xaxis
- Sets a reference between this trace's x coordinates and
- a 2D cartesian x axis. If "x" (the default value), the
- x coordinates refer to `layout.xaxis`. If "x2", the x
- coordinates refer to `layout.xaxis2`, and so on.
- xcalendar
- Sets the calendar system to use with `x` date data.
- xsrc
- Sets the source reference on Chart Studio Cloud for x
- .
- y
- Sets the y coordinates.
- y0
- Alternate to `y`. Builds a linear space of y
- coordinates. Use with `dy` where `y0` is the starting
- coordinate and `dy` the step.
- yaxis
- Sets a reference between this trace's y coordinates and
- a 2D cartesian y axis. If "y" (the default value), the
- y coordinates refer to `layout.yaxis`. If "y2", the y
- coordinates refer to `layout.yaxis2`, and so on.
- ycalendar
- Sets the calendar system to use with `y` date data.
- ysrc
- Sets the source reference on Chart Studio Cloud for y
- .
-
- Returns
- -------
- Bar
- """
- super(Bar, self).__init__("bar")
-
- # 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.Bar
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Bar`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import bar as v_bar
-
- # Initialize validators
- # ---------------------
- self._validators["alignmentgroup"] = v_bar.AlignmentgroupValidator()
- self._validators["base"] = v_bar.BaseValidator()
- self._validators["basesrc"] = v_bar.BasesrcValidator()
- self._validators["cliponaxis"] = v_bar.CliponaxisValidator()
- self._validators["constraintext"] = v_bar.ConstraintextValidator()
- self._validators["customdata"] = v_bar.CustomdataValidator()
- self._validators["customdatasrc"] = v_bar.CustomdatasrcValidator()
- self._validators["dx"] = v_bar.DxValidator()
- self._validators["dy"] = v_bar.DyValidator()
- self._validators["error_x"] = v_bar.ErrorXValidator()
- self._validators["error_y"] = v_bar.ErrorYValidator()
- self._validators["hoverinfo"] = v_bar.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_bar.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_bar.HoverlabelValidator()
- self._validators["hovertemplate"] = v_bar.HovertemplateValidator()
- self._validators["hovertemplatesrc"] = v_bar.HovertemplatesrcValidator()
- self._validators["hovertext"] = v_bar.HovertextValidator()
- self._validators["hovertextsrc"] = v_bar.HovertextsrcValidator()
- self._validators["ids"] = v_bar.IdsValidator()
- self._validators["idssrc"] = v_bar.IdssrcValidator()
- self._validators["insidetextanchor"] = v_bar.InsidetextanchorValidator()
- self._validators["insidetextfont"] = v_bar.InsidetextfontValidator()
- self._validators["legendgroup"] = v_bar.LegendgroupValidator()
- self._validators["marker"] = v_bar.MarkerValidator()
- self._validators["meta"] = v_bar.MetaValidator()
- self._validators["metasrc"] = v_bar.MetasrcValidator()
- self._validators["name"] = v_bar.NameValidator()
- self._validators["offset"] = v_bar.OffsetValidator()
- self._validators["offsetgroup"] = v_bar.OffsetgroupValidator()
- self._validators["offsetsrc"] = v_bar.OffsetsrcValidator()
- self._validators["opacity"] = v_bar.OpacityValidator()
- self._validators["orientation"] = v_bar.OrientationValidator()
- self._validators["outsidetextfont"] = v_bar.OutsidetextfontValidator()
- self._validators["r"] = v_bar.RValidator()
- self._validators["rsrc"] = v_bar.RsrcValidator()
- self._validators["selected"] = v_bar.SelectedValidator()
- self._validators["selectedpoints"] = v_bar.SelectedpointsValidator()
- self._validators["showlegend"] = v_bar.ShowlegendValidator()
- self._validators["stream"] = v_bar.StreamValidator()
- self._validators["t"] = v_bar.TValidator()
- self._validators["text"] = v_bar.TextValidator()
- self._validators["textangle"] = v_bar.TextangleValidator()
- self._validators["textfont"] = v_bar.TextfontValidator()
- self._validators["textposition"] = v_bar.TextpositionValidator()
- self._validators["textpositionsrc"] = v_bar.TextpositionsrcValidator()
- self._validators["textsrc"] = v_bar.TextsrcValidator()
- self._validators["texttemplate"] = v_bar.TexttemplateValidator()
- self._validators["texttemplatesrc"] = v_bar.TexttemplatesrcValidator()
- self._validators["tsrc"] = v_bar.TsrcValidator()
- self._validators["uid"] = v_bar.UidValidator()
- self._validators["uirevision"] = v_bar.UirevisionValidator()
- self._validators["unselected"] = v_bar.UnselectedValidator()
- self._validators["visible"] = v_bar.VisibleValidator()
- self._validators["width"] = v_bar.WidthValidator()
- self._validators["widthsrc"] = v_bar.WidthsrcValidator()
- self._validators["x"] = v_bar.XValidator()
- self._validators["x0"] = v_bar.X0Validator()
- self._validators["xaxis"] = v_bar.XAxisValidator()
- self._validators["xcalendar"] = v_bar.XcalendarValidator()
- self._validators["xsrc"] = v_bar.XsrcValidator()
- self._validators["y"] = v_bar.YValidator()
- self._validators["y0"] = v_bar.Y0Validator()
- self._validators["yaxis"] = v_bar.YAxisValidator()
- self._validators["ycalendar"] = v_bar.YcalendarValidator()
- self._validators["ysrc"] = v_bar.YsrcValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("alignmentgroup", None)
- self["alignmentgroup"] = alignmentgroup if alignmentgroup is not None else _v
- _v = arg.pop("base", None)
- self["base"] = base if base is not None else _v
- _v = arg.pop("basesrc", None)
- self["basesrc"] = basesrc if basesrc is not None else _v
- _v = arg.pop("cliponaxis", None)
- self["cliponaxis"] = cliponaxis if cliponaxis is not None else _v
- _v = arg.pop("constraintext", None)
- self["constraintext"] = constraintext if constraintext is not None else _v
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("dx", None)
- self["dx"] = dx if dx is not None else _v
- _v = arg.pop("dy", None)
- self["dy"] = dy if dy is not None else _v
- _v = arg.pop("error_x", None)
- self["error_x"] = error_x if error_x is not None else _v
- _v = arg.pop("error_y", None)
- self["error_y"] = error_y if error_y is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovertemplate", None)
- self["hovertemplate"] = hovertemplate if hovertemplate is not None else _v
- _v = arg.pop("hovertemplatesrc", None)
- self["hovertemplatesrc"] = (
- hovertemplatesrc if hovertemplatesrc is not None else _v
- )
- _v = arg.pop("hovertext", None)
- self["hovertext"] = hovertext if hovertext is not None else _v
- _v = arg.pop("hovertextsrc", None)
- self["hovertextsrc"] = hovertextsrc if hovertextsrc is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("insidetextanchor", None)
- self["insidetextanchor"] = (
- insidetextanchor if insidetextanchor is not None else _v
- )
- _v = arg.pop("insidetextfont", None)
- self["insidetextfont"] = insidetextfont if insidetextfont is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("offset", None)
- self["offset"] = offset if offset is not None else _v
- _v = arg.pop("offsetgroup", None)
- self["offsetgroup"] = offsetgroup if offsetgroup is not None else _v
- _v = arg.pop("offsetsrc", None)
- self["offsetsrc"] = offsetsrc if offsetsrc is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("outsidetextfont", None)
- self["outsidetextfont"] = outsidetextfont if outsidetextfont is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("selected", None)
- self["selected"] = selected if selected is not None else _v
- _v = arg.pop("selectedpoints", None)
- self["selectedpoints"] = selectedpoints if selectedpoints is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("t", None)
- self["t"] = t if t is not None else _v
- _v = arg.pop("text", None)
- self["text"] = text if text is not None else _v
- _v = arg.pop("textangle", None)
- self["textangle"] = textangle if textangle is not None else _v
- _v = arg.pop("textfont", None)
- self["textfont"] = textfont if textfont is not None else _v
- _v = arg.pop("textposition", None)
- self["textposition"] = textposition if textposition is not None else _v
- _v = arg.pop("textpositionsrc", None)
- self["textpositionsrc"] = textpositionsrc if textpositionsrc is not None else _v
- _v = arg.pop("textsrc", None)
- self["textsrc"] = textsrc if textsrc is not None else _v
- _v = arg.pop("texttemplate", None)
- self["texttemplate"] = texttemplate if texttemplate is not None else _v
- _v = arg.pop("texttemplatesrc", None)
- self["texttemplatesrc"] = texttemplatesrc if texttemplatesrc is not None else _v
- _v = arg.pop("tsrc", None)
- self["tsrc"] = tsrc if tsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("unselected", None)
- self["unselected"] = unselected if unselected is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("widthsrc", None)
- self["widthsrc"] = widthsrc if widthsrc is not None else _v
- _v = arg.pop("x", None)
- self["x"] = x if x is not None else _v
- _v = arg.pop("x0", None)
- self["x0"] = x0 if x0 is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("xcalendar", None)
- self["xcalendar"] = xcalendar if xcalendar is not None else _v
- _v = arg.pop("xsrc", None)
- self["xsrc"] = xsrc if xsrc is not None else _v
- _v = arg.pop("y", None)
- self["y"] = y if y is not None else _v
- _v = arg.pop("y0", None)
- self["y0"] = y0 if y0 is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
- _v = arg.pop("ycalendar", None)
- self["ycalendar"] = ycalendar if ycalendar is not None else _v
- _v = arg.pop("ysrc", None)
- self["ysrc"] = ysrc if ysrc is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "bar"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="bar", val="bar"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseTraceType as _BaseTraceType
-import copy as _copy
-
-
-class Area(_BaseTraceType):
-
- # customdata
- # ----------
- @property
- def customdata(self):
- """
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note that,
- "scatter" traces also appends customdata items in the markers
- DOM elements
-
- The 'customdata' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["customdata"]
-
- @customdata.setter
- def customdata(self, val):
- self["customdata"] = val
-
- # customdatasrc
- # -------------
- @property
- def customdatasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for customdata
- .
-
- The 'customdatasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["customdatasrc"]
-
- @customdatasrc.setter
- def customdatasrc(self, val):
- self["customdatasrc"] = val
-
- # hoverinfo
- # ---------
- @property
- def hoverinfo(self):
- """
- Determines which trace information appear on hover. If `none`
- or `skip` are set, no information is displayed upon hovering.
- But, if `none` is set, click and hover events are still fired.
-
- The 'hoverinfo' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
- (e.g. 'x+y')
- OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- - A list or array of the above
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["hoverinfo"]
-
- @hoverinfo.setter
- def hoverinfo(self, val):
- self["hoverinfo"] = val
-
- # hoverinfosrc
- # ------------
- @property
- def hoverinfosrc(self):
- """
- Sets the source reference on Chart Studio Cloud for hoverinfo
- .
-
- The 'hoverinfosrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hoverinfosrc"]
-
- @hoverinfosrc.setter
- def hoverinfosrc(self, val):
- self["hoverinfosrc"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.area.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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
- alignsrc
- Sets the source reference on Chart Studio Cloud
- for align .
- bgcolor
- Sets the background color of the hover labels
- for this trace
- bgcolorsrc
- Sets the source reference on Chart Studio Cloud
- for bgcolor .
- bordercolor
- Sets the border color of the hover labels for
- this trace.
- bordercolorsrc
- Sets the source reference on Chart Studio Cloud
- for bordercolor .
- font
- Sets the font used in hover labels.
- 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.
- namelengthsrc
- Sets the source reference on Chart Studio Cloud
- for namelength .
-
- Returns
- -------
- plotly.graph_objs.area.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # ids
- # ---
- @property
- def ids(self):
- """
- Assigns id labels to each datum. These ids for object constancy
- of data points during animation. Should be an array of strings,
- not numbers or any other type.
-
- The 'ids' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["ids"]
-
- @ids.setter
- def ids(self, val):
- self["ids"] = val
-
- # idssrc
- # ------
- @property
- def idssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for ids .
-
- The 'idssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["idssrc"]
-
- @idssrc.setter
- def idssrc(self, val):
- self["idssrc"] = val
-
- # legendgroup
- # -----------
- @property
- def legendgroup(self):
- """
- Sets the legend group for this trace. Traces part of the same
- legend group hide/show at the same time when toggling legend
- items.
-
- The 'legendgroup' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["legendgroup"]
-
- @legendgroup.setter
- def legendgroup(self, val):
- self["legendgroup"] = val
-
- # marker
- # ------
- @property
- def marker(self):
- """
- The 'marker' property is an instance of Marker
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.area.Marker`
- - A dict of string/value properties that will be passed
- to the Marker constructor
-
- Supported dict properties:
-
- color
- Area traces are deprecated! Please switch to
- the "barpolar" trace type. Sets themarkercolor.
- It accepts either a specific color or an array
- of numbers that are mapped to the colorscale
- relative to the max and min values of the array
- or relative to `marker.cmin` and `marker.cmax`
- if set.
- colorsrc
- Sets the source reference on Chart Studio Cloud
- for color .
- opacity
- Area traces are deprecated! Please switch to
- the "barpolar" trace type. Sets the marker
- opacity.
- opacitysrc
- Sets the source reference on Chart Studio Cloud
- for opacity .
- size
- Area traces are deprecated! Please switch to
- the "barpolar" trace type. Sets the marker size
- (in px).
- sizesrc
- Sets the source reference on Chart Studio Cloud
- for size .
- symbol
- Area traces are deprecated! Please switch to
- the "barpolar" trace type. Sets the marker
- symbol type. Adding 100 is equivalent to
- appending "-open" to a symbol name. Adding 200
- is equivalent to appending "-dot" to a symbol
- name. Adding 300 is equivalent to appending
- "-open-dot" or "dot-open" to a symbol name.
- symbolsrc
- Sets the source reference on Chart Studio Cloud
- for symbol .
-
- Returns
- -------
- plotly.graph_objs.area.Marker
- """
- return self["marker"]
-
- @marker.setter
- def marker(self, val):
- self["marker"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information associated with this trace that
- can be used in various text attributes. Attributes such as
- trace `name`, graph, axis and colorbar `title.text`, annotation
- `text` `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta` values in
- an attribute in the same trace, simply use `%{meta[i]}` where
- `i` is the index or key of the `meta` item in question. To
- access trace `meta` in layout attributes, use
- `%{data[n[.meta[i]}` where `i` is the index or key of the
- `meta` and `n` is the trace index.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- Sets the trace name. The trace name appear as the legend item
- and on hover.
-
- 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 trace.
-
- 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
-
- # r
- # -
- @property
- def r(self):
- """
- Area traces are deprecated! Please switch to the "barpolar"
- trace type. Sets the radial coordinates for legacy polar chart
- only.
-
- The 'r' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["r"]
-
- @r.setter
- def r(self, val):
- self["r"] = val
-
- # rsrc
- # ----
- @property
- def rsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for r .
-
- The 'rsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["rsrc"]
-
- @rsrc.setter
- def rsrc(self, val):
- self["rsrc"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not an item corresponding to this trace
- is shown in the legend.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # stream
- # ------
- @property
- def stream(self):
- """
- The 'stream' property is an instance of Stream
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.area.Stream`
- - A dict of string/value properties that will be passed
- to the Stream constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.area.Stream
- """
- return self["stream"]
-
- @stream.setter
- def stream(self, val):
- self["stream"] = val
-
- # t
- # -
- @property
- def t(self):
- """
- Area traces are deprecated! Please switch to the "barpolar"
- trace type. Sets the angular coordinates for legacy polar chart
- only.
-
- The 't' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["t"]
-
- @t.setter
- def t(self, val):
- self["t"] = val
-
- # tsrc
- # ----
- @property
- def tsrc(self):
- """
- Sets the source reference on Chart Studio Cloud for t .
-
- The 'tsrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["tsrc"]
-
- @tsrc.setter
- def tsrc(self, val):
- self["tsrc"] = val
-
- # uid
- # ---
- @property
- def uid(self):
- """
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and transitions.
-
- The 'uid' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["uid"]
-
- @uid.setter
- def uid(self, val):
- self["uid"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Controls persistence of some user-driven changes to the trace:
- `constraintrange` in `parcoords` traces, as well as some
- `editable: true` modifications such as `name` and
- `colorbar.title`. Defaults to `layout.uirevision`. Note that
- other user-driven trace attribute changes are controlled by
- `layout` attributes: `trace.visible` is controlled by
- `layout.legend.uirevision`, `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
- with `config: {editable: true}`) is controlled by
- `layout.editrevision`. Trace changes are tracked by `uid`,
- which only falls back on trace index if no `uid` is provided.
- So if your app can add/remove traces before the end of the
- `data` array, such that the same trace has a different index,
- you can still preserve user-driven changes if you give each
- trace a `uid` that stays with it as it moves.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # visible
- # -------
- @property
- def visible(self):
- """
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as a
- legend item (provided that the legend itself is visible).
-
- The 'visible' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- [True, False, 'legendonly']
-
- Returns
- -------
- Any
- """
- return self["visible"]
-
- @visible.setter
- def visible(self, val):
- self["visible"] = val
-
- # type
- # ----
- @property
- def type(self):
- return self._props["type"]
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.area.Hoverlabel` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.area.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Area traces are deprecated! Please switch to the
- "barpolar" trace type. Sets the radial coordinates for
- legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.area.Stream` instance or
- dict with compatible properties
- t
- Area traces are deprecated! Please switch to the
- "barpolar" trace type. Sets the angular coordinates for
- legacy polar chart only.
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
- """
-
- def __init__(
- self,
- arg=None,
- customdata=None,
- customdatasrc=None,
- hoverinfo=None,
- hoverinfosrc=None,
- hoverlabel=None,
- ids=None,
- idssrc=None,
- legendgroup=None,
- marker=None,
- meta=None,
- metasrc=None,
- name=None,
- opacity=None,
- r=None,
- rsrc=None,
- showlegend=None,
- stream=None,
- t=None,
- tsrc=None,
- uid=None,
- uirevision=None,
- visible=None,
- **kwargs
- ):
- """
- Construct a new Area object
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Area`
- customdata
- Assigns extra data each datum. This may be useful when
- listening to hover, click and selection events. Note
- that, "scatter" traces also appends customdata items in
- the markers DOM elements
- customdatasrc
- Sets the source reference on Chart Studio Cloud for
- customdata .
- hoverinfo
- Determines which trace information appear on hover. If
- `none` or `skip` are set, no information is displayed
- upon hovering. But, if `none` is set, click and hover
- events are still fired.
- hoverinfosrc
- Sets the source reference on Chart Studio Cloud for
- hoverinfo .
- hoverlabel
- :class:`plotly.graph_objects.area.Hoverlabel` instance
- or dict with compatible properties
- ids
- Assigns id labels to each datum. These ids for object
- constancy of data points during animation. Should be an
- array of strings, not numbers or any other type.
- idssrc
- Sets the source reference on Chart Studio Cloud for
- ids .
- legendgroup
- Sets the legend group for this trace. Traces part of
- the same legend group hide/show at the same time when
- toggling legend items.
- marker
- :class:`plotly.graph_objects.area.Marker` instance or
- dict with compatible properties
- meta
- Assigns extra meta information associated with this
- trace that can be used in various text attributes.
- Attributes such as trace `name`, graph, axis and
- colorbar `title.text`, annotation `text`
- `rangeselector`, `updatemenues` and `sliders` `label`
- text all support `meta`. To access the trace `meta`
- values in an attribute in the same trace, simply use
- `%{meta[i]}` where `i` is the index or key of the
- `meta` item in question. To access trace `meta` in
- layout attributes, use `%{data[n[.meta[i]}` where `i`
- is the index or key of the `meta` and `n` is the trace
- index.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- name
- Sets the trace name. The trace name appear as the
- legend item and on hover.
- opacity
- Sets the opacity of the trace.
- r
- Area traces are deprecated! Please switch to the
- "barpolar" trace type. Sets the radial coordinates for
- legacy polar chart only.
- rsrc
- Sets the source reference on Chart Studio Cloud for r
- .
- showlegend
- Determines whether or not an item corresponding to this
- trace is shown in the legend.
- stream
- :class:`plotly.graph_objects.area.Stream` instance or
- dict with compatible properties
- t
- Area traces are deprecated! Please switch to the
- "barpolar" trace type. Sets the angular coordinates for
- legacy polar chart only.
- tsrc
- Sets the source reference on Chart Studio Cloud for t
- .
- uid
- Assign an id to this trace, Use this to provide object
- constancy between traces during animations and
- transitions.
- uirevision
- Controls persistence of some user-driven changes to the
- trace: `constraintrange` in `parcoords` traces, as well
- as some `editable: true` modifications such as `name`
- and `colorbar.title`. Defaults to `layout.uirevision`.
- Note that other user-driven trace attribute changes are
- controlled by `layout` attributes: `trace.visible` is
- controlled by `layout.legend.uirevision`,
- `selectedpoints` is controlled by
- `layout.selectionrevision`, and `colorbar.(x|y)`
- (accessible with `config: {editable: true}`) is
- controlled by `layout.editrevision`. Trace changes are
- tracked by `uid`, which only falls back on trace index
- if no `uid` is provided. So if your app can add/remove
- traces before the end of the `data` array, such that
- the same trace has a different index, you can still
- preserve user-driven changes if you give each trace a
- `uid` that stays with it as it moves.
- visible
- Determines whether or not this trace is visible. If
- "legendonly", the trace is not drawn, but can appear as
- a legend item (provided that the legend itself is
- visible).
-
- Returns
- -------
- Area
- """
- super(Area, self).__init__("area")
-
- # 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.Area
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Area`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import area as v_area
-
- # Initialize validators
- # ---------------------
- self._validators["customdata"] = v_area.CustomdataValidator()
- self._validators["customdatasrc"] = v_area.CustomdatasrcValidator()
- self._validators["hoverinfo"] = v_area.HoverinfoValidator()
- self._validators["hoverinfosrc"] = v_area.HoverinfosrcValidator()
- self._validators["hoverlabel"] = v_area.HoverlabelValidator()
- self._validators["ids"] = v_area.IdsValidator()
- self._validators["idssrc"] = v_area.IdssrcValidator()
- self._validators["legendgroup"] = v_area.LegendgroupValidator()
- self._validators["marker"] = v_area.MarkerValidator()
- self._validators["meta"] = v_area.MetaValidator()
- self._validators["metasrc"] = v_area.MetasrcValidator()
- self._validators["name"] = v_area.NameValidator()
- self._validators["opacity"] = v_area.OpacityValidator()
- self._validators["r"] = v_area.RValidator()
- self._validators["rsrc"] = v_area.RsrcValidator()
- self._validators["showlegend"] = v_area.ShowlegendValidator()
- self._validators["stream"] = v_area.StreamValidator()
- self._validators["t"] = v_area.TValidator()
- self._validators["tsrc"] = v_area.TsrcValidator()
- self._validators["uid"] = v_area.UidValidator()
- self._validators["uirevision"] = v_area.UirevisionValidator()
- self._validators["visible"] = v_area.VisibleValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("customdata", None)
- self["customdata"] = customdata if customdata is not None else _v
- _v = arg.pop("customdatasrc", None)
- self["customdatasrc"] = customdatasrc if customdatasrc is not None else _v
- _v = arg.pop("hoverinfo", None)
- self["hoverinfo"] = hoverinfo if hoverinfo is not None else _v
- _v = arg.pop("hoverinfosrc", None)
- self["hoverinfosrc"] = hoverinfosrc if hoverinfosrc is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("ids", None)
- self["ids"] = ids if ids is not None else _v
- _v = arg.pop("idssrc", None)
- self["idssrc"] = idssrc if idssrc is not None else _v
- _v = arg.pop("legendgroup", None)
- self["legendgroup"] = legendgroup if legendgroup is not None else _v
- _v = arg.pop("marker", None)
- self["marker"] = marker if marker is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("opacity", None)
- self["opacity"] = opacity if opacity is not None else _v
- _v = arg.pop("r", None)
- self["r"] = r if r is not None else _v
- _v = arg.pop("rsrc", None)
- self["rsrc"] = rsrc if rsrc is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("stream", None)
- self["stream"] = stream if stream is not None else _v
- _v = arg.pop("t", None)
- self["t"] = t if t is not None else _v
- _v = arg.pop("tsrc", None)
- self["tsrc"] = tsrc if tsrc is not None else _v
- _v = arg.pop("uid", None)
- self["uid"] = uid if uid is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("visible", None)
- self["visible"] = visible if visible is not None else _v
-
- # Read-only literals
- # ------------------
- from _plotly_utils.basevalidators import LiteralValidator
-
- self._props["type"] = "area"
- self._validators["type"] = LiteralValidator(
- plotly_name="type", parent_name="area", val="area"
- )
- arg.pop("type", None)
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType
-import copy as _copy
-
-
-class Layout(_BaseLayoutType):
-
- _subplotid_prop_names = [
- "coloraxis",
- "geo",
- "mapbox",
- "polar",
- "scene",
- "ternary",
- "xaxis",
- "yaxis",
- ]
-
- import re
-
- _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + ")(\d+)$")
-
- @property
- def _subplotid_validators(self):
- """
- dict of validator classes for each subplot type
-
- Returns
- -------
- dict
- """
- from plotly.validators.layout import (
- ColoraxisValidator,
- GeoValidator,
- MapboxValidator,
- PolarValidator,
- SceneValidator,
- TernaryValidator,
- XAxisValidator,
- YAxisValidator,
- )
-
- return {
- "coloraxis": ColoraxisValidator,
- "geo": GeoValidator,
- "mapbox": MapboxValidator,
- "polar": PolarValidator,
- "scene": SceneValidator,
- "ternary": TernaryValidator,
- "xaxis": XAxisValidator,
- "yaxis": YAxisValidator,
- }
-
- def _subplot_re_match(self, prop):
- return self._subplotid_prop_re.match(prop)
-
- # angularaxis
- # -----------
- @property
- def angularaxis(self):
- """
- The 'angularaxis' property is an instance of AngularAxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.AngularAxis`
- - A dict of string/value properties that will be passed
- to the AngularAxis constructor
-
- Supported dict properties:
-
- domain
- Polar chart subplots are not supported yet.
- This key has currently no effect.
- endpadding
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots.
- range
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Defines the start
- and end point of this angular axis.
- showline
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not the line bounding this angular axis will
- be shown on the figure.
- showticklabels
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not the angular axis ticks will feature tick
- labels.
- tickcolor
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the color of
- the tick lines on this angular axis.
- ticklen
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the length of
- the tick lines on this angular axis.
- tickorientation
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the
- orientation (from the paper perspective) of the
- angular axis tick labels.
- ticksuffix
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the length of
- the tick lines on this angular axis.
- visible
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not this axis will be visible.
-
- Returns
- -------
- plotly.graph_objs.layout.AngularAxis
- """
- return self["angularaxis"]
-
- @angularaxis.setter
- def angularaxis(self, val):
- self["angularaxis"] = val
-
- # annotations
- # -----------
- @property
- def annotations(self):
- """
- The 'annotations' property is a tuple of instances of
- Annotation that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.layout.Annotation
- - A list or tuple of dicts of string/value properties that
- will be passed to the Annotation constructor
-
- Supported dict properties:
-
- align
- Sets the horizontal alignment of the `text`
- within the box. Has an effect only if `text`
- spans two or more lines (i.e. `text` contains
- one or more
HTML tags) or if an explicit
- width is set to override the text width.
- arrowcolor
- Sets the color of the annotation arrow.
- arrowhead
- Sets the end annotation arrow head style.
- arrowside
- Sets the annotation arrow head position.
- arrowsize
- Sets the size of the end annotation arrow head,
- relative to `arrowwidth`. A value of 1
- (default) gives a head about 3x as wide as the
- line.
- arrowwidth
- Sets the width (in px) of annotation arrow
- line.
- ax
- Sets the x component of the arrow tail about
- the arrow head. If `axref` is `pixel`, a
- positive (negative) component corresponds to
- an arrow pointing from right to left (left to
- right). If `axref` is an axis, this is an
- absolute value on that axis, like `x`, NOT a
- relative value.
- axref
- Indicates in what terms the tail of the
- annotation (ax,ay) is specified. If `pixel`,
- `ax` is a relative offset in pixels from `x`.
- If set to an x axis id (e.g. "x" or "x2"), `ax`
- is specified in the same terms as that axis.
- This is useful for trendline annotations which
- should continue to indicate the correct trend
- when zoomed.
- ay
- Sets the y component of the arrow tail about
- the arrow head. If `ayref` is `pixel`, a
- positive (negative) component corresponds to
- an arrow pointing from bottom to top (top to
- bottom). If `ayref` is an axis, this is an
- absolute value on that axis, like `y`, NOT a
- relative value.
- ayref
- Indicates in what terms the tail of the
- annotation (ax,ay) is specified. If `pixel`,
- `ay` is a relative offset in pixels from `y`.
- If set to a y axis id (e.g. "y" or "y2"), `ay`
- is specified in the same terms as that axis.
- This is useful for trendline annotations which
- should continue to indicate the correct trend
- when zoomed.
- bgcolor
- Sets the background color of the annotation.
- bordercolor
- Sets the color of the border enclosing the
- annotation `text`.
- borderpad
- Sets the padding (in px) between the `text` and
- the enclosing border.
- borderwidth
- Sets the width (in px) of the border enclosing
- the annotation `text`.
- captureevents
- Determines whether the annotation text box
- captures mouse move and click events, or allows
- those events to pass through to data points in
- the plot that may be behind the annotation. By
- default `captureevents` is False unless
- `hovertext` is provided. If you use the event
- `plotly_clickannotation` without `hovertext`
- you must explicitly enable `captureevents`.
- clicktoshow
- Makes this annotation respond to clicks on the
- plot. If you click a data point that exactly
- matches the `x` and `y` values of this
- annotation, and it is hidden (visible: false),
- it will appear. In "onoff" mode, you must click
- the same point again to make it disappear, so
- if you click multiple points, you can show
- multiple annotations. In "onout" mode, a click
- anywhere else in the plot (on another data
- point or not) will hide this annotation. If you
- need to show/hide this annotation in response
- to different `x` or `y` values, you can set
- `xclick` and/or `yclick`. This is useful for
- example to label the side of a bar. To label
- markers though, `standoff` is preferred over
- `xclick` and `yclick`.
- font
- Sets the annotation text font.
- height
- Sets an explicit height for the text box. null
- (default) lets the text set the box height.
- Taller text will be clipped.
- hoverlabel
- :class:`plotly.graph_objects.layout.annotation.
- Hoverlabel` instance or dict with compatible
- properties
- hovertext
- Sets text to appear when hovering over this
- annotation. If omitted or blank, no hover label
- will appear.
- name
- When used in a template, named items are
- created in the output figure in addition to any
- items the figure already has in this array. You
- can modify these items in the output figure by
- making your own item with `templateitemname`
- matching this `name` alongside your
- modifications (including `visible: false` or
- `enabled: false` to hide it). Has no effect
- outside of a template.
- opacity
- Sets the opacity of the annotation (text +
- arrow).
- showarrow
- Determines whether or not the annotation is
- drawn with an arrow. If True, `text` is placed
- near the arrow's tail. If False, `text` lines
- up with the `x` and `y` provided.
- standoff
- Sets a distance, in pixels, to move the end
- arrowhead away from the position it is pointing
- at, for example to point at the edge of a
- marker independent of zoom. Note that this
- shortens the arrow from the `ax` / `ay` vector,
- in contrast to `xshift` / `yshift` which moves
- everything by this amount.
- startarrowhead
- Sets the start annotation arrow head style.
- startarrowsize
- Sets the size of the start annotation arrow
- head, relative to `arrowwidth`. A value of 1
- (default) gives a head about 3x as wide as the
- line.
- startstandoff
- Sets a distance, in pixels, to move the start
- arrowhead away from the position it is pointing
- at, for example to point at the edge of a
- marker independent of zoom. Note that this
- shortens the arrow from the `ax` / `ay` vector,
- in contrast to `xshift` / `yshift` which moves
- everything by this amount.
- templateitemname
- Used to refer to a named item in this array in
- the template. Named items from the template
- will be created even without a matching item in
- the input figure, but you can modify one by
- making an item with `templateitemname` matching
- its `name`, alongside your modifications
- (including `visible: false` or `enabled: false`
- to hide it). If there is no template or no
- matching item, this item will be hidden unless
- you explicitly show it with `visible: true`.
- text
- Sets the text associated with this annotation.
- Plotly uses a subset of HTML tags to do things
- like newline (
), bold (), italics
- (), hyperlinks ().
- Tags , , are also
- supported.
- textangle
- Sets the angle at which the `text` is drawn
- with respect to the horizontal.
- valign
- Sets the vertical alignment of the `text`
- within the box. Has an effect only if an
- explicit height is set to override the text
- height.
- visible
- Determines whether or not this annotation is
- visible.
- width
- Sets an explicit width for the text box. null
- (default) lets the text set the box width.
- Wider text will be clipped. There is no
- automatic wrapping; use
to start a new
- line.
- x
- Sets the annotation's x position. If the axis
- `type` is "log", then you must take the log of
- your desired range. If the axis `type` is
- "date", it should be date strings, like date
- data, though Date objects and unix milliseconds
- will be accepted and converted to strings. If
- the axis `type` is "category", it should be
- numbers, using the scale where each category is
- assigned a serial number from zero in the order
- it appears.
- xanchor
- Sets the text box's horizontal position anchor
- This anchor binds the `x` position to the
- "left", "center" or "right" of the annotation.
- For example, if `x` is set to 1, `xref` to
- "paper" and `xanchor` to "right" then the
- right-most portion of the annotation lines up
- with the right-most edge of the plotting area.
- If "auto", the anchor is equivalent to "center"
- for data-referenced annotations or if there is
- an arrow, whereas for paper-referenced with no
- arrow, the anchor picked corresponds to the
- closest side.
- xclick
- Toggle this annotation when clicking a data
- point whose `x` value is `xclick` rather than
- the annotation's `x` value.
- xref
- Sets the annotation's x coordinate axis. If set
- to an x axis id (e.g. "x" or "x2"), the `x`
- position refers to an x coordinate If set to
- "paper", the `x` position refers to the
- distance from the left side of the plotting
- area in normalized coordinates where 0 (1)
- corresponds to the left (right) side.
- xshift
- Shifts the position of the whole annotation and
- arrow to the right (positive) or left
- (negative) by this many pixels.
- y
- Sets the annotation's y position. If the axis
- `type` is "log", then you must take the log of
- your desired range. If the axis `type` is
- "date", it should be date strings, like date
- data, though Date objects and unix milliseconds
- will be accepted and converted to strings. If
- the axis `type` is "category", it should be
- numbers, using the scale where each category is
- assigned a serial number from zero in the order
- it appears.
- yanchor
- Sets the text box's vertical position anchor
- This anchor binds the `y` position to the
- "top", "middle" or "bottom" of the annotation.
- For example, if `y` is set to 1, `yref` to
- "paper" and `yanchor` to "top" then the top-
- most portion of the annotation lines up with
- the top-most edge of the plotting area. If
- "auto", the anchor is equivalent to "middle"
- for data-referenced annotations or if there is
- an arrow, whereas for paper-referenced with no
- arrow, the anchor picked corresponds to the
- closest side.
- yclick
- Toggle this annotation when clicking a data
- point whose `y` value is `yclick` rather than
- the annotation's `y` value.
- yref
- Sets the annotation's y coordinate axis. If set
- to an y axis id (e.g. "y" or "y2"), the `y`
- position refers to an 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).
- yshift
- Shifts the position of the whole annotation and
- arrow up (positive) or down (negative) by this
- many pixels.
-
- Returns
- -------
- tuple[plotly.graph_objs.layout.Annotation]
- """
- return self["annotations"]
-
- @annotations.setter
- def annotations(self, val):
- self["annotations"] = val
-
- # annotationdefaults
- # ------------------
- @property
- def annotationdefaults(self):
- """
- When used in a template (as
- layout.template.layout.annotationdefaults), sets the default
- property values to use for elements of layout.annotations
-
- The 'annotationdefaults' property is an instance of Annotation
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Annotation`
- - A dict of string/value properties that will be passed
- to the Annotation constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.layout.Annotation
- """
- return self["annotationdefaults"]
-
- @annotationdefaults.setter
- def annotationdefaults(self, val):
- self["annotationdefaults"] = val
-
- # autosize
- # --------
- @property
- def autosize(self):
- """
- Determines whether or not a layout width or height that has
- been left undefined by the user is initialized on each
- relayout. Note that, regardless of this attribute, an undefined
- layout width or height is always initialized on the first call
- to plot.
-
- The 'autosize' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["autosize"]
-
- @autosize.setter
- def autosize(self, val):
- self["autosize"] = val
-
- # bargap
- # ------
- @property
- def bargap(self):
- """
- Sets the gap (in plot fraction) between bars of adjacent
- location coordinates.
-
- The 'bargap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["bargap"]
-
- @bargap.setter
- def bargap(self, val):
- self["bargap"] = val
-
- # bargroupgap
- # -----------
- @property
- def bargroupgap(self):
- """
- Sets the gap (in plot fraction) between bars of the same
- location coordinate.
-
- The 'bargroupgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["bargroupgap"]
-
- @bargroupgap.setter
- def bargroupgap(self, val):
- self["bargroupgap"] = val
-
- # barmode
- # -------
- @property
- def barmode(self):
- """
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are stacked on
- top of one another With "relative", the bars are stacked on top
- of one another, with negative values below the axis, positive
- values above With "group", the bars are plotted next to one
- another centered around the shared location. With "overlay",
- the bars are plotted over one another, you might need to an
- "opacity" to see multiple bars.
-
- The 'barmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['stack', 'group', 'overlay', 'relative']
-
- Returns
- -------
- Any
- """
- return self["barmode"]
-
- @barmode.setter
- def barmode(self, val):
- self["barmode"] = val
-
- # barnorm
- # -------
- @property
- def barnorm(self):
- """
- Sets the normalization for bar traces on the graph. With
- "fraction", the value of each bar is divided by the sum of all
- values at that location coordinate. "percent" is the same but
- multiplied by 100 to show percentages.
-
- The 'barnorm' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['', 'fraction', 'percent']
-
- Returns
- -------
- Any
- """
- return self["barnorm"]
-
- @barnorm.setter
- def barnorm(self, val):
- self["barnorm"] = val
-
- # boxgap
- # ------
- @property
- def boxgap(self):
- """
- Sets the gap (in plot fraction) between boxes of adjacent
- location coordinates. Has no effect on traces that have "width"
- set.
-
- The 'boxgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["boxgap"]
-
- @boxgap.setter
- def boxgap(self, val):
- self["boxgap"] = val
-
- # boxgroupgap
- # -----------
- @property
- def boxgroupgap(self):
- """
- Sets the gap (in plot fraction) between boxes of the same
- location coordinate. Has no effect on traces that have "width"
- set.
-
- The 'boxgroupgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["boxgroupgap"]
-
- @boxgroupgap.setter
- def boxgroupgap(self, val):
- self["boxgroupgap"] = val
-
- # boxmode
- # -------
- @property
- def boxmode(self):
- """
- Determines how boxes at the same location coordinate are
- displayed on the graph. If "group", the boxes are plotted next
- to one another centered around the shared location. If
- "overlay", the boxes are plotted over one another, you might
- need to set "opacity" to see them multiple boxes. Has no effect
- on traces that have "width" set.
-
- The 'boxmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['group', 'overlay']
-
- Returns
- -------
- Any
- """
- return self["boxmode"]
-
- @boxmode.setter
- def boxmode(self, val):
- self["boxmode"] = val
-
- # calendar
- # --------
- @property
- def calendar(self):
- """
- Sets the default calendar system to use for interpreting and
- displaying dates throughout the plot.
-
- The 'calendar' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['gregorian', 'chinese', 'coptic', 'discworld',
- 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
- 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
- 'thai', 'ummalqura']
-
- Returns
- -------
- Any
- """
- return self["calendar"]
-
- @calendar.setter
- def calendar(self, val):
- self["calendar"] = val
-
- # clickmode
- # ---------
- @property
- def clickmode(self):
- """
- Determines the mode of single click interactions. "event" is
- the default value and emits the `plotly_click` event. In
- addition this mode emits the `plotly_selected` event in drag
- modes "lasso" and "select", but with no event data attached
- (kept for compatibility reasons). The "select" flag enables
- selecting single data points via click. This mode also supports
- persistent selections, meaning that pressing Shift while
- clicking, adds to / subtracts from an existing selection.
- "select" with `hovermode`: "x" can be confusing, consider
- explicitly setting `hovermode`: "closest" when using this
- feature. Selection events are sent accordingly as long as
- "event" flag is set as well. When the "event" flag is missing,
- `plotly_click` and `plotly_selected` events are not fired.
-
- The 'clickmode' property is a flaglist and may be specified
- as a string containing:
- - Any combination of ['event', 'select'] joined with '+' characters
- (e.g. 'event+select')
- OR exactly one of ['none'] (e.g. 'none')
-
- Returns
- -------
- Any
- """
- return self["clickmode"]
-
- @clickmode.setter
- def clickmode(self, val):
- self["clickmode"] = val
-
- # coloraxis
- # ---------
- @property
- def coloraxis(self):
- """
- The 'coloraxis' property is an instance of Coloraxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Coloraxis`
- - A dict of string/value properties that will be passed
- to the Coloraxis constructor
-
- Supported dict properties:
-
- 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.C
- olorBar` 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: Grey
- s,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,
- Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth
- ,Electric,Viridis,Cividis.
- 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
- -------
- plotly.graph_objs.layout.Coloraxis
- """
- return self["coloraxis"]
-
- @coloraxis.setter
- def coloraxis(self, val):
- self["coloraxis"] = val
-
- # colorscale
- # ----------
- @property
- def colorscale(self):
- """
- The 'colorscale' property is an instance of Colorscale
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Colorscale`
- - A dict of string/value properties that will be passed
- to the Colorscale constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Colorscale
- """
- return self["colorscale"]
-
- @colorscale.setter
- def colorscale(self, val):
- self["colorscale"] = val
-
- # colorway
- # --------
- @property
- def colorway(self):
- """
- Sets the default trace colors.
-
- The 'colorway' property is a colorlist that may be specified
- as a tuple, list, one-dimensional numpy array, or pandas Series of valid
- color strings
-
- Returns
- -------
- list
- """
- return self["colorway"]
-
- @colorway.setter
- def colorway(self, val):
- self["colorway"] = val
-
- # datarevision
- # ------------
- @property
- def datarevision(self):
- """
- If provided, a changed value tells `Plotly.react` that one or
- more data arrays has changed. This way you can modify arrays
- in-place rather than making a complete new copy for an
- incremental change. If NOT provided, `Plotly.react` assumes
- that data arrays are being treated as immutable, thus any data
- array with a different identity from its predecessor contains
- new data.
-
- The 'datarevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["datarevision"]
-
- @datarevision.setter
- def datarevision(self, val):
- self["datarevision"] = val
-
- # direction
- # ---------
- @property
- def direction(self):
- """
- Legacy polar charts are deprecated! Please switch to "polar"
- subplots. Sets the direction corresponding to positive angles
- in legacy polar charts.
-
- The 'direction' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['clockwise', 'counterclockwise']
-
- Returns
- -------
- Any
- """
- return self["direction"]
-
- @direction.setter
- def direction(self, val):
- self["direction"] = val
-
- # dragmode
- # --------
- @property
- def dragmode(self):
- """
- Determines the mode of drag interactions. "select" and "lasso"
- apply only to scatter traces with markers or text. "orbit" and
- "turntable" apply only to 3D scenes.
-
- The 'dragmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['zoom', 'pan', 'select', 'lasso', 'orbit', 'turntable',
- False]
-
- Returns
- -------
- Any
- """
- return self["dragmode"]
-
- @dragmode.setter
- def dragmode(self, val):
- self["dragmode"] = val
-
- # editrevision
- # ------------
- @property
- def editrevision(self):
- """
- Controls persistence of user-driven changes in `editable: true`
- configuration, other than trace names and axis titles. Defaults
- to `layout.uirevision`.
-
- The 'editrevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["editrevision"]
-
- @editrevision.setter
- def editrevision(self, val):
- self["editrevision"] = val
-
- # extendfunnelareacolors
- # ----------------------
- @property
- def extendfunnelareacolors(self):
- """
- If `true`, the funnelarea slice colors (whether given by
- `funnelareacolorway` or inherited from `colorway`) will be
- extended to three times its original length by first repeating
- every color 20% lighter then each color 20% darker. This is
- intended to reduce the likelihood of reusing the same color
- when you have many slices, but you can set `false` to disable.
- Colors provided in the trace, using `marker.colors`, are never
- extended.
-
- The 'extendfunnelareacolors' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["extendfunnelareacolors"]
-
- @extendfunnelareacolors.setter
- def extendfunnelareacolors(self, val):
- self["extendfunnelareacolors"] = val
-
- # extendpiecolors
- # ---------------
- @property
- def extendpiecolors(self):
- """
- If `true`, the pie slice colors (whether given by `piecolorway`
- or inherited from `colorway`) will be extended to three times
- its original length by first repeating every color 20% lighter
- then each color 20% darker. This is intended to reduce the
- likelihood of reusing the same color when you have many slices,
- but you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
-
- The 'extendpiecolors' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["extendpiecolors"]
-
- @extendpiecolors.setter
- def extendpiecolors(self, val):
- self["extendpiecolors"] = val
-
- # extendsunburstcolors
- # --------------------
- @property
- def extendsunburstcolors(self):
- """
- If `true`, the sunburst slice colors (whether given by
- `sunburstcolorway` or inherited from `colorway`) will be
- extended to three times its original length by first repeating
- every color 20% lighter then each color 20% darker. This is
- intended to reduce the likelihood of reusing the same color
- when you have many slices, but you can set `false` to disable.
- Colors provided in the trace, using `marker.colors`, are never
- extended.
-
- The 'extendsunburstcolors' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["extendsunburstcolors"]
-
- @extendsunburstcolors.setter
- def extendsunburstcolors(self, val):
- self["extendsunburstcolors"] = val
-
- # extendtreemapcolors
- # -------------------
- @property
- def extendtreemapcolors(self):
- """
- If `true`, the treemap slice colors (whether given by
- `treemapcolorway` or inherited from `colorway`) will be
- extended to three times its original length by first repeating
- every color 20% lighter then each color 20% darker. This is
- intended to reduce the likelihood of reusing the same color
- when you have many slices, but you can set `false` to disable.
- Colors provided in the trace, using `marker.colors`, are never
- extended.
-
- The 'extendtreemapcolors' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["extendtreemapcolors"]
-
- @extendtreemapcolors.setter
- def extendtreemapcolors(self, val):
- self["extendtreemapcolors"] = val
-
- # font
- # ----
- @property
- def font(self):
- """
- Sets the global font. Note that fonts used in traces and other
- layout components inherit from the global font.
-
- The 'font' property is an instance of Font
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.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.Font
- """
- return self["font"]
-
- @font.setter
- def font(self, val):
- self["font"] = val
-
- # funnelareacolorway
- # ------------------
- @property
- def funnelareacolorway(self):
- """
- Sets the default funnelarea slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new list
- here it can still be extended with lighter and darker colors,
- see `extendfunnelareacolors`.
-
- The 'funnelareacolorway' property is a colorlist that may be specified
- as a tuple, list, one-dimensional numpy array, or pandas Series of valid
- color strings
-
- Returns
- -------
- list
- """
- return self["funnelareacolorway"]
-
- @funnelareacolorway.setter
- def funnelareacolorway(self, val):
- self["funnelareacolorway"] = val
-
- # funnelgap
- # ---------
- @property
- def funnelgap(self):
- """
- Sets the gap (in plot fraction) between bars of adjacent
- location coordinates.
-
- The 'funnelgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["funnelgap"]
-
- @funnelgap.setter
- def funnelgap(self, val):
- self["funnelgap"] = val
-
- # funnelgroupgap
- # --------------
- @property
- def funnelgroupgap(self):
- """
- Sets the gap (in plot fraction) between bars of the same
- location coordinate.
-
- The 'funnelgroupgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["funnelgroupgap"]
-
- @funnelgroupgap.setter
- def funnelgroupgap(self, val):
- self["funnelgroupgap"] = val
-
- # funnelmode
- # ----------
- @property
- def funnelmode(self):
- """
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are stacked on
- top of one another With "group", the bars are plotted next to
- one another centered around the shared location. With
- "overlay", the bars are plotted over one another, you might
- need to an "opacity" to see multiple bars.
-
- The 'funnelmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['stack', 'group', 'overlay']
-
- Returns
- -------
- Any
- """
- return self["funnelmode"]
-
- @funnelmode.setter
- def funnelmode(self, val):
- self["funnelmode"] = val
-
- # geo
- # ---
- @property
- def geo(self):
- """
- The 'geo' property is an instance of Geo
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Geo`
- - A dict of string/value properties that will be passed
- to the Geo constructor
-
- Supported dict properties:
-
- bgcolor
- Set the background color of the map
- center
- :class:`plotly.graph_objects.layout.geo.Center`
- instance or dict with compatible properties
- coastlinecolor
- Sets the coastline color.
- coastlinewidth
- Sets the coastline stroke width (in px).
- countrycolor
- Sets line color of the country boundaries.
- countrywidth
- Sets line width (in px) of the country
- boundaries.
- domain
- :class:`plotly.graph_objects.layout.geo.Domain`
- instance or dict with compatible properties
- fitbounds
- Determines if this subplot's view settings are
- auto-computed to fit trace data. On scoped
- maps, setting `fitbounds` leads to `center.lon`
- and `center.lat` getting auto-filled. On maps
- with a non-clipped projection, setting
- `fitbounds` leads to `center.lon`,
- `center.lat`, and `projection.rotation.lon`
- getting auto-filled. On maps with a clipped
- projection, setting `fitbounds` leads to
- `center.lon`, `center.lat`,
- `projection.rotation.lon`,
- `projection.rotation.lat`, `lonaxis.range` and
- `lonaxis.range` getting auto-filled. If
- "locations", only the trace's visible locations
- are considered in the `fitbounds` computations.
- If "geojson", the entire trace input `geojson`
- (if provided) is considered in the `fitbounds`
- computations, Defaults to False.
- framecolor
- Sets the color the frame.
- framewidth
- Sets the stroke width (in px) of the frame.
- lakecolor
- Sets the color of the lakes.
- landcolor
- Sets the land mass color.
- lataxis
- :class:`plotly.graph_objects.layout.geo.Lataxis
- ` instance or dict with compatible properties
- lonaxis
- :class:`plotly.graph_objects.layout.geo.Lonaxis
- ` instance or dict with compatible properties
- oceancolor
- Sets the ocean color
- projection
- :class:`plotly.graph_objects.layout.geo.Project
- ion` instance or dict with compatible
- properties
- resolution
- Sets the resolution of the base layers. The
- values have units of km/mm e.g. 110 corresponds
- to a scale ratio of 1:110,000,000.
- rivercolor
- Sets color of the rivers.
- riverwidth
- Sets the stroke width (in px) of the rivers.
- scope
- Set the scope of the map.
- showcoastlines
- Sets whether or not the coastlines are drawn.
- showcountries
- Sets whether or not country boundaries are
- drawn.
- showframe
- Sets whether or not a frame is drawn around the
- map.
- showlakes
- Sets whether or not lakes are drawn.
- showland
- Sets whether or not land masses are filled in
- color.
- showocean
- Sets whether or not oceans are filled in color.
- showrivers
- Sets whether or not rivers are drawn.
- showsubunits
- Sets whether or not boundaries of subunits
- within countries (e.g. states, provinces) are
- drawn.
- subunitcolor
- Sets the color of the subunits boundaries.
- subunitwidth
- Sets the stroke width (in px) of the subunits
- boundaries.
- uirevision
- Controls persistence of user-driven changes in
- the view (projection and center). Defaults to
- `layout.uirevision`.
- visible
- Sets the default visibility of the base layers.
-
- Returns
- -------
- plotly.graph_objs.layout.Geo
- """
- return self["geo"]
-
- @geo.setter
- def geo(self, val):
- self["geo"] = val
-
- # grid
- # ----
- @property
- def grid(self):
- """
- The 'grid' property is an instance of Grid
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Grid`
- - A dict of string/value properties that will be passed
- to the Grid constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Grid
- """
- return self["grid"]
-
- @grid.setter
- def grid(self, val):
- self["grid"] = val
-
- # height
- # ------
- @property
- def height(self):
- """
- Sets the plot's height (in px).
-
- The 'height' property is a number and may be specified as:
- - An int or float in the interval [10, inf]
-
- Returns
- -------
- int|float
- """
- return self["height"]
-
- @height.setter
- def height(self, val):
- self["height"] = val
-
- # hiddenlabels
- # ------------
- @property
- def hiddenlabels(self):
- """
- hiddenlabels is the funnelarea & pie chart analog of
- visible:'legendonly' but it can contain many labels, and can
- simultaneously hide slices from several pies/funnelarea charts
-
- The 'hiddenlabels' property is an array that may be specified as a tuple,
- list, numpy array, or pandas Series
-
- Returns
- -------
- numpy.ndarray
- """
- return self["hiddenlabels"]
-
- @hiddenlabels.setter
- def hiddenlabels(self, val):
- self["hiddenlabels"] = val
-
- # hiddenlabelssrc
- # ---------------
- @property
- def hiddenlabelssrc(self):
- """
- Sets the source reference on Chart Studio Cloud for
- hiddenlabels .
-
- The 'hiddenlabelssrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["hiddenlabelssrc"]
-
- @hiddenlabelssrc.setter
- def hiddenlabelssrc(self, val):
- self["hiddenlabelssrc"] = val
-
- # hidesources
- # -----------
- @property
- def hidesources(self):
- """
- Determines whether or not a text link citing the data source is
- placed at the bottom-right cored of the figure. Has only an
- effect only on graphs that have been generated via forked
- graphs from the Chart Studio Cloud (at https://chart-
- studio.plotly.com or on-premise).
-
- The 'hidesources' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["hidesources"]
-
- @hidesources.setter
- def hidesources(self, val):
- self["hidesources"] = val
-
- # hoverdistance
- # -------------
- @property
- def hoverdistance(self):
- """
- Sets the default distance (in pixels) to look for data to add
- hover labels (-1 means no cutoff, 0 means no looking for data).
- This is only a real distance for hovering on point-like
- objects, like scatter points. For area-like objects (bars,
- scatter fills, etc) hovering is on inside the area and off
- outside, but these objects will not supersede hover on point-
- like objects in case of conflict.
-
- The 'hoverdistance' 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["hoverdistance"]
-
- @hoverdistance.setter
- def hoverdistance(self, val):
- self["hoverdistance"] = val
-
- # hoverlabel
- # ----------
- @property
- def hoverlabel(self):
- """
- The 'hoverlabel' property is an instance of Hoverlabel
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Hoverlabel`
- - A dict of string/value properties that will be passed
- to the Hoverlabel constructor
-
- Supported dict properties:
-
- 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.
- 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
- -------
- plotly.graph_objs.layout.Hoverlabel
- """
- return self["hoverlabel"]
-
- @hoverlabel.setter
- def hoverlabel(self, val):
- self["hoverlabel"] = val
-
- # hovermode
- # ---------
- @property
- def hovermode(self):
- """
- Determines the mode of hover interactions. If "closest", a
- single hoverlabel will appear for the "closest" point within
- the `hoverdistance`. If "x" (or "y"), multiple hoverlabels will
- appear for multiple points at the "closest" x- (or y-)
- coordinate within the `hoverdistance`, with the caveat that no
- more than one hoverlabel will appear per trace. If *x unified*
- (or *y unified*), a single hoverlabel will appear multiple
- points at the closest x- (or y-) coordinate within the
- `hoverdistance` with the caveat that no more than one
- hoverlabel will appear per trace. In this mode, spikelines are
- enabled by default perpendicular to the specified axis. If
- false, hover interactions are disabled. If `clickmode` includes
- the "select" flag, `hovermode` defaults to "closest". If
- `clickmode` lacks the "select" flag, it defaults to "x" or "y"
- (depending on the trace's `orientation` value) for plots based
- on cartesian coordinates. For anything else the default value
- is "closest".
-
- The 'hovermode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['x', 'y', 'closest', False, 'x unified', 'y unified']
-
- Returns
- -------
- Any
- """
- return self["hovermode"]
-
- @hovermode.setter
- def hovermode(self, val):
- self["hovermode"] = val
-
- # images
- # ------
- @property
- def images(self):
- """
- The 'images' property is a tuple of instances of
- Image that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.layout.Image
- - A list or tuple of dicts of string/value properties that
- will be passed to the Image constructor
-
- Supported dict properties:
-
- 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.
- 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.
- 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 an x data coordinate If set
- to "paper", the `x` position refers to the
- distance from the left of plot in normalized
- coordinates where 0 (1) corresponds to the left
- (right).
- 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 data coordinate. If set
- to "paper", the `y` position refers to the
- distance from the bottom of the plot in
- normalized coordinates where 0 (1) corresponds
- to the bottom (top).
-
- Returns
- -------
- tuple[plotly.graph_objs.layout.Image]
- """
- return self["images"]
-
- @images.setter
- def images(self, val):
- self["images"] = val
-
- # imagedefaults
- # -------------
- @property
- def imagedefaults(self):
- """
- When used in a template (as
- layout.template.layout.imagedefaults), sets the default
- property values to use for elements of layout.images
-
- The 'imagedefaults' property is an instance of Image
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Image`
- - A dict of string/value properties that will be passed
- to the Image constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.layout.Image
- """
- return self["imagedefaults"]
-
- @imagedefaults.setter
- def imagedefaults(self, val):
- self["imagedefaults"] = val
-
- # legend
- # ------
- @property
- def legend(self):
- """
- The 'legend' property is an instance of Legend
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Legend`
- - A dict of string/value properties that will be passed
- to the Legend constructor
-
- Supported dict properties:
-
- 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.
- 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 disable 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 disable 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.
- orientation
- Sets the orientation of the legend.
- title
- :class:`plotly.graph_objects.layout.legend.Titl
- e` 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
- -------
- plotly.graph_objs.layout.Legend
- """
- return self["legend"]
-
- @legend.setter
- def legend(self, val):
- self["legend"] = val
-
- # mapbox
- # ------
- @property
- def mapbox(self):
- """
- The 'mapbox' property is an instance of Mapbox
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Mapbox`
- - A dict of string/value properties that will be passed
- to the Mapbox constructor
-
- Supported dict properties:
-
- 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.Cent
- er` instance or dict with compatible properties
- domain
- :class:`plotly.graph_objects.layout.mapbox.Doma
- in` 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:
- open-street-map, white-bg, carto-positron,
- carto-darkmatter, stamen-terrain, stamen-toner,
- stamen-watercolor The built-in Mapbox styles
- are: basic, streets, outdoors, light, dark,
- satellite, satellite-streets Mapbox style URLs
- are of the form:
- mapbox://mapbox.mapbox--
- 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
- -------
- plotly.graph_objs.layout.Mapbox
- """
- return self["mapbox"]
-
- @mapbox.setter
- def mapbox(self, val):
- self["mapbox"] = val
-
- # margin
- # ------
- @property
- def margin(self):
- """
- The 'margin' property is an instance of Margin
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Margin`
- - A dict of string/value properties that will be passed
- to the Margin constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Margin
- """
- return self["margin"]
-
- @margin.setter
- def margin(self, val):
- self["margin"] = val
-
- # meta
- # ----
- @property
- def meta(self):
- """
- Assigns extra meta information that can be used in various
- `text` attributes. Attributes such as the graph, axis and
- colorbar `title.text`, annotation `text` `trace.name` in legend
- items, `rangeselector`, `updatemenus` and `sliders` `label`
- text all support `meta`. One can access `meta` fields using
- template strings: `%{meta[i]}` where `i` is the index of the
- `meta` item in question. `meta` can also be an object for
- example `{key: value}` which can be accessed %{meta[key]}.
-
- The 'meta' property accepts values of any type
-
- Returns
- -------
- Any|numpy.ndarray
- """
- return self["meta"]
-
- @meta.setter
- def meta(self, val):
- self["meta"] = val
-
- # metasrc
- # -------
- @property
- def metasrc(self):
- """
- Sets the source reference on Chart Studio Cloud for meta .
-
- The 'metasrc' property must be specified as a string or
- as a plotly.grid_objs.Column object
-
- Returns
- -------
- str
- """
- return self["metasrc"]
-
- @metasrc.setter
- def metasrc(self, val):
- self["metasrc"] = val
-
- # modebar
- # -------
- @property
- def modebar(self):
- """
- The 'modebar' property is an instance of Modebar
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Modebar`
- - A dict of string/value properties that will be passed
- to the Modebar constructor
-
- Supported dict properties:
-
- activecolor
- Sets the color of the active or hovered on
- icons in the modebar.
- 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.
- 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
- -------
- plotly.graph_objs.layout.Modebar
- """
- return self["modebar"]
-
- @modebar.setter
- def modebar(self, val):
- self["modebar"] = val
-
- # orientation
- # -----------
- @property
- def orientation(self):
- """
- Legacy polar charts are deprecated! Please switch to "polar"
- subplots. Rotates the entire polar by the given angle in legacy
- polar charts.
-
- The 'orientation' property is a angle (in degrees) that may be
- specified as a number between -180 and 180. Numeric values outside this
- range are converted to the equivalent value
- (e.g. 270 is converted to -90).
-
- Returns
- -------
- int|float
- """
- return self["orientation"]
-
- @orientation.setter
- def orientation(self, val):
- self["orientation"] = val
-
- # paper_bgcolor
- # -------------
- @property
- def paper_bgcolor(self):
- """
- Sets the background color of the paper where the graph is
- drawn.
-
- The 'paper_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["paper_bgcolor"]
-
- @paper_bgcolor.setter
- def paper_bgcolor(self, val):
- self["paper_bgcolor"] = val
-
- # piecolorway
- # -----------
- @property
- def piecolorway(self):
- """
- Sets the default pie slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new list
- here it can still be extended with lighter and darker colors,
- see `extendpiecolors`.
-
- The 'piecolorway' property is a colorlist that may be specified
- as a tuple, list, one-dimensional numpy array, or pandas Series of valid
- color strings
-
- Returns
- -------
- list
- """
- return self["piecolorway"]
-
- @piecolorway.setter
- def piecolorway(self, val):
- self["piecolorway"] = val
-
- # plot_bgcolor
- # ------------
- @property
- def plot_bgcolor(self):
- """
- Sets the background color of the plotting area in-between x and
- y axes.
-
- The 'plot_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["plot_bgcolor"]
-
- @plot_bgcolor.setter
- def plot_bgcolor(self, val):
- self["plot_bgcolor"] = val
-
- # polar
- # -----
- @property
- def polar(self):
- """
- The 'polar' property is an instance of Polar
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Polar`
- - A dict of string/value properties that will be passed
- to the Polar constructor
-
- Supported dict properties:
-
- angularaxis
- :class:`plotly.graph_objects.layout.polar.Angul
- arAxis` instance or dict with compatible
- properties
- bargap
- Sets the gap between bars of adjacent location
- coordinates. Values are unitless, they
- represent fractions of the minimum difference
- in bar positions in the data.
- barmode
- Determines how bars at the same location
- coordinate are displayed on the graph. With
- "stack", the bars are stacked on top of one
- another With "overlay", the bars are plotted
- over one another, you might need to an
- "opacity" to see multiple bars.
- bgcolor
- Set the background color of the subplot
- domain
- :class:`plotly.graph_objects.layout.polar.Domai
- n` instance or dict with compatible properties
- gridshape
- Determines if the radial axis grid lines and
- angular axis line are drawn as "circular"
- sectors or as "linear" (polygon) sectors. Has
- an effect only when the angular axis has `type`
- "category". Note that `radialaxis.angle` is
- snapped to the angle of the closest vertex when
- `gridshape` is "circular" (so that radial axis
- scale is the same as the data scale).
- hole
- Sets the fraction of the radius to cut out of
- the polar subplot.
- radialaxis
- :class:`plotly.graph_objects.layout.polar.Radia
- lAxis` instance or dict with compatible
- properties
- sector
- Sets angular span of this polar subplot with
- two angles (in degrees). Sector are assumed to
- be spanned in the counterclockwise direction
- with 0 corresponding to rightmost limit of the
- polar subplot.
- uirevision
- Controls persistence of user-driven changes in
- axis attributes, if not overridden in the
- individual axes. Defaults to
- `layout.uirevision`.
-
- Returns
- -------
- plotly.graph_objs.layout.Polar
- """
- return self["polar"]
-
- @polar.setter
- def polar(self, val):
- self["polar"] = val
-
- # radialaxis
- # ----------
- @property
- def radialaxis(self):
- """
- The 'radialaxis' property is an instance of RadialAxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.RadialAxis`
- - A dict of string/value properties that will be passed
- to the RadialAxis constructor
-
- Supported dict properties:
-
- domain
- Polar chart subplots are not supported yet.
- This key has currently no effect.
- endpadding
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots.
- orientation
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the
- orientation (an angle with respect to the
- origin) of the radial axis.
- range
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Defines the start
- and end point of this radial axis.
- showline
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not the line bounding this radial axis will
- be shown on the figure.
- showticklabels
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not the radial axis ticks will feature tick
- labels.
- tickcolor
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the color of
- the tick lines on this radial axis.
- ticklen
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the length of
- the tick lines on this radial axis.
- tickorientation
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the
- orientation (from the paper perspective) of the
- radial axis tick labels.
- ticksuffix
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Sets the length of
- the tick lines on this radial axis.
- visible
- Legacy polar charts are deprecated! Please
- switch to "polar" subplots. Determines whether
- or not this axis will be visible.
-
- Returns
- -------
- plotly.graph_objs.layout.RadialAxis
- """
- return self["radialaxis"]
-
- @radialaxis.setter
- def radialaxis(self, val):
- self["radialaxis"] = val
-
- # scene
- # -----
- @property
- def scene(self):
- """
- The 'scene' property is an instance of Scene
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Scene`
- - A dict of string/value properties that will be passed
- to the Scene constructor
-
- Supported dict properties:
-
- annotations
- A tuple of :class:`plotly.graph_objects.layout.
- scene.Annotation` instances or dicts with
- compatible properties
- annotationdefaults
- When used in a template (as layout.template.lay
- out.scene.annotationdefaults), sets the default
- property values to use for elements of
- layout.scene.annotations
- aspectmode
- If "cube", this scene's axes are drawn as a
- cube, regardless of the axes' ranges. If
- "data", this scene's axes are drawn in
- proportion with the axes' ranges. If "manual",
- this scene's axes are drawn in proportion with
- the input of "aspectratio" (the default
- behavior if "aspectratio" is provided). If
- "auto", this scene's axes are drawn using the
- results of "data" except when one axis is more
- than four times the size of the two others,
- where in that case the results of "cube" are
- used.
- aspectratio
- Sets this scene's axis aspectratio.
- bgcolor
-
- camera
- :class:`plotly.graph_objects.layout.scene.Camer
- a` instance or dict with compatible properties
- domain
- :class:`plotly.graph_objects.layout.scene.Domai
- n` instance or dict with compatible properties
- dragmode
- Determines the mode of drag interactions for
- this scene.
- hovermode
- Determines the mode of hover interactions for
- this scene.
- uirevision
- Controls persistence of user-driven changes in
- camera attributes. Defaults to
- `layout.uirevision`.
- xaxis
- :class:`plotly.graph_objects.layout.scene.XAxis
- ` instance or dict with compatible properties
- yaxis
- :class:`plotly.graph_objects.layout.scene.YAxis
- ` instance or dict with compatible properties
- zaxis
- :class:`plotly.graph_objects.layout.scene.ZAxis
- ` instance or dict with compatible properties
-
- Returns
- -------
- plotly.graph_objs.layout.Scene
- """
- return self["scene"]
-
- @scene.setter
- def scene(self, val):
- self["scene"] = val
-
- # selectdirection
- # ---------------
- @property
- def selectdirection(self):
- """
- When "dragmode" is set to "select", this limits the selection
- of the drag to horizontal, vertical or diagonal. "h" only
- allows horizontal selection, "v" only vertical, "d" only
- diagonal and "any" sets no limit.
-
- The 'selectdirection' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['h', 'v', 'd', 'any']
-
- Returns
- -------
- Any
- """
- return self["selectdirection"]
-
- @selectdirection.setter
- def selectdirection(self, val):
- self["selectdirection"] = val
-
- # selectionrevision
- # -----------------
- @property
- def selectionrevision(self):
- """
- Controls persistence of user-driven changes in selected points
- from all traces.
-
- The 'selectionrevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["selectionrevision"]
-
- @selectionrevision.setter
- def selectionrevision(self, val):
- self["selectionrevision"] = val
-
- # separators
- # ----------
- @property
- def separators(self):
- """
- Sets the decimal and thousand separators. For example, *. *
- puts a '.' before decimals and a space between thousands. In
- English locales, dflt is ".," but other locales may alter this
- default.
-
- The 'separators' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["separators"]
-
- @separators.setter
- def separators(self, val):
- self["separators"] = val
-
- # shapes
- # ------
- @property
- def shapes(self):
- """
- The 'shapes' property is a tuple of instances of
- Shape that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.layout.Shape
- - A list or tuple of dicts of string/value properties that
- will be passed to the Shape constructor
-
- Supported dict properties:
-
- fillcolor
- Sets the color filling the shape's interior.
- layer
- Specifies whether shapes are drawn below or
- above traces.
- line
- :class:`plotly.graph_objects.layout.shape.Line`
- instance or dict with compatible properties
- name
- When used in a template, named items are
- created in the output figure in addition to any
- items the figure already has in this array. You
- can modify these items in the output figure by
- making your own item with `templateitemname`
- matching this `name` alongside your
- modifications (including `visible: false` or
- `enabled: false` to hide it). Has no effect
- outside of a template.
- opacity
- Sets the opacity of the shape.
- path
- For `type` "path" - a valid SVG path with the
- pixel values replaced by data values in
- `xsizemode`/`ysizemode` being "scaled" and
- taken unmodified as pixels relative to
- `xanchor` and `yanchor` in case of "pixel" size
- mode. There are a few restrictions / quirks
- only absolute instructions, not relative. So
- the allowed segments are: M, L, H, V, Q, C, T,
- S, and Z arcs (A) are not allowed because
- radius rx and ry are relative. In the future we
- could consider supporting relative commands,
- but we would have to decide on how to handle
- date and log axes. Note that even as is, Q and
- C Bezier paths that are smooth on linear axes
- may not be smooth on log, and vice versa. no
- chained "polybezier" commands - specify the
- segment type for each one. On category axes,
- values are numbers scaled to the serial numbers
- of categories because using the categories
- themselves there would be no way to describe
- fractional positions On data axes: because
- space and T are both normal components of path
- strings, we can't use either to separate date
- from time parts. Therefore we'll use underscore
- for this purpose: 2015-02-21_13:45:56.789
- templateitemname
- Used to refer to a named item in this array in
- the template. Named items from the template
- will be created even without a matching item in
- the input figure, but you can modify one by
- making an item with `templateitemname` matching
- its `name`, alongside your modifications
- (including `visible: false` or `enabled: false`
- to hide it). If there is no template or no
- matching item, this item will be hidden unless
- you explicitly show it with `visible: true`.
- type
- Specifies the shape type to be drawn. If
- "line", a line is drawn from (`x0`,`y0`) to
- (`x1`,`y1`) with respect to the axes' sizing
- mode. If "circle", a circle is drawn from
- ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius
- (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2
- -`y0`)|) with respect to the axes' sizing mode.
- If "rect", a rectangle is drawn linking
- (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`),
- (`x0`,`y1`), (`x0`,`y0`) with respect to the
- axes' sizing mode. If "path", draw a custom SVG
- path using `path`. with respect to the axes'
- sizing mode.
- visible
- Determines whether or not this shape is
- visible.
- x0
- Sets the shape's starting x position. See
- `type` and `xsizemode` for more info.
- x1
- Sets the shape's end x position. See `type` and
- `xsizemode` for more info.
- xanchor
- Only relevant in conjunction with `xsizemode`
- set to "pixel". Specifies the anchor point on
- the x axis to which `x0`, `x1` and x
- coordinates within `path` are relative to. E.g.
- useful to attach a pixel sized shape to a
- certain data value. No effect when `xsizemode`
- not set to "pixel".
- xref
- Sets the shape's x coordinate axis. If set to
- an x axis id (e.g. "x" or "x2"), the `x`
- position refers to an x coordinate. If set to
- "paper", the `x` position refers to the
- distance from the left side of the plotting
- area in normalized coordinates where 0 (1)
- corresponds to the left (right) side. If the
- axis `type` is "log", then you must take the
- log of your desired range. If the axis `type`
- is "date", then you must convert the date to
- unix time in milliseconds.
- xsizemode
- Sets the shapes's sizing mode along the x axis.
- If set to "scaled", `x0`, `x1` and x
- coordinates within `path` refer to data values
- on the x axis or a fraction of the plot area's
- width (`xref` set to "paper"). If set to
- "pixel", `xanchor` specifies the x position in
- terms of data or plot fraction but `x0`, `x1`
- and x coordinates within `path` are pixels
- relative to `xanchor`. This way, the shape can
- have a fixed width while maintaining a position
- relative to data or plot fraction.
- y0
- Sets the shape's starting y position. See
- `type` and `ysizemode` for more info.
- y1
- Sets the shape's end y position. See `type` and
- `ysizemode` for more info.
- yanchor
- Only relevant in conjunction with `ysizemode`
- set to "pixel". Specifies the anchor point on
- the y axis to which `y0`, `y1` and y
- coordinates within `path` are relative to. E.g.
- useful to attach a pixel sized shape to a
- certain data value. No effect when `ysizemode`
- not set to "pixel".
- yref
- Sets the annotation's y coordinate axis. If set
- to an y axis id (e.g. "y" or "y2"), the `y`
- position refers to an 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).
- ysizemode
- Sets the shapes's sizing mode along the y axis.
- If set to "scaled", `y0`, `y1` and y
- coordinates within `path` refer to data values
- on the y axis or a fraction of the plot area's
- height (`yref` set to "paper"). If set to
- "pixel", `yanchor` specifies the y position in
- terms of data or plot fraction but `y0`, `y1`
- and y coordinates within `path` are pixels
- relative to `yanchor`. This way, the shape can
- have a fixed height while maintaining a
- position relative to data or plot fraction.
-
- Returns
- -------
- tuple[plotly.graph_objs.layout.Shape]
- """
- return self["shapes"]
-
- @shapes.setter
- def shapes(self, val):
- self["shapes"] = val
-
- # shapedefaults
- # -------------
- @property
- def shapedefaults(self):
- """
- When used in a template (as
- layout.template.layout.shapedefaults), sets the default
- property values to use for elements of layout.shapes
-
- The 'shapedefaults' property is an instance of Shape
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Shape`
- - A dict of string/value properties that will be passed
- to the Shape constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.layout.Shape
- """
- return self["shapedefaults"]
-
- @shapedefaults.setter
- def shapedefaults(self, val):
- self["shapedefaults"] = val
-
- # showlegend
- # ----------
- @property
- def showlegend(self):
- """
- Determines whether or not a legend is drawn. Default is `true`
- if there is a trace to show and any of these: a) Two or more
- traces would by default be shown in the legend. b) One pie
- trace is shown in the legend. c) One trace is explicitly given
- with `showlegend: true`.
-
- The 'showlegend' property must be specified as a bool
- (either True, or False)
-
- Returns
- -------
- bool
- """
- return self["showlegend"]
-
- @showlegend.setter
- def showlegend(self, val):
- self["showlegend"] = val
-
- # sliders
- # -------
- @property
- def sliders(self):
- """
- The 'sliders' property is a tuple of instances of
- Slider that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.layout.Slider
- - A list or tuple of dicts of string/value properties that
- will be passed to the Slider constructor
-
- Supported dict properties:
-
- active
- Determines which button (by index starting from
- 0) is considered active.
- activebgcolor
- Sets the background color of the slider grip
- while dragging.
- bgcolor
- Sets the background color of the slider.
- bordercolor
- Sets the color of the border enclosing the
- slider.
- borderwidth
- Sets the width (in px) of the border enclosing
- the slider.
- currentvalue
- :class:`plotly.graph_objects.layout.slider.Curr
- entvalue` instance or dict with compatible
- properties
- font
- Sets the font of the slider step labels.
- len
- Sets the length of the slider This measure
- excludes the padding of both ends. That is, the
- slider's length is this length minus the
- padding on both ends.
- lenmode
- Determines whether this slider length is set in
- units of plot "fraction" or in *pixels. Use
- `len` to set the value.
- minorticklen
- Sets the length in pixels of minor step tick
- marks
- name
- When used in a template, named items are
- created in the output figure in addition to any
- items the figure already has in this array. You
- can modify these items in the output figure by
- making your own item with `templateitemname`
- matching this `name` alongside your
- modifications (including `visible: false` or
- `enabled: false` to hide it). Has no effect
- outside of a template.
- pad
- Set the padding of the slider component along
- each side.
- steps
- A tuple of :class:`plotly.graph_objects.layout.
- slider.Step` instances or dicts with compatible
- properties
- stepdefaults
- When used in a template (as
- layout.template.layout.slider.stepdefaults),
- sets the default property values to use for
- elements of layout.slider.steps
- templateitemname
- Used to refer to a named item in this array in
- the template. Named items from the template
- will be created even without a matching item in
- the input figure, but you can modify one by
- making an item with `templateitemname` matching
- its `name`, alongside your modifications
- (including `visible: false` or `enabled: false`
- to hide it). If there is no template or no
- matching item, this item will be hidden unless
- you explicitly show it with `visible: true`.
- tickcolor
- Sets the color of the border enclosing the
- slider.
- ticklen
- Sets the length in pixels of step tick marks
- tickwidth
- Sets the tick width (in px).
- transition
- :class:`plotly.graph_objects.layout.slider.Tran
- sition` instance or dict with compatible
- properties
- visible
- Determines whether or not the slider is
- visible.
- x
- Sets the x position (in normalized coordinates)
- of the slider.
- xanchor
- Sets the slider's horizontal position anchor.
- This anchor binds the `x` position to the
- "left", "center" or "right" of the range
- selector.
- y
- Sets the y position (in normalized coordinates)
- of the slider.
- yanchor
- Sets the slider's vertical position anchor This
- anchor binds the `y` position to the "top",
- "middle" or "bottom" of the range selector.
-
- Returns
- -------
- tuple[plotly.graph_objs.layout.Slider]
- """
- return self["sliders"]
-
- @sliders.setter
- def sliders(self, val):
- self["sliders"] = val
-
- # sliderdefaults
- # --------------
- @property
- def sliderdefaults(self):
- """
- When used in a template (as
- layout.template.layout.sliderdefaults), sets the default
- property values to use for elements of layout.sliders
-
- The 'sliderdefaults' property is an instance of Slider
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Slider`
- - A dict of string/value properties that will be passed
- to the Slider constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.layout.Slider
- """
- return self["sliderdefaults"]
-
- @sliderdefaults.setter
- def sliderdefaults(self, val):
- self["sliderdefaults"] = val
-
- # spikedistance
- # -------------
- @property
- def spikedistance(self):
- """
- Sets the default distance (in pixels) to look for data to draw
- spikelines to (-1 means no cutoff, 0 means no looking for
- data). As with hoverdistance, distance does not apply to area-
- like objects. In addition, some objects can be hovered on but
- will not generate spikelines, such as scatter fills.
-
- The 'spikedistance' 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["spikedistance"]
-
- @spikedistance.setter
- def spikedistance(self, val):
- self["spikedistance"] = val
-
- # sunburstcolorway
- # ----------------
- @property
- def sunburstcolorway(self):
- """
- Sets the default sunburst slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new list
- here it can still be extended with lighter and darker colors,
- see `extendsunburstcolors`.
-
- The 'sunburstcolorway' property is a colorlist that may be specified
- as a tuple, list, one-dimensional numpy array, or pandas Series of valid
- color strings
-
- Returns
- -------
- list
- """
- return self["sunburstcolorway"]
-
- @sunburstcolorway.setter
- def sunburstcolorway(self, val):
- self["sunburstcolorway"] = val
-
- # template
- # --------
- @property
- def template(self):
- """
- 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`.
-
- The 'template' property is an instance of Template
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Template`
- - A dict of string/value properties that will be passed
- to the Template constructor
-
- Supported dict properties:
-
- data
- :class:`plotly.graph_objects.layout.template.Da
- ta` instance or dict with compatible properties
- layout
- :class:`plotly.graph_objects.Layout` instance
- or dict with compatible properties
-
- - The name of a registered template where current registered templates
- are stored in the plotly.io.templates configuration object. The names
- of all registered templates can be retrieved with:
- >>> import plotly.io as pio
- >>> list(pio.templates) # doctest: +ELLIPSIS
- ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', ...]
-
- - A string containing multiple registered template names, joined on '+'
- characters (e.g. 'template1+template2'). In this case the resulting
- template is computed by merging together the collection of registered
- templates
-
- Returns
- -------
- plotly.graph_objs.layout.Template
- """
- return self["template"]
-
- @template.setter
- def template(self, val):
- self["template"] = val
-
- # ternary
- # -------
- @property
- def ternary(self):
- """
- The 'ternary' property is an instance of Ternary
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Ternary`
- - A dict of string/value properties that will be passed
- to the Ternary constructor
-
- Supported dict properties:
-
- aaxis
- :class:`plotly.graph_objects.layout.ternary.Aax
- is` instance or dict with compatible properties
- baxis
- :class:`plotly.graph_objects.layout.ternary.Bax
- is` instance or dict with compatible properties
- bgcolor
- Set the background color of the subplot
- caxis
- :class:`plotly.graph_objects.layout.ternary.Cax
- is` instance or dict with compatible properties
- domain
- :class:`plotly.graph_objects.layout.ternary.Dom
- ain` instance or dict with compatible
- properties
- sum
- The number each triplet should sum to, and the
- maximum range of each axis
- uirevision
- Controls persistence of user-driven changes in
- axis `min` and `title`, if not overridden in
- the individual axes. Defaults to
- `layout.uirevision`.
-
- Returns
- -------
- plotly.graph_objs.layout.Ternary
- """
- return self["ternary"]
-
- @ternary.setter
- def ternary(self, val):
- self["ternary"] = 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.Title`
- - A dict of string/value properties that will be passed
- to the Title constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Title
- """
- return self["title"]
-
- @title.setter
- def title(self, val):
- self["title"] = val
-
- # titlefont
- # ---------
- @property
- def titlefont(self):
- """
- Deprecated: Please use layout.title.font instead. 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
- -------
-
- """
- return self["titlefont"]
-
- @titlefont.setter
- def titlefont(self, val):
- self["titlefont"] = val
-
- # transition
- # ----------
- @property
- def transition(self):
- """
- Sets transition options used during Plotly.react updates.
-
- The 'transition' property is an instance of Transition
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Transition`
- - A dict of string/value properties that will be passed
- to the Transition constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Transition
- """
- return self["transition"]
-
- @transition.setter
- def transition(self, val):
- self["transition"] = val
-
- # treemapcolorway
- # ---------------
- @property
- def treemapcolorway(self):
- """
- Sets the default treemap slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new list
- here it can still be extended with lighter and darker colors,
- see `extendtreemapcolors`.
-
- The 'treemapcolorway' property is a colorlist that may be specified
- as a tuple, list, one-dimensional numpy array, or pandas Series of valid
- color strings
-
- Returns
- -------
- list
- """
- return self["treemapcolorway"]
-
- @treemapcolorway.setter
- def treemapcolorway(self, val):
- self["treemapcolorway"] = val
-
- # uirevision
- # ----------
- @property
- def uirevision(self):
- """
- Used to allow user interactions with the plot to persist after
- `Plotly.react` calls that are unaware of these interactions. If
- `uirevision` is omitted, or if it is given and it changed from
- the previous `Plotly.react` call, the exact new figure is used.
- If `uirevision` is truthy and did NOT change, any attribute
- that has been affected by user interactions and did not receive
- a different value in the new figure will keep the interaction
- value. `layout.uirevision` attribute serves as the default for
- `uirevision` attributes in various sub-containers. For finer
- control you can set these sub-attributes directly. For example,
- if your app separately controls the data on the x and y axes
- you might set `xaxis.uirevision=*time*` and
- `yaxis.uirevision=*cost*`. Then if only the y data is changed,
- you can update `yaxis.uirevision=*quantity*` and the y axis
- range will reset but the x axis range will retain any user-
- driven zoom.
-
- The 'uirevision' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["uirevision"]
-
- @uirevision.setter
- def uirevision(self, val):
- self["uirevision"] = val
-
- # uniformtext
- # -----------
- @property
- def uniformtext(self):
- """
- The 'uniformtext' property is an instance of Uniformtext
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Uniformtext`
- - A dict of string/value properties that will be passed
- to the Uniformtext constructor
-
- Supported dict properties:
-
- 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
- -------
- plotly.graph_objs.layout.Uniformtext
- """
- return self["uniformtext"]
-
- @uniformtext.setter
- def uniformtext(self, val):
- self["uniformtext"] = val
-
- # updatemenus
- # -----------
- @property
- def updatemenus(self):
- """
- The 'updatemenus' property is a tuple of instances of
- Updatemenu that may be specified as:
- - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu
- - A list or tuple of dicts of string/value properties that
- will be passed to the Updatemenu constructor
-
- Supported dict properties:
-
- 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.lay
- out.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
- -------
- tuple[plotly.graph_objs.layout.Updatemenu]
- """
- return self["updatemenus"]
-
- @updatemenus.setter
- def updatemenus(self, val):
- self["updatemenus"] = val
-
- # updatemenudefaults
- # ------------------
- @property
- def updatemenudefaults(self):
- """
- When used in a template (as
- layout.template.layout.updatemenudefaults), sets the default
- property values to use for elements of layout.updatemenus
-
- The 'updatemenudefaults' property is an instance of Updatemenu
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.Updatemenu`
- - A dict of string/value properties that will be passed
- to the Updatemenu constructor
-
- Supported dict properties:
-
- Returns
- -------
- plotly.graph_objs.layout.Updatemenu
- """
- return self["updatemenudefaults"]
-
- @updatemenudefaults.setter
- def updatemenudefaults(self, val):
- self["updatemenudefaults"] = val
-
- # violingap
- # ---------
- @property
- def violingap(self):
- """
- Sets the gap (in plot fraction) between violins of adjacent
- location coordinates. Has no effect on traces that have "width"
- set.
-
- The 'violingap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["violingap"]
-
- @violingap.setter
- def violingap(self, val):
- self["violingap"] = val
-
- # violingroupgap
- # --------------
- @property
- def violingroupgap(self):
- """
- Sets the gap (in plot fraction) between violins of the same
- location coordinate. Has no effect on traces that have "width"
- set.
-
- The 'violingroupgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["violingroupgap"]
-
- @violingroupgap.setter
- def violingroupgap(self, val):
- self["violingroupgap"] = val
-
- # violinmode
- # ----------
- @property
- def violinmode(self):
- """
- Determines how violins at the same location coordinate are
- displayed on the graph. If "group", the violins are plotted
- next to one another centered around the shared location. If
- "overlay", the violins are plotted over one another, you might
- need to set "opacity" to see them multiple violins. Has no
- effect on traces that have "width" set.
-
- The 'violinmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['group', 'overlay']
-
- Returns
- -------
- Any
- """
- return self["violinmode"]
-
- @violinmode.setter
- def violinmode(self, val):
- self["violinmode"] = val
-
- # waterfallgap
- # ------------
- @property
- def waterfallgap(self):
- """
- Sets the gap (in plot fraction) between bars of adjacent
- location coordinates.
-
- The 'waterfallgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["waterfallgap"]
-
- @waterfallgap.setter
- def waterfallgap(self, val):
- self["waterfallgap"] = val
-
- # waterfallgroupgap
- # -----------------
- @property
- def waterfallgroupgap(self):
- """
- Sets the gap (in plot fraction) between bars of the same
- location coordinate.
-
- The 'waterfallgroupgap' property is a number and may be specified as:
- - An int or float in the interval [0, 1]
-
- Returns
- -------
- int|float
- """
- return self["waterfallgroupgap"]
-
- @waterfallgroupgap.setter
- def waterfallgroupgap(self, val):
- self["waterfallgroupgap"] = val
-
- # waterfallmode
- # -------------
- @property
- def waterfallmode(self):
- """
- Determines how bars at the same location coordinate are
- displayed on the graph. With "group", the bars are plotted next
- to one another centered around the shared location. With
- "overlay", the bars are plotted over one another, you might
- need to an "opacity" to see multiple bars.
-
- The 'waterfallmode' property is an enumeration that may be specified as:
- - One of the following enumeration values:
- ['group', 'overlay']
-
- Returns
- -------
- Any
- """
- return self["waterfallmode"]
-
- @waterfallmode.setter
- def waterfallmode(self, val):
- self["waterfallmode"] = val
-
- # width
- # -----
- @property
- def width(self):
- """
- Sets the plot's width (in px).
-
- The 'width' property is a number and may be specified as:
- - An int or float in the interval [10, inf]
-
- Returns
- -------
- int|float
- """
- return self["width"]
-
- @width.setter
- def width(self, val):
- self["width"] = val
-
- # xaxis
- # -----
- @property
- def xaxis(self):
- """
- The 'xaxis' property is an instance of XAxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.XAxis`
- - A dict of string/value properties that will be passed
- to the XAxis constructor
-
- Supported dict properties:
-
- anchor
- If set to an opposite-letter axis id (e.g.
- `x2`, `y`), this axis is bound to the
- corresponding opposite-letter axis. If set to
- "free", this axis' position is determined by
- `position`.
- automargin
- Determines whether long tick labels
- automatically grow the figure margins.
- autorange
- Determines whether or not the range of this
- axis is computed in relation to the input data.
- See `rangemode` for more info. If `range` is
- provided, then `autorange` is set to False.
- calendar
- Sets the calendar system to use for `range` and
- `tick0` if this is a date axis. This does not
- set the calendar for interpreting data on this
- axis, that's specified in the trace or via the
- global `layout.calendar`
- categoryarray
- Sets the order in which categories on this axis
- appear. Only has an effect if `categoryorder`
- is set to "array". Used with `categoryorder`.
- categoryarraysrc
- Sets the source reference on Chart Studio Cloud
- for categoryarray .
- categoryorder
- Specifies the ordering logic for the case of
- categorical variables. By default, plotly uses
- "trace", which specifies the order that is
- present in the data supplied. Set
- `categoryorder` to *category ascending* or
- *category descending* if order should be
- determined by the alphanumerical order of the
- category names. Set `categoryorder` to "array"
- to derive the ordering from the attribute
- `categoryarray`. If a category is not found in
- the `categoryarray` array, the sorting behavior
- for that attribute will be identical to the
- "trace" mode. The unspecified categories will
- follow the categories in `categoryarray`. Set
- `categoryorder` to *total ascending* or *total
- descending* if order should be determined by
- the numerical order of the values. Similarly,
- the order can be determined by the min, max,
- sum, mean or median of all the values.
- color
- Sets default for all colors associated with
- this axis all at once: line, font, tick, and
- grid colors. Grid color is lightened by
- blending this with the plot background
- Individual pieces can override this.
- constrain
- If this axis needs to be compressed (either due
- to its own `scaleanchor` and `scaleratio` or
- those of the other axis), determines how that
- happens: by increasing the "range" (default),
- or by decreasing the "domain".
- constraintoward
- If this axis needs to be compressed (either due
- to its own `scaleanchor` and `scaleratio` or
- those of the other axis), determines which
- direction we push the originally specified plot
- area. Options are "left", "center" (default),
- and "right" for x axes, and "top", "middle"
- (default), and "bottom" for y axes.
- dividercolor
- Sets the color of the dividers Only has an
- effect on "multicategory" axes.
- dividerwidth
- Sets the width (in px) of the dividers Only has
- an effect on "multicategory" axes.
- domain
- Sets the domain of this axis (in plot
- fraction).
- 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", 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" 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.
- fixedrange
- Determines whether or not this axis is zoom-
- able. If true, then zoom is disabled.
- gridcolor
- Sets the color of the grid lines.
- gridwidth
- Sets the width (in px) of the grid lines.
- hoverformat
- Sets the hover text formatting rule using d3
- formatting mini-languages which are very
- similar to those in Python. For numbers, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.
- matches
- If set to another axis id (e.g. `x2`, `y`), the
- range of this axis will match the range of the
- corresponding axis in data-coordinates space.
- Moreover, matching axes share auto-range
- values, category lists and histogram auto-bins.
- Note that setting axes simultaneously in both a
- `scaleanchor` and a `matches` constraint is
- currently forbidden. Moreover, note that
- matching axes must have the same `type`.
- mirror
- Determines if the axis lines or/and ticks are
- mirrored to the opposite side of the plotting
- area. If True, the axis lines are mirrored. If
- "ticks", the axis lines and ticks are mirrored.
- If False, mirroring is disable. If "all", axis
- lines are mirrored on all shared-axes subplots.
- If "allticks", axis lines and ticks are
- mirrored on all shared-axes subplots.
- nticks
- Specifies the maximum number of ticks for the
- particular axis. The actual number of ticks
- will be chosen automatically to be less than or
- equal to `nticks`. Has an effect only if
- `tickmode` is set to "auto".
- overlaying
- If set a same-letter axis id, this axis is
- overlaid on top of the corresponding same-
- letter axis, with traces and axes visible for
- both axes. If False, this axis does not overlay
- any same-letter axes. In this case, for axes
- with overlapping domains only the highest-
- numbered axis will be visible.
- position
- Sets the position of this axis in the plotting
- space (in normalized coordinates). Only has an
- effect if `anchor` is set to "free".
- range
- Sets the range of this axis. If the axis `type`
- is "log", then you must take the log of your
- desired range (e.g. to set the range from 1 to
- 100, set the range from 0 to 2). If the axis
- `type` is "date", it should be date strings,
- like date data, though Date objects and unix
- milliseconds will be accepted and converted to
- strings. If the axis `type` is "category", it
- should be numbers, using the scale where each
- category is assigned a serial number from zero
- in the order it appears.
- rangebreaks
- A tuple of :class:`plotly.graph_objects.layout.
- xaxis.Rangebreak` instances or dicts with
- compatible properties
- rangebreakdefaults
- When used in a template (as layout.template.lay
- out.xaxis.rangebreakdefaults), sets the default
- property values to use for elements of
- layout.xaxis.rangebreaks
- rangemode
- If "normal", the range is computed in relation
- to the extrema of the input data. If *tozero*`,
- the range extends to 0, regardless of the input
- data If "nonnegative", the range is non-
- negative, regardless of the input data. Applies
- only to linear axes.
- rangeselector
- :class:`plotly.graph_objects.layout.xaxis.Range
- selector` instance or dict with compatible
- properties
- rangeslider
- :class:`plotly.graph_objects.layout.xaxis.Range
- slider` instance or dict with compatible
- properties
- scaleanchor
- If set to another axis id (e.g. `x2`, `y`), the
- range of this axis changes together with the
- range of the corresponding axis such that the
- scale of pixels per unit is in a constant
- ratio. Both axes are still zoomable, but when
- you zoom one, the other will zoom the same
- amount, keeping a fixed midpoint. `constrain`
- and `constraintoward` determine how we enforce
- the constraint. You can chain these, ie `yaxis:
- {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`
- but you can only link axes of the same `type`.
- The linked axis can have the opposite letter
- (to constrain the aspect ratio) or the same
- letter (to match scales across subplots). Loops
- (`yaxis: {scaleanchor: *x*}, xaxis:
- {scaleanchor: *y*}` or longer) are redundant
- and the last constraint encountered will be
- ignored to avoid possible inconsistent
- constraints via `scaleratio`. Note that setting
- axes simultaneously in both a `scaleanchor` and
- a `matches` constraint is currently forbidden.
- scaleratio
- If this axis is linked to another by
- `scaleanchor`, this determines the pixel to
- unit scale ratio. For example, if this value is
- 10, then every unit on this axis spans 10 times
- the number of pixels as a unit on the linked
- axis. Use this for example to create an
- elevation profile where the vertical scale is
- exaggerated a fixed amount with respect to the
- horizontal.
- separatethousands
- If "true", even 4-digit integers are separated
- showdividers
- Determines whether or not a dividers are drawn
- between the category levels of this axis. Only
- has an effect on "multicategory" axes.
- showexponent
- If "all", all exponents are shown besides their
- significands. If "first", only the exponent of
- the first tick is shown. If "last", only the
- exponent of the last tick is shown. If "none",
- no exponents appear.
- showgrid
- Determines whether or not grid lines are drawn.
- If True, the grid lines are drawn at every tick
- mark.
- showline
- Determines whether or not a line bounding this
- axis is drawn.
- showspikes
- Determines whether or not spikes (aka
- droplines) are drawn for this axis. Note: This
- only takes affect when hovermode = closest
- 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 whether a x (y) axis is positioned
- at the "bottom" ("left") or "top" ("right") of
- the plotting area.
- spikecolor
- Sets the spike color. If undefined, will use
- the series color
- spikedash
- 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").
- spikemode
- Determines the drawing mode for the spike line
- If "toaxis", the line is drawn from the data
- point to the axis the series is plotted on. If
- "across", the line is drawn across the entire
- plot area, and supercedes "toaxis". If
- "marker", then a marker dot is drawn on the
- axis the series is plotted on
- spikesnap
- Determines whether spikelines are stuck to the
- cursor or to the closest datapoints.
- spikethickness
- Sets the width (in px) of the zero line.
- 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* (see `dtick` for more info). If
- the axis `type` is "date", it should be a date
- string, like date data. If the axis `type` is
- "category", it should be a number, using the
- scale where each category is assigned a serial
- number from zero in the order it appears.
- tickangle
- Sets the angle of the tick labels with respect
- to the horizontal. For example, a `tickangle`
- of -90 draws the tick labels vertically.
- tickcolor
- Sets the tick color.
- tickfont
- Sets the tick font.
- tickformat
- Sets the tick label formatting rule using d3
- formatting mini-languages which are very
- similar to those in Python. For numbers, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.
- xaxis.Tickformatstop` instances or dicts with
- compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.lay
- out.xaxis.tickformatstopdefaults), sets the
- default property values to use for elements of
- layout.xaxis.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- tickson
- Determines where ticks and grid lines are drawn
- with respect to their corresponding tick
- labels. Only has an effect for axes of `type`
- "category" or "multicategory". When set to
- "boundaries", ticks and grid lines are drawn
- half a category to the left/bottom of labels.
- 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.xaxis.Title
- ` instance or dict with compatible properties
- titlefont
- Deprecated: Please use layout.xaxis.title.font
- instead. Sets this axis' title font. Note that
- the title's font used to be customized by the
- now deprecated `titlefont` attribute.
- type
- Sets the axis type. By default, plotly attempts
- to determined the axis type by looking into the
- data of the traces that referenced the axis in
- question.
- uirevision
- Controls persistence of user-driven changes in
- axis `range`, `autorange`, and `title` if in
- `editable: true` configuration. Defaults to
- `layout.uirevision`.
- visible
- A single toggle to hide the axis while
- preserving interaction like dragging. Default
- is true when a cheater plot is present on the
- axis, otherwise false
- zeroline
- Determines whether or not a line is drawn at
- along the 0 value of this axis. If True, the
- zero line is drawn on top of the grid lines.
- zerolinecolor
- Sets the line color of the zero line.
- zerolinewidth
- Sets the width (in px) of the zero line.
-
- Returns
- -------
- plotly.graph_objs.layout.XAxis
- """
- return self["xaxis"]
-
- @xaxis.setter
- def xaxis(self, val):
- self["xaxis"] = val
-
- # yaxis
- # -----
- @property
- def yaxis(self):
- """
- The 'yaxis' property is an instance of YAxis
- that may be specified as:
- - An instance of :class:`plotly.graph_objs.layout.YAxis`
- - A dict of string/value properties that will be passed
- to the YAxis constructor
-
- Supported dict properties:
-
- anchor
- If set to an opposite-letter axis id (e.g.
- `x2`, `y`), this axis is bound to the
- corresponding opposite-letter axis. If set to
- "free", this axis' position is determined by
- `position`.
- automargin
- Determines whether long tick labels
- automatically grow the figure margins.
- autorange
- Determines whether or not the range of this
- axis is computed in relation to the input data.
- See `rangemode` for more info. If `range` is
- provided, then `autorange` is set to False.
- calendar
- Sets the calendar system to use for `range` and
- `tick0` if this is a date axis. This does not
- set the calendar for interpreting data on this
- axis, that's specified in the trace or via the
- global `layout.calendar`
- categoryarray
- Sets the order in which categories on this axis
- appear. Only has an effect if `categoryorder`
- is set to "array". Used with `categoryorder`.
- categoryarraysrc
- Sets the source reference on Chart Studio Cloud
- for categoryarray .
- categoryorder
- Specifies the ordering logic for the case of
- categorical variables. By default, plotly uses
- "trace", which specifies the order that is
- present in the data supplied. Set
- `categoryorder` to *category ascending* or
- *category descending* if order should be
- determined by the alphanumerical order of the
- category names. Set `categoryorder` to "array"
- to derive the ordering from the attribute
- `categoryarray`. If a category is not found in
- the `categoryarray` array, the sorting behavior
- for that attribute will be identical to the
- "trace" mode. The unspecified categories will
- follow the categories in `categoryarray`. Set
- `categoryorder` to *total ascending* or *total
- descending* if order should be determined by
- the numerical order of the values. Similarly,
- the order can be determined by the min, max,
- sum, mean or median of all the values.
- color
- Sets default for all colors associated with
- this axis all at once: line, font, tick, and
- grid colors. Grid color is lightened by
- blending this with the plot background
- Individual pieces can override this.
- constrain
- If this axis needs to be compressed (either due
- to its own `scaleanchor` and `scaleratio` or
- those of the other axis), determines how that
- happens: by increasing the "range" (default),
- or by decreasing the "domain".
- constraintoward
- If this axis needs to be compressed (either due
- to its own `scaleanchor` and `scaleratio` or
- those of the other axis), determines which
- direction we push the originally specified plot
- area. Options are "left", "center" (default),
- and "right" for x axes, and "top", "middle"
- (default), and "bottom" for y axes.
- dividercolor
- Sets the color of the dividers Only has an
- effect on "multicategory" axes.
- dividerwidth
- Sets the width (in px) of the dividers Only has
- an effect on "multicategory" axes.
- domain
- Sets the domain of this axis (in plot
- fraction).
- 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", 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" 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.
- fixedrange
- Determines whether or not this axis is zoom-
- able. If true, then zoom is disabled.
- gridcolor
- Sets the color of the grid lines.
- gridwidth
- Sets the width (in px) of the grid lines.
- hoverformat
- Sets the hover text formatting rule using d3
- formatting mini-languages which are very
- similar to those in Python. For numbers, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.
- matches
- If set to another axis id (e.g. `x2`, `y`), the
- range of this axis will match the range of the
- corresponding axis in data-coordinates space.
- Moreover, matching axes share auto-range
- values, category lists and histogram auto-bins.
- Note that setting axes simultaneously in both a
- `scaleanchor` and a `matches` constraint is
- currently forbidden. Moreover, note that
- matching axes must have the same `type`.
- mirror
- Determines if the axis lines or/and ticks are
- mirrored to the opposite side of the plotting
- area. If True, the axis lines are mirrored. If
- "ticks", the axis lines and ticks are mirrored.
- If False, mirroring is disable. If "all", axis
- lines are mirrored on all shared-axes subplots.
- If "allticks", axis lines and ticks are
- mirrored on all shared-axes subplots.
- nticks
- Specifies the maximum number of ticks for the
- particular axis. The actual number of ticks
- will be chosen automatically to be less than or
- equal to `nticks`. Has an effect only if
- `tickmode` is set to "auto".
- overlaying
- If set a same-letter axis id, this axis is
- overlaid on top of the corresponding same-
- letter axis, with traces and axes visible for
- both axes. If False, this axis does not overlay
- any same-letter axes. In this case, for axes
- with overlapping domains only the highest-
- numbered axis will be visible.
- position
- Sets the position of this axis in the plotting
- space (in normalized coordinates). Only has an
- effect if `anchor` is set to "free".
- range
- Sets the range of this axis. If the axis `type`
- is "log", then you must take the log of your
- desired range (e.g. to set the range from 1 to
- 100, set the range from 0 to 2). If the axis
- `type` is "date", it should be date strings,
- like date data, though Date objects and unix
- milliseconds will be accepted and converted to
- strings. If the axis `type` is "category", it
- should be numbers, using the scale where each
- category is assigned a serial number from zero
- in the order it appears.
- rangebreaks
- A tuple of :class:`plotly.graph_objects.layout.
- yaxis.Rangebreak` instances or dicts with
- compatible properties
- rangebreakdefaults
- When used in a template (as layout.template.lay
- out.yaxis.rangebreakdefaults), sets the default
- property values to use for elements of
- layout.yaxis.rangebreaks
- rangemode
- If "normal", the range is computed in relation
- to the extrema of the input data. If *tozero*`,
- the range extends to 0, regardless of the input
- data If "nonnegative", the range is non-
- negative, regardless of the input data. Applies
- only to linear axes.
- scaleanchor
- If set to another axis id (e.g. `x2`, `y`), the
- range of this axis changes together with the
- range of the corresponding axis such that the
- scale of pixels per unit is in a constant
- ratio. Both axes are still zoomable, but when
- you zoom one, the other will zoom the same
- amount, keeping a fixed midpoint. `constrain`
- and `constraintoward` determine how we enforce
- the constraint. You can chain these, ie `yaxis:
- {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`
- but you can only link axes of the same `type`.
- The linked axis can have the opposite letter
- (to constrain the aspect ratio) or the same
- letter (to match scales across subplots). Loops
- (`yaxis: {scaleanchor: *x*}, xaxis:
- {scaleanchor: *y*}` or longer) are redundant
- and the last constraint encountered will be
- ignored to avoid possible inconsistent
- constraints via `scaleratio`. Note that setting
- axes simultaneously in both a `scaleanchor` and
- a `matches` constraint is currently forbidden.
- scaleratio
- If this axis is linked to another by
- `scaleanchor`, this determines the pixel to
- unit scale ratio. For example, if this value is
- 10, then every unit on this axis spans 10 times
- the number of pixels as a unit on the linked
- axis. Use this for example to create an
- elevation profile where the vertical scale is
- exaggerated a fixed amount with respect to the
- horizontal.
- separatethousands
- If "true", even 4-digit integers are separated
- showdividers
- Determines whether or not a dividers are drawn
- between the category levels of this axis. Only
- has an effect on "multicategory" axes.
- showexponent
- If "all", all exponents are shown besides their
- significands. If "first", only the exponent of
- the first tick is shown. If "last", only the
- exponent of the last tick is shown. If "none",
- no exponents appear.
- showgrid
- Determines whether or not grid lines are drawn.
- If True, the grid lines are drawn at every tick
- mark.
- showline
- Determines whether or not a line bounding this
- axis is drawn.
- showspikes
- Determines whether or not spikes (aka
- droplines) are drawn for this axis. Note: This
- only takes affect when hovermode = closest
- 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 whether a x (y) axis is positioned
- at the "bottom" ("left") or "top" ("right") of
- the plotting area.
- spikecolor
- Sets the spike color. If undefined, will use
- the series color
- spikedash
- 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").
- spikemode
- Determines the drawing mode for the spike line
- If "toaxis", the line is drawn from the data
- point to the axis the series is plotted on. If
- "across", the line is drawn across the entire
- plot area, and supercedes "toaxis". If
- "marker", then a marker dot is drawn on the
- axis the series is plotted on
- spikesnap
- Determines whether spikelines are stuck to the
- cursor or to the closest datapoints.
- spikethickness
- Sets the width (in px) of the zero line.
- 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* (see `dtick` for more info). If
- the axis `type` is "date", it should be a date
- string, like date data. If the axis `type` is
- "category", it should be a number, using the
- scale where each category is assigned a serial
- number from zero in the order it appears.
- tickangle
- Sets the angle of the tick labels with respect
- to the horizontal. For example, a `tickangle`
- of -90 draws the tick labels vertically.
- tickcolor
- Sets the tick color.
- tickfont
- Sets the tick font.
- tickformat
- Sets the tick label formatting rule using d3
- formatting mini-languages which are very
- similar to those in Python. For numbers, see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Formatting.md#d3_format
- And for dates see:
- https://github.com/d3/d3-3.x-api-
- reference/blob/master/Time-Formatting.md#format
- We add one item to d3's date formatter: "%{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.
- yaxis.Tickformatstop` instances or dicts with
- compatible properties
- tickformatstopdefaults
- When used in a template (as layout.template.lay
- out.yaxis.tickformatstopdefaults), sets the
- default property values to use for elements of
- layout.yaxis.tickformatstops
- ticklen
- Sets the tick length (in px).
- tickmode
- Sets the tick mode for this axis. If "auto",
- the number of ticks is set via `nticks`. If
- "linear", the placement of the ticks is
- determined by a starting position `tick0` and a
- tick step `dtick` ("linear" is the default
- value if `tick0` and `dtick` are provided). If
- "array", the placement of the ticks is set via
- `tickvals` and the tick text is `ticktext`.
- ("array" is the default value if `tickvals` is
- provided).
- tickprefix
- Sets a tick label prefix.
- ticks
- Determines whether ticks are drawn or not. If
- "", this axis' ticks are not drawn. If
- "outside" ("inside"), this axis' are drawn
- outside (inside) the axis lines.
- tickson
- Determines where ticks and grid lines are drawn
- with respect to their corresponding tick
- labels. Only has an effect for axes of `type`
- "category" or "multicategory". When set to
- "boundaries", ticks and grid lines are drawn
- half a category to the left/bottom of labels.
- 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.yaxis.Title
- ` instance or dict with compatible properties
- titlefont
- Deprecated: Please use layout.yaxis.title.font
- instead. Sets this axis' title font. Note that
- the title's font used to be customized by the
- now deprecated `titlefont` attribute.
- type
- Sets the axis type. By default, plotly attempts
- to determined the axis type by looking into the
- data of the traces that referenced the axis in
- question.
- uirevision
- Controls persistence of user-driven changes in
- axis `range`, `autorange`, and `title` if in
- `editable: true` configuration. Defaults to
- `layout.uirevision`.
- visible
- A single toggle to hide the axis while
- preserving interaction like dragging. Default
- is true when a cheater plot is present on the
- axis, otherwise false
- zeroline
- Determines whether or not a line is drawn at
- along the 0 value of this axis. If True, the
- zero line is drawn on top of the grid lines.
- zerolinecolor
- Sets the line color of the zero line.
- zerolinewidth
- Sets the width (in px) of the zero line.
-
- Returns
- -------
- plotly.graph_objs.layout.YAxis
- """
- return self["yaxis"]
-
- @yaxis.setter
- def yaxis(self, val):
- self["yaxis"] = val
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- angularaxis
- :class:`plotly.graph_objects.layout.AngularAxis`
- instance or dict with compatible properties
- annotations
- A tuple of
- :class:`plotly.graph_objects.layout.Annotation`
- instances or dicts with compatible properties
- annotationdefaults
- When used in a template (as
- layout.template.layout.annotationdefaults), sets the
- default property values to use for elements of
- layout.annotations
- autosize
- Determines whether or not a layout width or height that
- has been left undefined by the user is initialized on
- each relayout. Note that, regardless of this attribute,
- an undefined layout width or height is always
- initialized on the first call to plot.
- bargap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- bargroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- barmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are
- stacked on top of one another With "relative", the bars
- are stacked on top of one another, with negative values
- below the axis, positive values above With "group", the
- bars are plotted next to one another centered around
- the shared location. With "overlay", the bars are
- plotted over one another, you might need to an
- "opacity" to see multiple bars.
- barnorm
- Sets the normalization for bar traces on the graph.
- With "fraction", the value of each bar is divided by
- the sum of all values at that location coordinate.
- "percent" is the same but multiplied by 100 to show
- percentages.
- boxgap
- Sets the gap (in plot fraction) between boxes of
- adjacent location coordinates. Has no effect on traces
- that have "width" set.
- boxgroupgap
- Sets the gap (in plot fraction) between boxes of the
- same location coordinate. Has no effect on traces that
- have "width" set.
- boxmode
- Determines how boxes at the same location coordinate
- are displayed on the graph. If "group", the boxes are
- plotted next to one another centered around the shared
- location. If "overlay", the boxes are plotted over one
- another, you might need to set "opacity" to see them
- multiple boxes. Has no effect on traces that have
- "width" set.
- calendar
- Sets the default calendar system to use for
- interpreting and displaying dates throughout the plot.
- clickmode
- Determines the mode of single click interactions.
- "event" is the default value and emits the
- `plotly_click` event. In addition this mode emits the
- `plotly_selected` event in drag modes "lasso" and
- "select", but with no event data attached (kept for
- compatibility reasons). The "select" flag enables
- selecting single data points via click. This mode also
- supports persistent selections, meaning that pressing
- Shift while clicking, adds to / subtracts from an
- existing selection. "select" with `hovermode`: "x" can
- be confusing, consider explicitly setting `hovermode`:
- "closest" when using this feature. Selection events are
- sent accordingly as long as "event" flag is set as
- well. When the "event" flag is missing, `plotly_click`
- and `plotly_selected` events are not fired.
- coloraxis
- :class:`plotly.graph_objects.layout.Coloraxis` instance
- or dict with compatible properties
- colorscale
- :class:`plotly.graph_objects.layout.Colorscale`
- instance or dict with compatible properties
- colorway
- Sets the default trace colors.
- datarevision
- If provided, a changed value tells `Plotly.react` that
- one or more data arrays has changed. This way you can
- modify arrays in-place rather than making a complete
- new copy for an incremental change. If NOT provided,
- `Plotly.react` assumes that data arrays are being
- treated as immutable, thus any data array with a
- different identity from its predecessor contains new
- data.
- direction
- Legacy polar charts are deprecated! Please switch to
- "polar" subplots. Sets the direction corresponding to
- positive angles in legacy polar charts.
- dragmode
- Determines the mode of drag interactions. "select" and
- "lasso" apply only to scatter traces with markers or
- text. "orbit" and "turntable" apply only to 3D scenes.
- editrevision
- Controls persistence of user-driven changes in
- `editable: true` configuration, other than trace names
- and axis titles. Defaults to `layout.uirevision`.
- extendfunnelareacolors
- If `true`, the funnelarea slice colors (whether given
- by `funnelareacolorway` or inherited from `colorway`)
- will be extended to three times its original length by
- first repeating every color 20% lighter then each color
- 20% darker. This is intended to reduce the likelihood
- of reusing the same color when you have many slices,
- but you can set `false` to disable. Colors provided in
- the trace, using `marker.colors`, are never extended.
- extendpiecolors
- If `true`, the pie slice colors (whether given by
- `piecolorway` or inherited from `colorway`) will be
- extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- extendsunburstcolors
- If `true`, the sunburst slice colors (whether given by
- `sunburstcolorway` or inherited from `colorway`) will
- be extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- extendtreemapcolors
- If `true`, the treemap slice colors (whether given by
- `treemapcolorway` or inherited from `colorway`) will be
- extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- font
- Sets the global font. Note that fonts used in traces
- and other layout components inherit from the global
- font.
- funnelareacolorway
- Sets the default funnelarea slice colors. Defaults to
- the main `colorway` used for trace colors. If you
- specify a new list here it can still be extended with
- lighter and darker colors, see
- `extendfunnelareacolors`.
- funnelgap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- funnelgroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- funnelmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are
- stacked on top of one another With "group", the bars
- are plotted next to one another centered around the
- shared location. With "overlay", the bars are plotted
- over one another, you might need to an "opacity" to see
- multiple bars.
- geo
- :class:`plotly.graph_objects.layout.Geo` instance or
- dict with compatible properties
- grid
- :class:`plotly.graph_objects.layout.Grid` instance or
- dict with compatible properties
- height
- Sets the plot's height (in px).
- hiddenlabels
- hiddenlabels is the funnelarea & pie chart analog of
- visible:'legendonly' but it can contain many labels,
- and can simultaneously hide slices from several
- pies/funnelarea charts
- hiddenlabelssrc
- Sets the source reference on Chart Studio Cloud for
- hiddenlabels .
- hidesources
- Determines whether or not a text link citing the data
- source is placed at the bottom-right cored of the
- figure. Has only an effect only on graphs that have
- been generated via forked graphs from the Chart Studio
- Cloud (at https://chart-studio.plotly.com or on-
- premise).
- hoverdistance
- Sets the default distance (in pixels) to look for data
- to add hover labels (-1 means no cutoff, 0 means no
- looking for data). This is only a real distance for
- hovering on point-like objects, like scatter points.
- For area-like objects (bars, scatter fills, etc)
- hovering is on inside the area and off outside, but
- these objects will not supersede hover on point-like
- objects in case of conflict.
- hoverlabel
- :class:`plotly.graph_objects.layout.Hoverlabel`
- instance or dict with compatible properties
- hovermode
- Determines the mode of hover interactions. If
- "closest", a single hoverlabel will appear for the
- "closest" point within the `hoverdistance`. If "x" (or
- "y"), multiple hoverlabels will appear for multiple
- points at the "closest" x- (or y-) coordinate within
- the `hoverdistance`, with the caveat that no more than
- one hoverlabel will appear per trace. If *x unified*
- (or *y unified*), a single hoverlabel will appear
- multiple points at the closest x- (or y-) coordinate
- within the `hoverdistance` with the caveat that no more
- than one hoverlabel will appear per trace. In this
- mode, spikelines are enabled by default perpendicular
- to the specified axis. If false, hover interactions are
- disabled. If `clickmode` includes the "select" flag,
- `hovermode` defaults to "closest". If `clickmode` lacks
- the "select" flag, it defaults to "x" or "y" (depending
- on the trace's `orientation` value) for plots based on
- cartesian coordinates. For anything else the default
- value is "closest".
- images
- A tuple of :class:`plotly.graph_objects.layout.Image`
- instances or dicts with compatible properties
- imagedefaults
- When used in a template (as
- layout.template.layout.imagedefaults), sets the default
- property values to use for elements of layout.images
- legend
- :class:`plotly.graph_objects.layout.Legend` instance or
- dict with compatible properties
- mapbox
- :class:`plotly.graph_objects.layout.Mapbox` instance or
- dict with compatible properties
- margin
- :class:`plotly.graph_objects.layout.Margin` instance or
- dict with compatible properties
- meta
- Assigns extra meta information that can be used in
- various `text` attributes. Attributes such as the
- graph, axis and colorbar `title.text`, annotation
- `text` `trace.name` in legend items, `rangeselector`,
- `updatemenus` and `sliders` `label` text all support
- `meta`. One can access `meta` fields using template
- strings: `%{meta[i]}` where `i` is the index of the
- `meta` item in question. `meta` can also be an object
- for example `{key: value}` which can be accessed
- %{meta[key]}.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- modebar
- :class:`plotly.graph_objects.layout.Modebar` instance
- or dict with compatible properties
- orientation
- Legacy polar charts are deprecated! Please switch to
- "polar" subplots. Rotates the entire polar by the given
- angle in legacy polar charts.
- paper_bgcolor
- Sets the background color of the paper where the graph
- is drawn.
- piecolorway
- Sets the default pie slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new
- list here it can still be extended with lighter and
- darker colors, see `extendpiecolors`.
- plot_bgcolor
- Sets the background color of the plotting area in-
- between x and y axes.
- polar
- :class:`plotly.graph_objects.layout.Polar` instance or
- dict with compatible properties
- radialaxis
- :class:`plotly.graph_objects.layout.RadialAxis`
- instance or dict with compatible properties
- scene
- :class:`plotly.graph_objects.layout.Scene` instance or
- dict with compatible properties
- selectdirection
- When "dragmode" is set to "select", this limits the
- selection of the drag to horizontal, vertical or
- diagonal. "h" only allows horizontal selection, "v"
- only vertical, "d" only diagonal and "any" sets no
- limit.
- selectionrevision
- Controls persistence of user-driven changes in selected
- points from all traces.
- separators
- Sets the decimal and thousand separators. For example,
- *. * puts a '.' before decimals and a space between
- thousands. In English locales, dflt is ".," but other
- locales may alter this default.
- shapes
- A tuple of :class:`plotly.graph_objects.layout.Shape`
- instances or dicts with compatible properties
- shapedefaults
- When used in a template (as
- layout.template.layout.shapedefaults), sets the default
- property values to use for elements of layout.shapes
- showlegend
- Determines whether or not a legend is drawn. Default is
- `true` if there is a trace to show and any of these: a)
- Two or more traces would by default be shown in the
- legend. b) One pie trace is shown in the legend. c) One
- trace is explicitly given with `showlegend: true`.
- sliders
- A tuple of :class:`plotly.graph_objects.layout.Slider`
- instances or dicts with compatible properties
- sliderdefaults
- When used in a template (as
- layout.template.layout.sliderdefaults), sets the
- default property values to use for elements of
- layout.sliders
- spikedistance
- Sets the default distance (in pixels) to look for data
- to draw spikelines to (-1 means no cutoff, 0 means no
- looking for data). As with hoverdistance, distance does
- not apply to area-like objects. In addition, some
- objects can be hovered on but will not generate
- spikelines, such as scatter fills.
- sunburstcolorway
- Sets the default sunburst slice colors. Defaults to the
- main `colorway` used for trace colors. If you specify a
- new list here it can still be extended with lighter and
- darker colors, see `extendsunburstcolors`.
- template
- 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`.
- ternary
- :class:`plotly.graph_objects.layout.Ternary` instance
- or dict with compatible properties
- title
- :class:`plotly.graph_objects.layout.Title` instance or
- dict with compatible properties
- titlefont
- Deprecated: Please use layout.title.font instead. Sets
- the title font. Note that the title's font used to be
- customized by the now deprecated `titlefont` attribute.
- transition
- Sets transition options used during Plotly.react
- updates.
- treemapcolorway
- Sets the default treemap slice colors. Defaults to the
- main `colorway` used for trace colors. If you specify a
- new list here it can still be extended with lighter and
- darker colors, see `extendtreemapcolors`.
- uirevision
- Used to allow user interactions with the plot to
- persist after `Plotly.react` calls that are unaware of
- these interactions. If `uirevision` is omitted, or if
- it is given and it changed from the previous
- `Plotly.react` call, the exact new figure is used. If
- `uirevision` is truthy and did NOT change, any
- attribute that has been affected by user interactions
- and did not receive a different value in the new figure
- will keep the interaction value. `layout.uirevision`
- attribute serves as the default for `uirevision`
- attributes in various sub-containers. For finer control
- you can set these sub-attributes directly. For example,
- if your app separately controls the data on the x and y
- axes you might set `xaxis.uirevision=*time*` and
- `yaxis.uirevision=*cost*`. Then if only the y data is
- changed, you can update `yaxis.uirevision=*quantity*`
- and the y axis range will reset but the x axis range
- will retain any user-driven zoom.
- uniformtext
- :class:`plotly.graph_objects.layout.Uniformtext`
- instance or dict with compatible properties
- updatemenus
- A tuple of
- :class:`plotly.graph_objects.layout.Updatemenu`
- instances or dicts with compatible properties
- updatemenudefaults
- When used in a template (as
- layout.template.layout.updatemenudefaults), sets the
- default property values to use for elements of
- layout.updatemenus
- violingap
- Sets the gap (in plot fraction) between violins of
- adjacent location coordinates. Has no effect on traces
- that have "width" set.
- violingroupgap
- Sets the gap (in plot fraction) between violins of the
- same location coordinate. Has no effect on traces that
- have "width" set.
- violinmode
- Determines how violins at the same location coordinate
- are displayed on the graph. If "group", the violins are
- plotted next to one another centered around the shared
- location. If "overlay", the violins are plotted over
- one another, you might need to set "opacity" to see
- them multiple violins. Has no effect on traces that
- have "width" set.
- waterfallgap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- waterfallgroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- waterfallmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "group", the bars are
- plotted next to one another centered around the shared
- location. With "overlay", the bars are plotted over one
- another, you might need to an "opacity" to see multiple
- bars.
- width
- Sets the plot's width (in px).
- xaxis
- :class:`plotly.graph_objects.layout.XAxis` instance or
- dict with compatible properties
- yaxis
- :class:`plotly.graph_objects.layout.YAxis` instance or
- dict with compatible properties
- """
-
- _mapped_properties = {"titlefont": ("title", "font")}
-
- def __init__(
- self,
- arg=None,
- angularaxis=None,
- annotations=None,
- annotationdefaults=None,
- autosize=None,
- bargap=None,
- bargroupgap=None,
- barmode=None,
- barnorm=None,
- boxgap=None,
- boxgroupgap=None,
- boxmode=None,
- calendar=None,
- clickmode=None,
- coloraxis=None,
- colorscale=None,
- colorway=None,
- datarevision=None,
- direction=None,
- dragmode=None,
- editrevision=None,
- extendfunnelareacolors=None,
- extendpiecolors=None,
- extendsunburstcolors=None,
- extendtreemapcolors=None,
- font=None,
- funnelareacolorway=None,
- funnelgap=None,
- funnelgroupgap=None,
- funnelmode=None,
- geo=None,
- grid=None,
- height=None,
- hiddenlabels=None,
- hiddenlabelssrc=None,
- hidesources=None,
- hoverdistance=None,
- hoverlabel=None,
- hovermode=None,
- images=None,
- imagedefaults=None,
- legend=None,
- mapbox=None,
- margin=None,
- meta=None,
- metasrc=None,
- modebar=None,
- orientation=None,
- paper_bgcolor=None,
- piecolorway=None,
- plot_bgcolor=None,
- polar=None,
- radialaxis=None,
- scene=None,
- selectdirection=None,
- selectionrevision=None,
- separators=None,
- shapes=None,
- shapedefaults=None,
- showlegend=None,
- sliders=None,
- sliderdefaults=None,
- spikedistance=None,
- sunburstcolorway=None,
- template=None,
- ternary=None,
- title=None,
- titlefont=None,
- transition=None,
- treemapcolorway=None,
- uirevision=None,
- uniformtext=None,
- updatemenus=None,
- updatemenudefaults=None,
- violingap=None,
- violingroupgap=None,
- violinmode=None,
- waterfallgap=None,
- waterfallgroupgap=None,
- waterfallmode=None,
- width=None,
- xaxis=None,
- yaxis=None,
- **kwargs
- ):
- """
- Construct a new Layout object
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Layout`
- angularaxis
- :class:`plotly.graph_objects.layout.AngularAxis`
- instance or dict with compatible properties
- annotations
- A tuple of
- :class:`plotly.graph_objects.layout.Annotation`
- instances or dicts with compatible properties
- annotationdefaults
- When used in a template (as
- layout.template.layout.annotationdefaults), sets the
- default property values to use for elements of
- layout.annotations
- autosize
- Determines whether or not a layout width or height that
- has been left undefined by the user is initialized on
- each relayout. Note that, regardless of this attribute,
- an undefined layout width or height is always
- initialized on the first call to plot.
- bargap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- bargroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- barmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are
- stacked on top of one another With "relative", the bars
- are stacked on top of one another, with negative values
- below the axis, positive values above With "group", the
- bars are plotted next to one another centered around
- the shared location. With "overlay", the bars are
- plotted over one another, you might need to an
- "opacity" to see multiple bars.
- barnorm
- Sets the normalization for bar traces on the graph.
- With "fraction", the value of each bar is divided by
- the sum of all values at that location coordinate.
- "percent" is the same but multiplied by 100 to show
- percentages.
- boxgap
- Sets the gap (in plot fraction) between boxes of
- adjacent location coordinates. Has no effect on traces
- that have "width" set.
- boxgroupgap
- Sets the gap (in plot fraction) between boxes of the
- same location coordinate. Has no effect on traces that
- have "width" set.
- boxmode
- Determines how boxes at the same location coordinate
- are displayed on the graph. If "group", the boxes are
- plotted next to one another centered around the shared
- location. If "overlay", the boxes are plotted over one
- another, you might need to set "opacity" to see them
- multiple boxes. Has no effect on traces that have
- "width" set.
- calendar
- Sets the default calendar system to use for
- interpreting and displaying dates throughout the plot.
- clickmode
- Determines the mode of single click interactions.
- "event" is the default value and emits the
- `plotly_click` event. In addition this mode emits the
- `plotly_selected` event in drag modes "lasso" and
- "select", but with no event data attached (kept for
- compatibility reasons). The "select" flag enables
- selecting single data points via click. This mode also
- supports persistent selections, meaning that pressing
- Shift while clicking, adds to / subtracts from an
- existing selection. "select" with `hovermode`: "x" can
- be confusing, consider explicitly setting `hovermode`:
- "closest" when using this feature. Selection events are
- sent accordingly as long as "event" flag is set as
- well. When the "event" flag is missing, `plotly_click`
- and `plotly_selected` events are not fired.
- coloraxis
- :class:`plotly.graph_objects.layout.Coloraxis` instance
- or dict with compatible properties
- colorscale
- :class:`plotly.graph_objects.layout.Colorscale`
- instance or dict with compatible properties
- colorway
- Sets the default trace colors.
- datarevision
- If provided, a changed value tells `Plotly.react` that
- one or more data arrays has changed. This way you can
- modify arrays in-place rather than making a complete
- new copy for an incremental change. If NOT provided,
- `Plotly.react` assumes that data arrays are being
- treated as immutable, thus any data array with a
- different identity from its predecessor contains new
- data.
- direction
- Legacy polar charts are deprecated! Please switch to
- "polar" subplots. Sets the direction corresponding to
- positive angles in legacy polar charts.
- dragmode
- Determines the mode of drag interactions. "select" and
- "lasso" apply only to scatter traces with markers or
- text. "orbit" and "turntable" apply only to 3D scenes.
- editrevision
- Controls persistence of user-driven changes in
- `editable: true` configuration, other than trace names
- and axis titles. Defaults to `layout.uirevision`.
- extendfunnelareacolors
- If `true`, the funnelarea slice colors (whether given
- by `funnelareacolorway` or inherited from `colorway`)
- will be extended to three times its original length by
- first repeating every color 20% lighter then each color
- 20% darker. This is intended to reduce the likelihood
- of reusing the same color when you have many slices,
- but you can set `false` to disable. Colors provided in
- the trace, using `marker.colors`, are never extended.
- extendpiecolors
- If `true`, the pie slice colors (whether given by
- `piecolorway` or inherited from `colorway`) will be
- extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- extendsunburstcolors
- If `true`, the sunburst slice colors (whether given by
- `sunburstcolorway` or inherited from `colorway`) will
- be extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- extendtreemapcolors
- If `true`, the treemap slice colors (whether given by
- `treemapcolorway` or inherited from `colorway`) will be
- extended to three times its original length by first
- repeating every color 20% lighter then each color 20%
- darker. This is intended to reduce the likelihood of
- reusing the same color when you have many slices, but
- you can set `false` to disable. Colors provided in the
- trace, using `marker.colors`, are never extended.
- font
- Sets the global font. Note that fonts used in traces
- and other layout components inherit from the global
- font.
- funnelareacolorway
- Sets the default funnelarea slice colors. Defaults to
- the main `colorway` used for trace colors. If you
- specify a new list here it can still be extended with
- lighter and darker colors, see
- `extendfunnelareacolors`.
- funnelgap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- funnelgroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- funnelmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "stack", the bars are
- stacked on top of one another With "group", the bars
- are plotted next to one another centered around the
- shared location. With "overlay", the bars are plotted
- over one another, you might need to an "opacity" to see
- multiple bars.
- geo
- :class:`plotly.graph_objects.layout.Geo` instance or
- dict with compatible properties
- grid
- :class:`plotly.graph_objects.layout.Grid` instance or
- dict with compatible properties
- height
- Sets the plot's height (in px).
- hiddenlabels
- hiddenlabels is the funnelarea & pie chart analog of
- visible:'legendonly' but it can contain many labels,
- and can simultaneously hide slices from several
- pies/funnelarea charts
- hiddenlabelssrc
- Sets the source reference on Chart Studio Cloud for
- hiddenlabels .
- hidesources
- Determines whether or not a text link citing the data
- source is placed at the bottom-right cored of the
- figure. Has only an effect only on graphs that have
- been generated via forked graphs from the Chart Studio
- Cloud (at https://chart-studio.plotly.com or on-
- premise).
- hoverdistance
- Sets the default distance (in pixels) to look for data
- to add hover labels (-1 means no cutoff, 0 means no
- looking for data). This is only a real distance for
- hovering on point-like objects, like scatter points.
- For area-like objects (bars, scatter fills, etc)
- hovering is on inside the area and off outside, but
- these objects will not supersede hover on point-like
- objects in case of conflict.
- hoverlabel
- :class:`plotly.graph_objects.layout.Hoverlabel`
- instance or dict with compatible properties
- hovermode
- Determines the mode of hover interactions. If
- "closest", a single hoverlabel will appear for the
- "closest" point within the `hoverdistance`. If "x" (or
- "y"), multiple hoverlabels will appear for multiple
- points at the "closest" x- (or y-) coordinate within
- the `hoverdistance`, with the caveat that no more than
- one hoverlabel will appear per trace. If *x unified*
- (or *y unified*), a single hoverlabel will appear
- multiple points at the closest x- (or y-) coordinate
- within the `hoverdistance` with the caveat that no more
- than one hoverlabel will appear per trace. In this
- mode, spikelines are enabled by default perpendicular
- to the specified axis. If false, hover interactions are
- disabled. If `clickmode` includes the "select" flag,
- `hovermode` defaults to "closest". If `clickmode` lacks
- the "select" flag, it defaults to "x" or "y" (depending
- on the trace's `orientation` value) for plots based on
- cartesian coordinates. For anything else the default
- value is "closest".
- images
- A tuple of :class:`plotly.graph_objects.layout.Image`
- instances or dicts with compatible properties
- imagedefaults
- When used in a template (as
- layout.template.layout.imagedefaults), sets the default
- property values to use for elements of layout.images
- legend
- :class:`plotly.graph_objects.layout.Legend` instance or
- dict with compatible properties
- mapbox
- :class:`plotly.graph_objects.layout.Mapbox` instance or
- dict with compatible properties
- margin
- :class:`plotly.graph_objects.layout.Margin` instance or
- dict with compatible properties
- meta
- Assigns extra meta information that can be used in
- various `text` attributes. Attributes such as the
- graph, axis and colorbar `title.text`, annotation
- `text` `trace.name` in legend items, `rangeselector`,
- `updatemenus` and `sliders` `label` text all support
- `meta`. One can access `meta` fields using template
- strings: `%{meta[i]}` where `i` is the index of the
- `meta` item in question. `meta` can also be an object
- for example `{key: value}` which can be accessed
- %{meta[key]}.
- metasrc
- Sets the source reference on Chart Studio Cloud for
- meta .
- modebar
- :class:`plotly.graph_objects.layout.Modebar` instance
- or dict with compatible properties
- orientation
- Legacy polar charts are deprecated! Please switch to
- "polar" subplots. Rotates the entire polar by the given
- angle in legacy polar charts.
- paper_bgcolor
- Sets the background color of the paper where the graph
- is drawn.
- piecolorway
- Sets the default pie slice colors. Defaults to the main
- `colorway` used for trace colors. If you specify a new
- list here it can still be extended with lighter and
- darker colors, see `extendpiecolors`.
- plot_bgcolor
- Sets the background color of the plotting area in-
- between x and y axes.
- polar
- :class:`plotly.graph_objects.layout.Polar` instance or
- dict with compatible properties
- radialaxis
- :class:`plotly.graph_objects.layout.RadialAxis`
- instance or dict with compatible properties
- scene
- :class:`plotly.graph_objects.layout.Scene` instance or
- dict with compatible properties
- selectdirection
- When "dragmode" is set to "select", this limits the
- selection of the drag to horizontal, vertical or
- diagonal. "h" only allows horizontal selection, "v"
- only vertical, "d" only diagonal and "any" sets no
- limit.
- selectionrevision
- Controls persistence of user-driven changes in selected
- points from all traces.
- separators
- Sets the decimal and thousand separators. For example,
- *. * puts a '.' before decimals and a space between
- thousands. In English locales, dflt is ".," but other
- locales may alter this default.
- shapes
- A tuple of :class:`plotly.graph_objects.layout.Shape`
- instances or dicts with compatible properties
- shapedefaults
- When used in a template (as
- layout.template.layout.shapedefaults), sets the default
- property values to use for elements of layout.shapes
- showlegend
- Determines whether or not a legend is drawn. Default is
- `true` if there is a trace to show and any of these: a)
- Two or more traces would by default be shown in the
- legend. b) One pie trace is shown in the legend. c) One
- trace is explicitly given with `showlegend: true`.
- sliders
- A tuple of :class:`plotly.graph_objects.layout.Slider`
- instances or dicts with compatible properties
- sliderdefaults
- When used in a template (as
- layout.template.layout.sliderdefaults), sets the
- default property values to use for elements of
- layout.sliders
- spikedistance
- Sets the default distance (in pixels) to look for data
- to draw spikelines to (-1 means no cutoff, 0 means no
- looking for data). As with hoverdistance, distance does
- not apply to area-like objects. In addition, some
- objects can be hovered on but will not generate
- spikelines, such as scatter fills.
- sunburstcolorway
- Sets the default sunburst slice colors. Defaults to the
- main `colorway` used for trace colors. If you specify a
- new list here it can still be extended with lighter and
- darker colors, see `extendsunburstcolors`.
- template
- 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`.
- ternary
- :class:`plotly.graph_objects.layout.Ternary` instance
- or dict with compatible properties
- title
- :class:`plotly.graph_objects.layout.Title` instance or
- dict with compatible properties
- titlefont
- Deprecated: Please use layout.title.font instead. Sets
- the title font. Note that the title's font used to be
- customized by the now deprecated `titlefont` attribute.
- transition
- Sets transition options used during Plotly.react
- updates.
- treemapcolorway
- Sets the default treemap slice colors. Defaults to the
- main `colorway` used for trace colors. If you specify a
- new list here it can still be extended with lighter and
- darker colors, see `extendtreemapcolors`.
- uirevision
- Used to allow user interactions with the plot to
- persist after `Plotly.react` calls that are unaware of
- these interactions. If `uirevision` is omitted, or if
- it is given and it changed from the previous
- `Plotly.react` call, the exact new figure is used. If
- `uirevision` is truthy and did NOT change, any
- attribute that has been affected by user interactions
- and did not receive a different value in the new figure
- will keep the interaction value. `layout.uirevision`
- attribute serves as the default for `uirevision`
- attributes in various sub-containers. For finer control
- you can set these sub-attributes directly. For example,
- if your app separately controls the data on the x and y
- axes you might set `xaxis.uirevision=*time*` and
- `yaxis.uirevision=*cost*`. Then if only the y data is
- changed, you can update `yaxis.uirevision=*quantity*`
- and the y axis range will reset but the x axis range
- will retain any user-driven zoom.
- uniformtext
- :class:`plotly.graph_objects.layout.Uniformtext`
- instance or dict with compatible properties
- updatemenus
- A tuple of
- :class:`plotly.graph_objects.layout.Updatemenu`
- instances or dicts with compatible properties
- updatemenudefaults
- When used in a template (as
- layout.template.layout.updatemenudefaults), sets the
- default property values to use for elements of
- layout.updatemenus
- violingap
- Sets the gap (in plot fraction) between violins of
- adjacent location coordinates. Has no effect on traces
- that have "width" set.
- violingroupgap
- Sets the gap (in plot fraction) between violins of the
- same location coordinate. Has no effect on traces that
- have "width" set.
- violinmode
- Determines how violins at the same location coordinate
- are displayed on the graph. If "group", the violins are
- plotted next to one another centered around the shared
- location. If "overlay", the violins are plotted over
- one another, you might need to set "opacity" to see
- them multiple violins. Has no effect on traces that
- have "width" set.
- waterfallgap
- Sets the gap (in plot fraction) between bars of
- adjacent location coordinates.
- waterfallgroupgap
- Sets the gap (in plot fraction) between bars of the
- same location coordinate.
- waterfallmode
- Determines how bars at the same location coordinate are
- displayed on the graph. With "group", the bars are
- plotted next to one another centered around the shared
- location. With "overlay", the bars are plotted over one
- another, you might need to an "opacity" to see multiple
- bars.
- width
- Sets the plot's width (in px).
- xaxis
- :class:`plotly.graph_objects.layout.XAxis` instance or
- dict with compatible properties
- yaxis
- :class:`plotly.graph_objects.layout.YAxis` instance or
- dict with compatible properties
-
- Returns
- -------
- Layout
- """
- super(Layout, self).__init__("layout")
-
- # 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
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Layout`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import layout as v_layout
-
- # Initialize validators
- # ---------------------
- self._validators["angularaxis"] = v_layout.AngularAxisValidator()
- self._validators["annotations"] = v_layout.AnnotationsValidator()
- self._validators["annotationdefaults"] = v_layout.AnnotationValidator()
- self._validators["autosize"] = v_layout.AutosizeValidator()
- self._validators["bargap"] = v_layout.BargapValidator()
- self._validators["bargroupgap"] = v_layout.BargroupgapValidator()
- self._validators["barmode"] = v_layout.BarmodeValidator()
- self._validators["barnorm"] = v_layout.BarnormValidator()
- self._validators["boxgap"] = v_layout.BoxgapValidator()
- self._validators["boxgroupgap"] = v_layout.BoxgroupgapValidator()
- self._validators["boxmode"] = v_layout.BoxmodeValidator()
- self._validators["calendar"] = v_layout.CalendarValidator()
- self._validators["clickmode"] = v_layout.ClickmodeValidator()
- self._validators["coloraxis"] = v_layout.ColoraxisValidator()
- self._validators["colorscale"] = v_layout.ColorscaleValidator()
- self._validators["colorway"] = v_layout.ColorwayValidator()
- self._validators["datarevision"] = v_layout.DatarevisionValidator()
- self._validators["direction"] = v_layout.DirectionValidator()
- self._validators["dragmode"] = v_layout.DragmodeValidator()
- self._validators["editrevision"] = v_layout.EditrevisionValidator()
- self._validators[
- "extendfunnelareacolors"
- ] = v_layout.ExtendfunnelareacolorsValidator()
- self._validators["extendpiecolors"] = v_layout.ExtendpiecolorsValidator()
- self._validators[
- "extendsunburstcolors"
- ] = v_layout.ExtendsunburstcolorsValidator()
- self._validators[
- "extendtreemapcolors"
- ] = v_layout.ExtendtreemapcolorsValidator()
- self._validators["font"] = v_layout.FontValidator()
- self._validators["funnelareacolorway"] = v_layout.FunnelareacolorwayValidator()
- self._validators["funnelgap"] = v_layout.FunnelgapValidator()
- self._validators["funnelgroupgap"] = v_layout.FunnelgroupgapValidator()
- self._validators["funnelmode"] = v_layout.FunnelmodeValidator()
- self._validators["geo"] = v_layout.GeoValidator()
- self._validators["grid"] = v_layout.GridValidator()
- self._validators["height"] = v_layout.HeightValidator()
- self._validators["hiddenlabels"] = v_layout.HiddenlabelsValidator()
- self._validators["hiddenlabelssrc"] = v_layout.HiddenlabelssrcValidator()
- self._validators["hidesources"] = v_layout.HidesourcesValidator()
- self._validators["hoverdistance"] = v_layout.HoverdistanceValidator()
- self._validators["hoverlabel"] = v_layout.HoverlabelValidator()
- self._validators["hovermode"] = v_layout.HovermodeValidator()
- self._validators["images"] = v_layout.ImagesValidator()
- self._validators["imagedefaults"] = v_layout.ImageValidator()
- self._validators["legend"] = v_layout.LegendValidator()
- self._validators["mapbox"] = v_layout.MapboxValidator()
- self._validators["margin"] = v_layout.MarginValidator()
- self._validators["meta"] = v_layout.MetaValidator()
- self._validators["metasrc"] = v_layout.MetasrcValidator()
- self._validators["modebar"] = v_layout.ModebarValidator()
- self._validators["orientation"] = v_layout.OrientationValidator()
- self._validators["paper_bgcolor"] = v_layout.PaperBgcolorValidator()
- self._validators["piecolorway"] = v_layout.PiecolorwayValidator()
- self._validators["plot_bgcolor"] = v_layout.PlotBgcolorValidator()
- self._validators["polar"] = v_layout.PolarValidator()
- self._validators["radialaxis"] = v_layout.RadialAxisValidator()
- self._validators["scene"] = v_layout.SceneValidator()
- self._validators["selectdirection"] = v_layout.SelectdirectionValidator()
- self._validators["selectionrevision"] = v_layout.SelectionrevisionValidator()
- self._validators["separators"] = v_layout.SeparatorsValidator()
- self._validators["shapes"] = v_layout.ShapesValidator()
- self._validators["shapedefaults"] = v_layout.ShapeValidator()
- self._validators["showlegend"] = v_layout.ShowlegendValidator()
- self._validators["sliders"] = v_layout.SlidersValidator()
- self._validators["sliderdefaults"] = v_layout.SliderValidator()
- self._validators["spikedistance"] = v_layout.SpikedistanceValidator()
- self._validators["sunburstcolorway"] = v_layout.SunburstcolorwayValidator()
- self._validators["template"] = v_layout.TemplateValidator()
- self._validators["ternary"] = v_layout.TernaryValidator()
- self._validators["title"] = v_layout.TitleValidator()
- self._validators["transition"] = v_layout.TransitionValidator()
- self._validators["treemapcolorway"] = v_layout.TreemapcolorwayValidator()
- self._validators["uirevision"] = v_layout.UirevisionValidator()
- self._validators["uniformtext"] = v_layout.UniformtextValidator()
- self._validators["updatemenus"] = v_layout.UpdatemenusValidator()
- self._validators["updatemenudefaults"] = v_layout.UpdatemenuValidator()
- self._validators["violingap"] = v_layout.ViolingapValidator()
- self._validators["violingroupgap"] = v_layout.ViolingroupgapValidator()
- self._validators["violinmode"] = v_layout.ViolinmodeValidator()
- self._validators["waterfallgap"] = v_layout.WaterfallgapValidator()
- self._validators["waterfallgroupgap"] = v_layout.WaterfallgroupgapValidator()
- self._validators["waterfallmode"] = v_layout.WaterfallmodeValidator()
- self._validators["width"] = v_layout.WidthValidator()
- self._validators["xaxis"] = v_layout.XAxisValidator()
- self._validators["yaxis"] = v_layout.YAxisValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("angularaxis", None)
- self["angularaxis"] = angularaxis if angularaxis is not None else _v
- _v = arg.pop("annotations", None)
- self["annotations"] = annotations if annotations is not None else _v
- _v = arg.pop("annotationdefaults", None)
- self["annotationdefaults"] = (
- annotationdefaults if annotationdefaults is not None else _v
- )
- _v = arg.pop("autosize", None)
- self["autosize"] = autosize if autosize is not None else _v
- _v = arg.pop("bargap", None)
- self["bargap"] = bargap if bargap is not None else _v
- _v = arg.pop("bargroupgap", None)
- self["bargroupgap"] = bargroupgap if bargroupgap is not None else _v
- _v = arg.pop("barmode", None)
- self["barmode"] = barmode if barmode is not None else _v
- _v = arg.pop("barnorm", None)
- self["barnorm"] = barnorm if barnorm is not None else _v
- _v = arg.pop("boxgap", None)
- self["boxgap"] = boxgap if boxgap is not None else _v
- _v = arg.pop("boxgroupgap", None)
- self["boxgroupgap"] = boxgroupgap if boxgroupgap is not None else _v
- _v = arg.pop("boxmode", None)
- self["boxmode"] = boxmode if boxmode is not None else _v
- _v = arg.pop("calendar", None)
- self["calendar"] = calendar if calendar is not None else _v
- _v = arg.pop("clickmode", None)
- self["clickmode"] = clickmode if clickmode is not None else _v
- _v = arg.pop("coloraxis", None)
- self["coloraxis"] = coloraxis if coloraxis is not None else _v
- _v = arg.pop("colorscale", None)
- self["colorscale"] = colorscale if colorscale is not None else _v
- _v = arg.pop("colorway", None)
- self["colorway"] = colorway if colorway is not None else _v
- _v = arg.pop("datarevision", None)
- self["datarevision"] = datarevision if datarevision is not None else _v
- _v = arg.pop("direction", None)
- self["direction"] = direction if direction is not None else _v
- _v = arg.pop("dragmode", None)
- self["dragmode"] = dragmode if dragmode is not None else _v
- _v = arg.pop("editrevision", None)
- self["editrevision"] = editrevision if editrevision is not None else _v
- _v = arg.pop("extendfunnelareacolors", None)
- self["extendfunnelareacolors"] = (
- extendfunnelareacolors if extendfunnelareacolors is not None else _v
- )
- _v = arg.pop("extendpiecolors", None)
- self["extendpiecolors"] = extendpiecolors if extendpiecolors is not None else _v
- _v = arg.pop("extendsunburstcolors", None)
- self["extendsunburstcolors"] = (
- extendsunburstcolors if extendsunburstcolors is not None else _v
- )
- _v = arg.pop("extendtreemapcolors", None)
- self["extendtreemapcolors"] = (
- extendtreemapcolors if extendtreemapcolors is not None else _v
- )
- _v = arg.pop("font", None)
- self["font"] = font if font is not None else _v
- _v = arg.pop("funnelareacolorway", None)
- self["funnelareacolorway"] = (
- funnelareacolorway if funnelareacolorway is not None else _v
- )
- _v = arg.pop("funnelgap", None)
- self["funnelgap"] = funnelgap if funnelgap is not None else _v
- _v = arg.pop("funnelgroupgap", None)
- self["funnelgroupgap"] = funnelgroupgap if funnelgroupgap is not None else _v
- _v = arg.pop("funnelmode", None)
- self["funnelmode"] = funnelmode if funnelmode is not None else _v
- _v = arg.pop("geo", None)
- self["geo"] = geo if geo is not None else _v
- _v = arg.pop("grid", None)
- self["grid"] = grid if grid is not None else _v
- _v = arg.pop("height", None)
- self["height"] = height if height is not None else _v
- _v = arg.pop("hiddenlabels", None)
- self["hiddenlabels"] = hiddenlabels if hiddenlabels is not None else _v
- _v = arg.pop("hiddenlabelssrc", None)
- self["hiddenlabelssrc"] = hiddenlabelssrc if hiddenlabelssrc is not None else _v
- _v = arg.pop("hidesources", None)
- self["hidesources"] = hidesources if hidesources is not None else _v
- _v = arg.pop("hoverdistance", None)
- self["hoverdistance"] = hoverdistance if hoverdistance is not None else _v
- _v = arg.pop("hoverlabel", None)
- self["hoverlabel"] = hoverlabel if hoverlabel is not None else _v
- _v = arg.pop("hovermode", None)
- self["hovermode"] = hovermode if hovermode is not None else _v
- _v = arg.pop("images", None)
- self["images"] = images if images is not None else _v
- _v = arg.pop("imagedefaults", None)
- self["imagedefaults"] = imagedefaults if imagedefaults is not None else _v
- _v = arg.pop("legend", None)
- self["legend"] = legend if legend is not None else _v
- _v = arg.pop("mapbox", None)
- self["mapbox"] = mapbox if mapbox is not None else _v
- _v = arg.pop("margin", None)
- self["margin"] = margin if margin is not None else _v
- _v = arg.pop("meta", None)
- self["meta"] = meta if meta is not None else _v
- _v = arg.pop("metasrc", None)
- self["metasrc"] = metasrc if metasrc is not None else _v
- _v = arg.pop("modebar", None)
- self["modebar"] = modebar if modebar is not None else _v
- _v = arg.pop("orientation", None)
- self["orientation"] = orientation if orientation is not None else _v
- _v = arg.pop("paper_bgcolor", None)
- self["paper_bgcolor"] = paper_bgcolor if paper_bgcolor is not None else _v
- _v = arg.pop("piecolorway", None)
- self["piecolorway"] = piecolorway if piecolorway is not None else _v
- _v = arg.pop("plot_bgcolor", None)
- self["plot_bgcolor"] = plot_bgcolor if plot_bgcolor is not None else _v
- _v = arg.pop("polar", None)
- self["polar"] = polar if polar is not None else _v
- _v = arg.pop("radialaxis", None)
- self["radialaxis"] = radialaxis if radialaxis is not None else _v
- _v = arg.pop("scene", None)
- self["scene"] = scene if scene is not None else _v
- _v = arg.pop("selectdirection", None)
- self["selectdirection"] = selectdirection if selectdirection is not None else _v
- _v = arg.pop("selectionrevision", None)
- self["selectionrevision"] = (
- selectionrevision if selectionrevision is not None else _v
- )
- _v = arg.pop("separators", None)
- self["separators"] = separators if separators is not None else _v
- _v = arg.pop("shapes", None)
- self["shapes"] = shapes if shapes is not None else _v
- _v = arg.pop("shapedefaults", None)
- self["shapedefaults"] = shapedefaults if shapedefaults is not None else _v
- _v = arg.pop("showlegend", None)
- self["showlegend"] = showlegend if showlegend is not None else _v
- _v = arg.pop("sliders", None)
- self["sliders"] = sliders if sliders is not None else _v
- _v = arg.pop("sliderdefaults", None)
- self["sliderdefaults"] = sliderdefaults if sliderdefaults is not None else _v
- _v = arg.pop("spikedistance", None)
- self["spikedistance"] = spikedistance if spikedistance is not None else _v
- _v = arg.pop("sunburstcolorway", None)
- self["sunburstcolorway"] = (
- sunburstcolorway if sunburstcolorway is not None else _v
- )
- _v = arg.pop("template", None)
- _v = template if template is not None else _v
- if _v is not None:
- self["template"] = _v
- _v = arg.pop("ternary", None)
- self["ternary"] = ternary if ternary is not None else _v
- _v = arg.pop("title", None)
- self["title"] = title if title is not None else _v
- _v = arg.pop("titlefont", None)
- _v = titlefont if titlefont is not None else _v
- if _v is not None:
- self["titlefont"] = _v
- _v = arg.pop("transition", None)
- self["transition"] = transition if transition is not None else _v
- _v = arg.pop("treemapcolorway", None)
- self["treemapcolorway"] = treemapcolorway if treemapcolorway is not None else _v
- _v = arg.pop("uirevision", None)
- self["uirevision"] = uirevision if uirevision is not None else _v
- _v = arg.pop("uniformtext", None)
- self["uniformtext"] = uniformtext if uniformtext is not None else _v
- _v = arg.pop("updatemenus", None)
- self["updatemenus"] = updatemenus if updatemenus is not None else _v
- _v = arg.pop("updatemenudefaults", None)
- self["updatemenudefaults"] = (
- updatemenudefaults if updatemenudefaults is not None else _v
- )
- _v = arg.pop("violingap", None)
- self["violingap"] = violingap if violingap is not None else _v
- _v = arg.pop("violingroupgap", None)
- self["violingroupgap"] = violingroupgap if violingroupgap is not None else _v
- _v = arg.pop("violinmode", None)
- self["violinmode"] = violinmode if violinmode is not None else _v
- _v = arg.pop("waterfallgap", None)
- self["waterfallgap"] = waterfallgap if waterfallgap is not None else _v
- _v = arg.pop("waterfallgroupgap", None)
- self["waterfallgroupgap"] = (
- waterfallgroupgap if waterfallgroupgap is not None else _v
- )
- _v = arg.pop("waterfallmode", None)
- self["waterfallmode"] = waterfallmode if waterfallmode is not None else _v
- _v = arg.pop("width", None)
- self["width"] = width if width is not None else _v
- _v = arg.pop("xaxis", None)
- self["xaxis"] = xaxis if xaxis is not None else _v
- _v = arg.pop("yaxis", None)
- self["yaxis"] = yaxis if yaxis is not None else _v
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType
-import copy as _copy
-
-
-class Frame(_BaseFrameHierarchyType):
-
- # baseframe
- # ---------
- @property
- def baseframe(self):
- """
- The name of the frame into which this frame's properties are
- merged before applying. This is used to unify properties and
- avoid needing to specify the same values for the same
- properties in multiple frames.
-
- The 'baseframe' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["baseframe"]
-
- @baseframe.setter
- def baseframe(self, val):
- self["baseframe"] = val
-
- # data
- # ----
- @property
- def data(self):
- """
- A list of traces this frame modifies. The format is identical
- to the normal trace definition.
-
- Returns
- -------
- Any
- """
- return self["data"]
-
- @data.setter
- def data(self, val):
- self["data"] = val
-
- # group
- # -----
- @property
- def group(self):
- """
- An identifier that specifies the group to which the frame
- belongs, used by animate to select a subset of frames.
-
- The 'group' property is a string and must be specified as:
- - A string
- - A number that will be converted to a string
-
- Returns
- -------
- str
- """
- return self["group"]
-
- @group.setter
- def group(self, val):
- self["group"] = val
-
- # layout
- # ------
- @property
- def layout(self):
- """
- Layout properties which this frame modifies. The format is
- identical to the normal layout definition.
-
- Returns
- -------
- Any
- """
- return self["layout"]
-
- @layout.setter
- def layout(self, val):
- self["layout"] = val
-
- # name
- # ----
- @property
- def name(self):
- """
- A label by which to identify the frame
-
- 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
-
- # traces
- # ------
- @property
- def traces(self):
- """
- A list of trace indices that identify the respective traces in
- the data attribute
-
- The 'traces' property accepts values of any type
-
- Returns
- -------
- Any
- """
- return self["traces"]
-
- @traces.setter
- def traces(self, val):
- self["traces"] = val
-
- # property parent name
- # --------------------
- @property
- def _parent_path_str(self):
- return ""
-
- # Self properties description
- # ---------------------------
- @property
- def _prop_descriptions(self):
- return """\
- baseframe
- The name of the frame into which this frame's
- properties are merged before applying. This is used to
- unify properties and avoid needing to specify the same
- values for the same properties in multiple frames.
- data
- A list of traces this frame modifies. The format is
- identical to the normal trace definition.
- group
- An identifier that specifies the group to which the
- frame belongs, used by animate to select a subset of
- frames.
- layout
- Layout properties which this frame modifies. The format
- is identical to the normal layout definition.
- name
- A label by which to identify the frame
- traces
- A list of trace indices that identify the respective
- traces in the data attribute
- """
-
- def __init__(
- self,
- arg=None,
- baseframe=None,
- data=None,
- group=None,
- layout=None,
- name=None,
- traces=None,
- **kwargs
- ):
- """
- Construct a new Frame object
-
- Parameters
- ----------
- arg
- dict of properties compatible with this constructor or
- an instance of :class:`plotly.graph_objs.Frame`
- baseframe
- The name of the frame into which this frame's
- properties are merged before applying. This is used to
- unify properties and avoid needing to specify the same
- values for the same properties in multiple frames.
- data
- A list of traces this frame modifies. The format is
- identical to the normal trace definition.
- group
- An identifier that specifies the group to which the
- frame belongs, used by animate to select a subset of
- frames.
- layout
- Layout properties which this frame modifies. The format
- is identical to the normal layout definition.
- name
- A label by which to identify the frame
- traces
- A list of trace indices that identify the respective
- traces in the data attribute
-
- Returns
- -------
- Frame
- """
- super(Frame, self).__init__("frames")
-
- # 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.Frame
-constructor must be a dict or
-an instance of :class:`plotly.graph_objs.Frame`"""
- )
-
- # Handle skip_invalid
- # -------------------
- self._skip_invalid = kwargs.pop("skip_invalid", False)
-
- # Import validators
- # -----------------
- from plotly.validators import frame as v_frame
-
- # Initialize validators
- # ---------------------
- self._validators["baseframe"] = v_frame.BaseframeValidator()
- self._validators["data"] = v_frame.DataValidator()
- self._validators["group"] = v_frame.GroupValidator()
- self._validators["layout"] = v_frame.LayoutValidator()
- self._validators["name"] = v_frame.NameValidator()
- self._validators["traces"] = v_frame.TracesValidator()
-
- # Populate data dict with properties
- # ----------------------------------
- _v = arg.pop("baseframe", None)
- self["baseframe"] = baseframe if baseframe is not None else _v
- _v = arg.pop("data", None)
- self["data"] = data if data is not None else _v
- _v = arg.pop("group", None)
- self["group"] = group if group is not None else _v
- _v = arg.pop("layout", None)
- self["layout"] = layout if layout is not None else _v
- _v = arg.pop("name", None)
- self["name"] = name if name is not None else _v
- _v = arg.pop("traces", None)
- self["traces"] = traces if traces is not None else _v
-
- # Process unknown kwargs
- # ----------------------
- self._process_kwargs(**dict(arg, **kwargs))
-
- # Reset skip_invalid
- # ------------------
- self._skip_invalid = False
-
-
-from plotly.graph_objs import waterfall
-from plotly.graph_objs import volume
-from plotly.graph_objs import violin
-from plotly.graph_objs import treemap
-from plotly.graph_objs import table
-from plotly.graph_objs import surface
-from plotly.graph_objs import sunburst
-from plotly.graph_objs import streamtube
-from plotly.graph_objs import splom
-from plotly.graph_objs import scatterternary
-from plotly.graph_objs import scatterpolargl
-from plotly.graph_objs import scatterpolar
-from plotly.graph_objs import scattermapbox
-from plotly.graph_objs import scattergl
-from plotly.graph_objs import scattergeo
-from plotly.graph_objs import scattercarpet
-from plotly.graph_objs import scatter3d
-from plotly.graph_objs import scatter
-from plotly.graph_objs import sankey
-from plotly.graph_objs import pointcloud
-from plotly.graph_objs import pie
-from plotly.graph_objs import parcoords
-from plotly.graph_objs import parcats
-from plotly.graph_objs import ohlc
-from plotly.graph_objs import mesh3d
-from plotly.graph_objs import isosurface
-from plotly.graph_objs import indicator
-from plotly.graph_objs import image
-from plotly.graph_objs import histogram2dcontour
-from plotly.graph_objs import histogram2d
-from plotly.graph_objs import histogram
-from plotly.graph_objs import heatmapgl
-from plotly.graph_objs import heatmap
-from plotly.graph_objs import funnelarea
-from plotly.graph_objs import funnel
-from plotly.graph_objs import densitymapbox
-from plotly.graph_objs import contourcarpet
-from plotly.graph_objs import contour
-from plotly.graph_objs import cone
-from plotly.graph_objs import choroplethmapbox
-from plotly.graph_objs import choropleth
-from plotly.graph_objs import carpet
-from plotly.graph_objs import candlestick
-from plotly.graph_objs import box
-from plotly.graph_objs import barpolar
-from plotly.graph_objs import bar
-from plotly.graph_objs import area
-from plotly.graph_objs import layout
-from ._figure import Figure
-from ._deprecations import (
- Data,
- Annotations,
- Frames,
- AngularAxis,
- Annotation,
- ColorBar,
- Contours,
- ErrorX,
- ErrorY,
- ErrorZ,
- Font,
- Legend,
- Line,
- Margin,
- Marker,
- RadialAxis,
- Scene,
- Stream,
- XAxis,
- YAxis,
- ZAxis,
- XBins,
- YBins,
- Trace,
- Histogram2dcontour,
-)
-
-__all__ = [
- "AngularAxis",
- "Annotation",
- "Annotations",
- "Area",
- "Bar",
- "Barpolar",
- "Box",
- "Candlestick",
- "Carpet",
- "Choropleth",
- "Choroplethmapbox",
- "ColorBar",
- "Cone",
- "Contour",
- "Contourcarpet",
- "Contours",
- "Data",
- "Densitymapbox",
- "ErrorX",
- "ErrorY",
- "ErrorZ",
- "Figure",
- "Font",
- "Frame",
- "Frames",
- "Funnel",
- "Funnelarea",
- "Heatmap",
- "Heatmapgl",
- "Histogram",
- "Histogram2d",
- "Histogram2dContour",
- "Histogram2dcontour",
- "Image",
- "Indicator",
- "Isosurface",
- "Layout",
- "Legend",
- "Line",
- "Margin",
- "Marker",
- "Mesh3d",
- "Ohlc",
- "Parcats",
- "Parcoords",
- "Pie",
- "Pointcloud",
- "RadialAxis",
- "Sankey",
- "Scatter",
- "Scatter3d",
- "Scattercarpet",
- "Scattergeo",
- "Scattergl",
- "Scattermapbox",
- "Scatterpolar",
- "Scatterpolargl",
- "Scatterternary",
- "Scene",
- "Splom",
- "Stream",
- "Streamtube",
- "Sunburst",
- "Surface",
- "Table",
- "Trace",
- "Treemap",
- "Violin",
- "Volume",
- "Waterfall",
- "XAxis",
- "XBins",
- "YAxis",
- "YBins",
- "ZAxis",
- "area",
- "bar",
- "barpolar",
- "box",
- "candlestick",
- "carpet",
- "choropleth",
- "choroplethmapbox",
- "cone",
- "contour",
- "contourcarpet",
- "densitymapbox",
- "funnel",
- "funnelarea",
- "heatmap",
- "heatmapgl",
- "histogram",
- "histogram2d",
- "histogram2dcontour",
- "image",
- "indicator",
- "isosurface",
- "layout",
- "mesh3d",
- "ohlc",
- "parcats",
- "parcoords",
- "pie",
- "pointcloud",
- "sankey",
- "scatter",
- "scatter3d",
- "scattercarpet",
- "scattergeo",
- "scattergl",
- "scattermapbox",
- "scatterpolar",
- "scatterpolargl",
- "scatterternary",
- "splom",
- "streamtube",
- "sunburst",
- "surface",
- "table",
- "treemap",
- "violin",
- "volume",
- "waterfall",
-]
-try:
- import ipywidgets
- from distutils.version import LooseVersion
-
- if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
- from ._figurewidget import FigureWidget
-
- __all__.append("FigureWidget")
- del LooseVersion
- del ipywidgets
-except ImportError:
- pass
+import sys
+
+if sys.version_info < (3, 7):
+ from ._waterfall import Waterfall
+ from ._volume import Volume
+ from ._violin import Violin
+ from ._treemap import Treemap
+ from ._table import Table
+ from ._surface import Surface
+ from ._sunburst import Sunburst
+ from ._streamtube import Streamtube
+ from ._splom import Splom
+ from ._scatterternary import Scatterternary
+ from ._scatterpolargl import Scatterpolargl
+ from ._scatterpolar import Scatterpolar
+ from ._scattermapbox import Scattermapbox
+ from ._scattergl import Scattergl
+ from ._scattergeo import Scattergeo
+ from ._scattercarpet import Scattercarpet
+ from ._scatter3d import Scatter3d
+ from ._scatter import Scatter
+ from ._sankey import Sankey
+ from ._pointcloud import Pointcloud
+ from ._pie import Pie
+ from ._parcoords import Parcoords
+ from ._parcats import Parcats
+ from ._ohlc import Ohlc
+ from ._mesh3d import Mesh3d
+ from ._isosurface import Isosurface
+ from ._indicator import Indicator
+ from ._image import Image
+ from ._histogram2dcontour import Histogram2dContour
+ from ._histogram2d import Histogram2d
+ from ._histogram import Histogram
+ from ._heatmapgl import Heatmapgl
+ from ._heatmap import Heatmap
+ from ._funnelarea import Funnelarea
+ from ._funnel import Funnel
+ from ._densitymapbox import Densitymapbox
+ from ._contourcarpet import Contourcarpet
+ from ._contour import Contour
+ from ._cone import Cone
+ from ._choroplethmapbox import Choroplethmapbox
+ from ._choropleth import Choropleth
+ from ._carpet import Carpet
+ from ._candlestick import Candlestick
+ from ._box import Box
+ from ._barpolar import Barpolar
+ from ._bar import Bar
+ from ._area import Area
+ from ._layout import Layout
+ from ._frame import Frame
+ from ._figure import Figure
+ from ._deprecations import Data
+ from ._deprecations import Annotations
+ from ._deprecations import Frames
+ from ._deprecations import AngularAxis
+ from ._deprecations import Annotation
+ from ._deprecations import ColorBar
+ from ._deprecations import Contours
+ from ._deprecations import ErrorX
+ from ._deprecations import ErrorY
+ from ._deprecations import ErrorZ
+ from ._deprecations import Font
+ from ._deprecations import Legend
+ from ._deprecations import Line
+ from ._deprecations import Margin
+ from ._deprecations import Marker
+ from ._deprecations import RadialAxis
+ from ._deprecations import Scene
+ from ._deprecations import Stream
+ from ._deprecations import XAxis
+ from ._deprecations import YAxis
+ from ._deprecations import ZAxis
+ from ._deprecations import XBins
+ from ._deprecations import YBins
+ from ._deprecations import Trace
+ from ._deprecations import Histogram2dcontour
+ from . import waterfall
+ from . import volume
+ from . import violin
+ from . import treemap
+ from . import table
+ from . import surface
+ from . import sunburst
+ from . import streamtube
+ from . import splom
+ from . import scatterternary
+ from . import scatterpolargl
+ from . import scatterpolar
+ from . import scattermapbox
+ from . import scattergl
+ from . import scattergeo
+ from . import scattercarpet
+ from . import scatter3d
+ from . import scatter
+ from . import sankey
+ from . import pointcloud
+ from . import pie
+ from . import parcoords
+ from . import parcats
+ from . import ohlc
+ from . import mesh3d
+ from . import isosurface
+ from . import indicator
+ from . import image
+ from . import histogram2dcontour
+ from . import histogram2d
+ from . import histogram
+ from . import heatmapgl
+ from . import heatmap
+ from . import funnelarea
+ from . import funnel
+ from . import densitymapbox
+ from . import contourcarpet
+ from . import contour
+ from . import cone
+ from . import choroplethmapbox
+ from . import choropleth
+ from . import carpet
+ from . import candlestick
+ from . import box
+ from . import barpolar
+ from . import bar
+ from . import area
+ from . import layout
+else:
+ from _plotly_utils.importers import relative_import
+
+ __all__, __getattr__, __dir__ = relative_import(
+ __name__,
+ [
+ ".waterfall",
+ ".volume",
+ ".violin",
+ ".treemap",
+ ".table",
+ ".surface",
+ ".sunburst",
+ ".streamtube",
+ ".splom",
+ ".scatterternary",
+ ".scatterpolargl",
+ ".scatterpolar",
+ ".scattermapbox",
+ ".scattergl",
+ ".scattergeo",
+ ".scattercarpet",
+ ".scatter3d",
+ ".scatter",
+ ".sankey",
+ ".pointcloud",
+ ".pie",
+ ".parcoords",
+ ".parcats",
+ ".ohlc",
+ ".mesh3d",
+ ".isosurface",
+ ".indicator",
+ ".image",
+ ".histogram2dcontour",
+ ".histogram2d",
+ ".histogram",
+ ".heatmapgl",
+ ".heatmap",
+ ".funnelarea",
+ ".funnel",
+ ".densitymapbox",
+ ".contourcarpet",
+ ".contour",
+ ".cone",
+ ".choroplethmapbox",
+ ".choropleth",
+ ".carpet",
+ ".candlestick",
+ ".box",
+ ".barpolar",
+ ".bar",
+ ".area",
+ ".layout",
+ ],
+ [
+ "._waterfall.Waterfall",
+ "._volume.Volume",
+ "._violin.Violin",
+ "._treemap.Treemap",
+ "._table.Table",
+ "._surface.Surface",
+ "._sunburst.Sunburst",
+ "._streamtube.Streamtube",
+ "._splom.Splom",
+ "._scatterternary.Scatterternary",
+ "._scatterpolargl.Scatterpolargl",
+ "._scatterpolar.Scatterpolar",
+ "._scattermapbox.Scattermapbox",
+ "._scattergl.Scattergl",
+ "._scattergeo.Scattergeo",
+ "._scattercarpet.Scattercarpet",
+ "._scatter3d.Scatter3d",
+ "._scatter.Scatter",
+ "._sankey.Sankey",
+ "._pointcloud.Pointcloud",
+ "._pie.Pie",
+ "._parcoords.Parcoords",
+ "._parcats.Parcats",
+ "._ohlc.Ohlc",
+ "._mesh3d.Mesh3d",
+ "._isosurface.Isosurface",
+ "._indicator.Indicator",
+ "._image.Image",
+ "._histogram2dcontour.Histogram2dContour",
+ "._histogram2d.Histogram2d",
+ "._histogram.Histogram",
+ "._heatmapgl.Heatmapgl",
+ "._heatmap.Heatmap",
+ "._funnelarea.Funnelarea",
+ "._funnel.Funnel",
+ "._densitymapbox.Densitymapbox",
+ "._contourcarpet.Contourcarpet",
+ "._contour.Contour",
+ "._cone.Cone",
+ "._choroplethmapbox.Choroplethmapbox",
+ "._choropleth.Choropleth",
+ "._carpet.Carpet",
+ "._candlestick.Candlestick",
+ "._box.Box",
+ "._barpolar.Barpolar",
+ "._bar.Bar",
+ "._area.Area",
+ "._layout.Layout",
+ "._frame.Frame",
+ "._figure.Figure",
+ "._deprecations.Data",
+ "._deprecations.Annotations",
+ "._deprecations.Frames",
+ "._deprecations.AngularAxis",
+ "._deprecations.Annotation",
+ "._deprecations.ColorBar",
+ "._deprecations.Contours",
+ "._deprecations.ErrorX",
+ "._deprecations.ErrorY",
+ "._deprecations.ErrorZ",
+ "._deprecations.Font",
+ "._deprecations.Legend",
+ "._deprecations.Line",
+ "._deprecations.Margin",
+ "._deprecations.Marker",
+ "._deprecations.RadialAxis",
+ "._deprecations.Scene",
+ "._deprecations.Stream",
+ "._deprecations.XAxis",
+ "._deprecations.YAxis",
+ "._deprecations.ZAxis",
+ "._deprecations.XBins",
+ "._deprecations.YBins",
+ "._deprecations.Trace",
+ "._deprecations.Histogram2dcontour",
+ ],
+ )
+
+from .._validate import validate
+
+if sys.version_info < (3, 7):
+ try:
+ import ipywidgets
+ from distutils.version import LooseVersion
+
+ if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
+ from ..graph_objs._figurewidget import FigureWidget
+ del LooseVersion
+ del ipywidgets
+ except ImportError:
+ pass
+else:
+ __all__.append("FigureWidget")
+ orig_getattr = __getattr__
+
+ def __getattr__(import_name):
+ if import_name == "FigureWidget":
+ try:
+ import ipywidgets
+ from distutils.version import LooseVersion
+
+ if LooseVersion(ipywidgets.__version__) >= LooseVersion("7.0.0"):
+ from ..graph_objs._figurewidget import FigureWidget
+
+ return FigureWidget
+ except ImportError:
+ pass
+
+ return orig_getattr(import_name)
diff --git a/packages/python/plotly/plotly/graph_objs/_area.py b/packages/python/plotly/plotly/graph_objs/_area.py
new file mode 100644
index 00000000000..a81a5e662fd
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_area.py
@@ -0,0 +1,1002 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Area(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "area"
+ _valid_props = {
+ "customdata",
+ "customdatasrc",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "r",
+ "rsrc",
+ "showlegend",
+ "stream",
+ "t",
+ "tsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ }
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.area.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.area.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.area.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ color
+ Area traces are deprecated! Please switch to
+ the "barpolar" trace type. Sets themarkercolor.
+ It accepts either a specific color or an array
+ of numbers that are mapped to the colorscale
+ relative to the max and min values of the array
+ or relative to `marker.cmin` and `marker.cmax`
+ if set.
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ opacity
+ Area traces are deprecated! Please switch to
+ the "barpolar" trace type. Sets the marker
+ opacity.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+ size
+ Area traces are deprecated! Please switch to
+ the "barpolar" trace type. Sets the marker size
+ (in px).
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+ symbol
+ Area traces are deprecated! Please switch to
+ the "barpolar" trace type. Sets the marker
+ symbol type. Adding 100 is equivalent to
+ appending "-open" to a symbol name. Adding 200
+ is equivalent to appending "-dot" to a symbol
+ name. Adding 300 is equivalent to appending
+ "-open-dot" or "dot-open" to a symbol name.
+ symbolsrc
+ Sets the source reference on Chart Studio Cloud
+ for symbol .
+
+ Returns
+ -------
+ plotly.graph_objs.area.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # r
+ # -
+ @property
+ def r(self):
+ """
+ Area traces are deprecated! Please switch to the "barpolar"
+ trace type. Sets the radial coordinates for legacy polar chart
+ only.
+
+ The 'r' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["r"]
+
+ @r.setter
+ def r(self, val):
+ self["r"] = val
+
+ # rsrc
+ # ----
+ @property
+ def rsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for r .
+
+ The 'rsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["rsrc"]
+
+ @rsrc.setter
+ def rsrc(self, val):
+ self["rsrc"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.area.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.area.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # t
+ # -
+ @property
+ def t(self):
+ """
+ Area traces are deprecated! Please switch to the "barpolar"
+ trace type. Sets the angular coordinates for legacy polar chart
+ only.
+
+ The 't' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["t"]
+
+ @t.setter
+ def t(self, val):
+ self["t"] = val
+
+ # tsrc
+ # ----
+ @property
+ def tsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for t .
+
+ The 'tsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["tsrc"]
+
+ @tsrc.setter
+ def tsrc(self, val):
+ self["tsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.area.Hoverlabel` instance
+ or dict with compatible properties
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.area.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ r
+ Area traces are deprecated! Please switch to the
+ "barpolar" trace type. Sets the radial coordinates for
+ legacy polar chart only.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.area.Stream` instance or
+ dict with compatible properties
+ t
+ Area traces are deprecated! Please switch to the
+ "barpolar" trace type. Sets the angular coordinates for
+ legacy polar chart only.
+ tsrc
+ Sets the source reference on Chart Studio Cloud for t
+ .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ customdata=None,
+ customdatasrc=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ r=None,
+ rsrc=None,
+ showlegend=None,
+ stream=None,
+ t=None,
+ tsrc=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ **kwargs
+ ):
+ """
+ Construct a new Area object
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Area`
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.area.Hoverlabel` instance
+ or dict with compatible properties
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.area.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ r
+ Area traces are deprecated! Please switch to the
+ "barpolar" trace type. Sets the radial coordinates for
+ legacy polar chart only.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.area.Stream` instance or
+ dict with compatible properties
+ t
+ Area traces are deprecated! Please switch to the
+ "barpolar" trace type. Sets the angular coordinates for
+ legacy polar chart only.
+ tsrc
+ Sets the source reference on Chart Studio Cloud for t
+ .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+
+ Returns
+ -------
+ Area
+ """
+ super(Area, self).__init__("area")
+
+ 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.Area
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Area`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("r", None)
+ _v = r if r is not None else _v
+ if _v is not None:
+ self["r"] = _v
+ _v = arg.pop("rsrc", None)
+ _v = rsrc if rsrc is not None else _v
+ if _v is not None:
+ self["rsrc"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("t", None)
+ _v = t if t is not None else _v
+ if _v is not None:
+ self["t"] = _v
+ _v = arg.pop("tsrc", None)
+ _v = tsrc if tsrc is not None else _v
+ if _v is not None:
+ self["tsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "area"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_bar.py b/packages/python/plotly/plotly/graph_objs/_bar.py
new file mode 100644
index 00000000000..18ad7a68e25
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_bar.py
@@ -0,0 +1,2928 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Bar(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "bar"
+ _valid_props = {
+ "alignmentgroup",
+ "base",
+ "basesrc",
+ "cliponaxis",
+ "constraintext",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "error_x",
+ "error_y",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "insidetextanchor",
+ "insidetextfont",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "offset",
+ "offsetgroup",
+ "offsetsrc",
+ "opacity",
+ "orientation",
+ "outsidetextfont",
+ "r",
+ "rsrc",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "t",
+ "text",
+ "textangle",
+ "textfont",
+ "textposition",
+ "textpositionsrc",
+ "textsrc",
+ "texttemplate",
+ "texttemplatesrc",
+ "tsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "visible",
+ "width",
+ "widthsrc",
+ "x",
+ "x0",
+ "xaxis",
+ "xcalendar",
+ "xsrc",
+ "y",
+ "y0",
+ "yaxis",
+ "ycalendar",
+ "ysrc",
+ }
+
+ # alignmentgroup
+ # --------------
+ @property
+ def alignmentgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same alignmentgroup. This controls whether bars
+ compute their positional range dependently or independently.
+
+ The 'alignmentgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["alignmentgroup"]
+
+ @alignmentgroup.setter
+ def alignmentgroup(self, val):
+ self["alignmentgroup"] = val
+
+ # base
+ # ----
+ @property
+ def base(self):
+ """
+ Sets where the bar base is drawn (in position axis units). In
+ "stack" or "relative" barmode, traces that set "base" will be
+ excluded and drawn in "overlay" mode instead.
+
+ The 'base' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["base"]
+
+ @base.setter
+ def base(self, val):
+ self["base"] = val
+
+ # basesrc
+ # -------
+ @property
+ def basesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for base .
+
+ The 'basesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["basesrc"]
+
+ @basesrc.setter
+ def basesrc(self, val):
+ self["basesrc"] = val
+
+ # cliponaxis
+ # ----------
+ @property
+ def cliponaxis(self):
+ """
+ Determines whether the text nodes are clipped about the subplot
+ axes. To show the text nodes above axis lines and tick labels,
+ make sure to set `xaxis.layer` and `yaxis.layer` to *below
+ traces*.
+
+ The 'cliponaxis' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["cliponaxis"]
+
+ @cliponaxis.setter
+ def cliponaxis(self, val):
+ self["cliponaxis"] = val
+
+ # constraintext
+ # -------------
+ @property
+ def constraintext(self):
+ """
+ Constrain the size of text inside or outside a bar to be no
+ larger than the bar itself.
+
+ The 'constraintext' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['inside', 'outside', 'both', 'none']
+
+ Returns
+ -------
+ Any
+ """
+ return self["constraintext"]
+
+ @constraintext.setter
+ def constraintext(self, val):
+ self["constraintext"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # error_x
+ # -------
+ @property
+ def error_x(self):
+ """
+ The 'error_x' property is an instance of ErrorX
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.ErrorX`
+ - A dict of string/value properties that will be passed
+ to the ErrorX constructor
+
+ Supported dict properties:
+
+ array
+ Sets the data corresponding the length of each
+ error bar. Values are plotted relative to the
+ underlying data.
+ arrayminus
+ Sets the data corresponding the length of each
+ error bar in the bottom (left) direction for
+ vertical (horizontal) bars Values are plotted
+ relative to the underlying data.
+ arrayminussrc
+ Sets the source reference on Chart Studio Cloud
+ for arrayminus .
+ arraysrc
+ Sets the source reference on Chart Studio Cloud
+ for array .
+ color
+ Sets the stoke color of the error bars.
+ copy_ystyle
+
+ symmetric
+ Determines whether or not the error bars have
+ the same length in both direction (top/bottom
+ for vertical bars, left/right for horizontal
+ bars.
+ thickness
+ Sets the thickness (in px) of the error bars.
+ traceref
+
+ tracerefminus
+
+ type
+ Determines the rule used to generate the error
+ bars. If *constant`, the bar lengths are of a
+ constant value. Set this constant in `value`.
+ If "percent", the bar lengths correspond to a
+ percentage of underlying data. Set this
+ percentage in `value`. If "sqrt", the bar
+ lengths correspond to the sqaure of the
+ underlying data. If "data", the bar lengths are
+ set with data set `array`.
+ value
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars.
+ valueminus
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars in the bottom
+ (left) direction for vertical (horizontal) bars
+ visible
+ Determines whether or not this set of error
+ bars is visible.
+ width
+ Sets the width (in px) of the cross-bar at both
+ ends of the error bars.
+
+ Returns
+ -------
+ plotly.graph_objs.bar.ErrorX
+ """
+ return self["error_x"]
+
+ @error_x.setter
+ def error_x(self, val):
+ self["error_x"] = val
+
+ # error_y
+ # -------
+ @property
+ def error_y(self):
+ """
+ The 'error_y' property is an instance of ErrorY
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.ErrorY`
+ - A dict of string/value properties that will be passed
+ to the ErrorY constructor
+
+ Supported dict properties:
+
+ array
+ Sets the data corresponding the length of each
+ error bar. Values are plotted relative to the
+ underlying data.
+ arrayminus
+ Sets the data corresponding the length of each
+ error bar in the bottom (left) direction for
+ vertical (horizontal) bars Values are plotted
+ relative to the underlying data.
+ arrayminussrc
+ Sets the source reference on Chart Studio Cloud
+ for arrayminus .
+ arraysrc
+ Sets the source reference on Chart Studio Cloud
+ for array .
+ color
+ Sets the stoke color of the error bars.
+ symmetric
+ Determines whether or not the error bars have
+ the same length in both direction (top/bottom
+ for vertical bars, left/right for horizontal
+ bars.
+ thickness
+ Sets the thickness (in px) of the error bars.
+ traceref
+
+ tracerefminus
+
+ type
+ Determines the rule used to generate the error
+ bars. If *constant`, the bar lengths are of a
+ constant value. Set this constant in `value`.
+ If "percent", the bar lengths correspond to a
+ percentage of underlying data. Set this
+ percentage in `value`. If "sqrt", the bar
+ lengths correspond to the sqaure of the
+ underlying data. If "data", the bar lengths are
+ set with data set `array`.
+ value
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars.
+ valueminus
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars in the bottom
+ (left) direction for vertical (horizontal) bars
+ visible
+ Determines whether or not this set of error
+ bars is visible.
+ width
+ Sets the width (in px) of the cross-bar at both
+ ends of the error bars.
+
+ Returns
+ -------
+ plotly.graph_objs.bar.ErrorY
+ """
+ return self["error_y"]
+
+ @error_y.setter
+ def error_y(self, val):
+ self["error_y"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variables `value` and `label`. Anything contained in tag
+ `` is displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary box
+ completely, use an empty tag ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Sets hover text elements associated with each (x,y) pair. If a
+ single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ the this trace's (x,y) coordinates. To be seen, trace
+ `hoverinfo` must contain a "text" flag.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # insidetextanchor
+ # ----------------
+ @property
+ def insidetextanchor(self):
+ """
+ Determines if texts are kept at center or start/end points in
+ `textposition` "inside" mode.
+
+ The 'insidetextanchor' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['end', 'middle', 'start']
+
+ Returns
+ -------
+ Any
+ """
+ return self["insidetextanchor"]
+
+ @insidetextanchor.setter
+ def insidetextanchor(self, val):
+ self["insidetextanchor"] = val
+
+ # insidetextfont
+ # --------------
+ @property
+ def insidetextfont(self):
+ """
+ Sets the font used for `text` lying inside the bar.
+
+ The 'insidetextfont' property is an instance of Insidetextfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Insidetextfont`
+ - A dict of string/value properties that will be passed
+ to the Insidetextfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Insidetextfont
+ """
+ return self["insidetextfont"]
+
+ @insidetextfont.setter
+ def insidetextfont(self, val):
+ self["insidetextfont"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ autocolorscale
+ Determines whether the colorscale is a default
+ palette (`autocolorscale: true`) or the palette
+ determined by `marker.colorscale`. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. 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
+ in `marker.color`) or the bounds set in
+ `marker.cmin` and `marker.cmax` Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Defaults to `false` when `marker.cmin`
+ and `marker.cmax` are set by the user.
+ cmax
+ Sets the upper bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmin` must be set as well.
+ cmid
+ Sets the mid-point of the color domain by
+ scaling `marker.cmin` and/or `marker.cmax` to
+ be equidistant to this point. Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Value should have the same units as in
+ `marker.color`. Has no effect when
+ `marker.cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmax` must be set as well.
+ color
+ Sets themarkercolor. It accepts either a
+ specific color or an array of numbers that are
+ mapped to the colorscale relative to the max
+ and min values of the array or relative to
+ `marker.cmin` and `marker.cmax` if set.
+ coloraxis
+ Sets a reference to a shared color axis.
+ References to these shared color axes are
+ "coloraxis", "coloraxis2", "coloraxis3", etc.
+ Settings for these shared color axes are set in
+ the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple
+ color scales can be linked to the same color
+ axis.
+ colorbar
+ :class:`plotly.graph_objects.bar.marker.ColorBa
+ r` instance or dict with compatible properties
+ colorscale
+ Sets the colorscale. Has an effect only if in
+ `marker.color`is set to a numerical array. 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`marker.cmin` and
+ `marker.cmax`. Alternatively, `colorscale` may
+ be a palette name string of the following list:
+ Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
+ arth,Electric,Viridis,Cividis.
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ line
+ :class:`plotly.graph_objects.bar.marker.Line`
+ instance or dict with compatible properties
+ opacity
+ Sets the opacity of the bars.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+ reversescale
+ Reverses the color mapping if true. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. If true, `marker.cmin` will
+ correspond to the last color in the array and
+ `marker.cmax` will correspond to the first
+ color.
+ showscale
+ Determines whether or not a colorbar is
+ displayed for this trace. Has an effect only if
+ in `marker.color`is set to a numerical array.
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # offset
+ # ------
+ @property
+ def offset(self):
+ """
+ Shifts the position where the bar is drawn (in position axis
+ units). In "group" barmode, traces that set "offset" will be
+ excluded and drawn in "overlay" mode instead.
+
+ The 'offset' property is a number and may be specified as:
+ - An int or float
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ int|float|numpy.ndarray
+ """
+ return self["offset"]
+
+ @offset.setter
+ def offset(self, val):
+ self["offset"] = val
+
+ # offsetgroup
+ # -----------
+ @property
+ def offsetgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same offsetgroup where bars of the same position
+ coordinate will line up.
+
+ The 'offsetgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetgroup"]
+
+ @offsetgroup.setter
+ def offsetgroup(self, val):
+ self["offsetgroup"] = val
+
+ # offsetsrc
+ # ---------
+ @property
+ def offsetsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for offset .
+
+ The 'offsetsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetsrc"]
+
+ @offsetsrc.setter
+ def offsetsrc(self, val):
+ self["offsetsrc"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # orientation
+ # -----------
+ @property
+ def orientation(self):
+ """
+ Sets the orientation of the bars. With "v" ("h"), the value of
+ the each bar spans along the vertical (horizontal).
+
+ 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
+
+ # outsidetextfont
+ # ---------------
+ @property
+ def outsidetextfont(self):
+ """
+ Sets the font used for `text` lying outside the bar.
+
+ The 'outsidetextfont' property is an instance of Outsidetextfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Outsidetextfont`
+ - A dict of string/value properties that will be passed
+ to the Outsidetextfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Outsidetextfont
+ """
+ return self["outsidetextfont"]
+
+ @outsidetextfont.setter
+ def outsidetextfont(self, val):
+ self["outsidetextfont"] = val
+
+ # r
+ # -
+ @property
+ def r(self):
+ """
+ r coordinates in scatter traces are deprecated!Please switch to
+ the "scatterpolar" trace type.Sets the radial coordinatesfor
+ legacy polar chart only.
+
+ The 'r' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["r"]
+
+ @r.setter
+ def r(self, val):
+ self["r"] = val
+
+ # rsrc
+ # ----
+ @property
+ def rsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for r .
+
+ The 'rsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["rsrc"]
+
+ @rsrc.setter
+ def rsrc(self, val):
+ self["rsrc"] = val
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.bar.selected.Marke
+ r` instance or dict with compatible properties
+ textfont
+ :class:`plotly.graph_objects.bar.selected.Textf
+ ont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.bar.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # t
+ # -
+ @property
+ def t(self):
+ """
+ t coordinates in scatter traces are deprecated!Please switch to
+ the "scatterpolar" trace type.Sets the angular coordinatesfor
+ legacy polar chart only.
+
+ The 't' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["t"]
+
+ @t.setter
+ def t(self, val):
+ self["t"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets text elements associated with each (x,y) pair. If a single
+ string, the same string appears over all the data points. If an
+ array of string, the items are mapped in order to the this
+ trace's (x,y) coordinates. If trace `hoverinfo` contains a
+ "text" flag and "hovertext" is not set, these elements will be
+ seen in the hover labels.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textangle
+ # ---------
+ @property
+ def textangle(self):
+ """
+ Sets the angle of the tick labels with respect to the bar. For
+ example, a `tickangle` of -90 draws the tick labels vertically.
+ With "auto" the texts may automatically be rotated to fit with
+ the maximum size in bars.
+
+ The 'textangle' property is a angle (in degrees) that may be
+ specified as a number between -180 and 180. Numeric values outside this
+ range are converted to the equivalent value
+ (e.g. 270 is converted to -90).
+
+ Returns
+ -------
+ int|float
+ """
+ return self["textangle"]
+
+ @textangle.setter
+ def textangle(self, val):
+ self["textangle"] = val
+
+ # textfont
+ # --------
+ @property
+ def textfont(self):
+ """
+ Sets the font used for `text`.
+
+ The 'textfont' property is an instance of Textfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Textfont`
+ - A dict of string/value properties that will be passed
+ to the Textfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Textfont
+ """
+ return self["textfont"]
+
+ @textfont.setter
+ def textfont(self, val):
+ self["textfont"] = val
+
+ # textposition
+ # ------------
+ @property
+ def textposition(self):
+ """
+ Specifies the location of the `text`. "inside" positions `text`
+ inside, next to the bar end (rotated and scaled if needed).
+ "outside" positions `text` outside, next to the bar end (scaled
+ if needed), unless there is another bar stacked on this one,
+ then the text gets pushed inside. "auto" tries to position
+ `text` inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+
+ The 'textposition' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['inside', 'outside', 'auto', 'none']
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["textposition"]
+
+ @textposition.setter
+ def textposition(self, val):
+ self["textposition"] = val
+
+ # textpositionsrc
+ # ---------------
+ @property
+ def textpositionsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+
+ The 'textpositionsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textpositionsrc"]
+
+ @textpositionsrc.setter
+ def textpositionsrc(self, val):
+ self["textpositionsrc"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # texttemplate
+ # ------------
+ @property
+ def texttemplate(self):
+ """
+ Template string used for rendering the information text that
+ appear on points. Note that this will override `textinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. Every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`) are
+ available. variables `value` and `label`.
+
+ The 'texttemplate' 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["texttemplate"]
+
+ @texttemplate.setter
+ def texttemplate(self, val):
+ self["texttemplate"] = val
+
+ # texttemplatesrc
+ # ---------------
+ @property
+ def texttemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+
+ The 'texttemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["texttemplatesrc"]
+
+ @texttemplatesrc.setter
+ def texttemplatesrc(self, val):
+ self["texttemplatesrc"] = val
+
+ # tsrc
+ # ----
+ @property
+ def tsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for t .
+
+ The 'tsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["tsrc"]
+
+ @tsrc.setter
+ def tsrc(self, val):
+ self["tsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.bar.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.bar.unselected.Mar
+ ker` instance or dict with compatible
+ properties
+ textfont
+ :class:`plotly.graph_objects.bar.unselected.Tex
+ tfont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.bar.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # width
+ # -----
+ @property
+ def width(self):
+ """
+ Sets the bar width (in position axis units).
+
+ The 'width' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ int|float|numpy.ndarray
+ """
+ return self["width"]
+
+ @width.setter
+ def width(self, val):
+ self["width"] = val
+
+ # widthsrc
+ # --------
+ @property
+ def widthsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for width .
+
+ The 'widthsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["widthsrc"]
+
+ @widthsrc.setter
+ def widthsrc(self, val):
+ self["widthsrc"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ycalendar
+ # ---------
+ @property
+ def ycalendar(self):
+ """
+ Sets the calendar system to use with `y` date data.
+
+ The 'ycalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ycalendar"]
+
+ @ycalendar.setter
+ def ycalendar(self, val):
+ self["ycalendar"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ base
+ Sets where the bar base is drawn (in position axis
+ units). In "stack" or "relative" barmode, traces that
+ set "base" will be excluded and drawn in "overlay" mode
+ instead.
+ basesrc
+ Sets the source reference on Chart Studio Cloud for
+ base .
+ cliponaxis
+ Determines whether the text nodes are clipped about the
+ subplot axes. To show the text nodes above axis lines
+ and tick labels, make sure to set `xaxis.layer` and
+ `yaxis.layer` to *below traces*.
+ constraintext
+ Constrain the size of text inside or outside a bar to
+ be no larger than the bar itself.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ error_x
+ :class:`plotly.graph_objects.bar.ErrorX` instance or
+ dict with compatible properties
+ error_y
+ :class:`plotly.graph_objects.bar.ErrorY` instance or
+ dict with compatible properties
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.bar.Hoverlabel` instance
+ or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `value` and `label`. Anything
+ contained in tag `` is displayed in the
+ secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (x,y)
+ pair. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextanchor
+ Determines if texts are kept at center or start/end
+ points in `textposition` "inside" mode.
+ insidetextfont
+ Sets the font used for `text` lying inside the bar.
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.bar.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the position where the bar is drawn (in position
+ axis units). In "group" barmode, traces that set
+ "offset" will be excluded and drawn in "overlay" mode
+ instead.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ offsetsrc
+ Sets the source reference on Chart Studio Cloud for
+ offset .
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the bars. With "v" ("h"), the
+ value of the each bar spans along the vertical
+ (horizontal).
+ outsidetextfont
+ Sets the font used for `text` lying outside the bar.
+ r
+ r coordinates in scatter traces are deprecated!Please
+ switch to the "scatterpolar" trace type.Sets the radial
+ coordinatesfor legacy polar chart only.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ selected
+ :class:`plotly.graph_objects.bar.Selected` instance or
+ dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.bar.Stream` instance or
+ dict with compatible properties
+ t
+ t coordinates in scatter traces are deprecated!Please
+ switch to the "scatterpolar" trace type.Sets the
+ angular coordinatesfor legacy polar chart only.
+ text
+ Sets text elements associated with each (x,y) pair. If
+ a single string, the same string appears over all the
+ data points. If an array of string, the items are
+ mapped in order to the this trace's (x,y) coordinates.
+ If trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textangle
+ Sets the angle of the tick labels with respect to the
+ bar. For example, a `tickangle` of -90 draws the tick
+ labels vertically. With "auto" the texts may
+ automatically be rotated to fit with the maximum size
+ in bars.
+ textfont
+ Sets the font used for `text`.
+ textposition
+ Specifies the location of the `text`. "inside"
+ positions `text` inside, next to the bar end (rotated
+ and scaled if needed). "outside" positions `text`
+ outside, next to the bar end (scaled if needed), unless
+ there is another bar stacked on this one, then the text
+ gets pushed inside. "auto" tries to position `text`
+ inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables `value` and
+ `label`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ tsrc
+ Sets the source reference on Chart Studio Cloud for t
+ .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.bar.Unselected` instance
+ or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar width (in position axis units).
+ widthsrc
+ Sets the source reference on Chart Studio Cloud for
+ width .
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ alignmentgroup=None,
+ base=None,
+ basesrc=None,
+ cliponaxis=None,
+ constraintext=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ error_x=None,
+ error_y=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ insidetextanchor=None,
+ insidetextfont=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ offset=None,
+ offsetgroup=None,
+ offsetsrc=None,
+ opacity=None,
+ orientation=None,
+ outsidetextfont=None,
+ r=None,
+ rsrc=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ t=None,
+ text=None,
+ textangle=None,
+ textfont=None,
+ textposition=None,
+ textpositionsrc=None,
+ textsrc=None,
+ texttemplate=None,
+ texttemplatesrc=None,
+ tsrc=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ visible=None,
+ width=None,
+ widthsrc=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xcalendar=None,
+ xsrc=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ycalendar=None,
+ ysrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Bar object
+
+ The data visualized by the span of the bars is set in `y` if
+ `orientation` is set th "v" (the default) and the labels are
+ set in `x`. By setting `orientation` to "h", the roles are
+ interchanged.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Bar`
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ base
+ Sets where the bar base is drawn (in position axis
+ units). In "stack" or "relative" barmode, traces that
+ set "base" will be excluded and drawn in "overlay" mode
+ instead.
+ basesrc
+ Sets the source reference on Chart Studio Cloud for
+ base .
+ cliponaxis
+ Determines whether the text nodes are clipped about the
+ subplot axes. To show the text nodes above axis lines
+ and tick labels, make sure to set `xaxis.layer` and
+ `yaxis.layer` to *below traces*.
+ constraintext
+ Constrain the size of text inside or outside a bar to
+ be no larger than the bar itself.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ error_x
+ :class:`plotly.graph_objects.bar.ErrorX` instance or
+ dict with compatible properties
+ error_y
+ :class:`plotly.graph_objects.bar.ErrorY` instance or
+ dict with compatible properties
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.bar.Hoverlabel` instance
+ or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `value` and `label`. Anything
+ contained in tag `` is displayed in the
+ secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (x,y)
+ pair. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextanchor
+ Determines if texts are kept at center or start/end
+ points in `textposition` "inside" mode.
+ insidetextfont
+ Sets the font used for `text` lying inside the bar.
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.bar.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the position where the bar is drawn (in position
+ axis units). In "group" barmode, traces that set
+ "offset" will be excluded and drawn in "overlay" mode
+ instead.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ offsetsrc
+ Sets the source reference on Chart Studio Cloud for
+ offset .
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the bars. With "v" ("h"), the
+ value of the each bar spans along the vertical
+ (horizontal).
+ outsidetextfont
+ Sets the font used for `text` lying outside the bar.
+ r
+ r coordinates in scatter traces are deprecated!Please
+ switch to the "scatterpolar" trace type.Sets the radial
+ coordinatesfor legacy polar chart only.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ selected
+ :class:`plotly.graph_objects.bar.Selected` instance or
+ dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.bar.Stream` instance or
+ dict with compatible properties
+ t
+ t coordinates in scatter traces are deprecated!Please
+ switch to the "scatterpolar" trace type.Sets the
+ angular coordinatesfor legacy polar chart only.
+ text
+ Sets text elements associated with each (x,y) pair. If
+ a single string, the same string appears over all the
+ data points. If an array of string, the items are
+ mapped in order to the this trace's (x,y) coordinates.
+ If trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textangle
+ Sets the angle of the tick labels with respect to the
+ bar. For example, a `tickangle` of -90 draws the tick
+ labels vertically. With "auto" the texts may
+ automatically be rotated to fit with the maximum size
+ in bars.
+ textfont
+ Sets the font used for `text`.
+ textposition
+ Specifies the location of the `text`. "inside"
+ positions `text` inside, next to the bar end (rotated
+ and scaled if needed). "outside" positions `text`
+ outside, next to the bar end (scaled if needed), unless
+ there is another bar stacked on this one, then the text
+ gets pushed inside. "auto" tries to position `text`
+ inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables `value` and
+ `label`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ tsrc
+ Sets the source reference on Chart Studio Cloud for t
+ .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.bar.Unselected` instance
+ or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar width (in position axis units).
+ widthsrc
+ Sets the source reference on Chart Studio Cloud for
+ width .
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+
+ Returns
+ -------
+ Bar
+ """
+ super(Bar, self).__init__("bar")
+
+ 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.Bar
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Bar`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("alignmentgroup", None)
+ _v = alignmentgroup if alignmentgroup is not None else _v
+ if _v is not None:
+ self["alignmentgroup"] = _v
+ _v = arg.pop("base", None)
+ _v = base if base is not None else _v
+ if _v is not None:
+ self["base"] = _v
+ _v = arg.pop("basesrc", None)
+ _v = basesrc if basesrc is not None else _v
+ if _v is not None:
+ self["basesrc"] = _v
+ _v = arg.pop("cliponaxis", None)
+ _v = cliponaxis if cliponaxis is not None else _v
+ if _v is not None:
+ self["cliponaxis"] = _v
+ _v = arg.pop("constraintext", None)
+ _v = constraintext if constraintext is not None else _v
+ if _v is not None:
+ self["constraintext"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _v
+ _v = arg.pop("error_x", None)
+ _v = error_x if error_x is not None else _v
+ if _v is not None:
+ self["error_x"] = _v
+ _v = arg.pop("error_y", None)
+ _v = error_y if error_y is not None else _v
+ if _v is not None:
+ self["error_y"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("insidetextanchor", None)
+ _v = insidetextanchor if insidetextanchor is not None else _v
+ if _v is not None:
+ self["insidetextanchor"] = _v
+ _v = arg.pop("insidetextfont", None)
+ _v = insidetextfont if insidetextfont is not None else _v
+ if _v is not None:
+ self["insidetextfont"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("offset", None)
+ _v = offset if offset is not None else _v
+ if _v is not None:
+ self["offset"] = _v
+ _v = arg.pop("offsetgroup", None)
+ _v = offsetgroup if offsetgroup is not None else _v
+ if _v is not None:
+ self["offsetgroup"] = _v
+ _v = arg.pop("offsetsrc", None)
+ _v = offsetsrc if offsetsrc is not None else _v
+ if _v is not None:
+ self["offsetsrc"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("orientation", None)
+ _v = orientation if orientation is not None else _v
+ if _v is not None:
+ self["orientation"] = _v
+ _v = arg.pop("outsidetextfont", None)
+ _v = outsidetextfont if outsidetextfont is not None else _v
+ if _v is not None:
+ self["outsidetextfont"] = _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("rsrc", None)
+ _v = rsrc if rsrc is not None else _v
+ if _v is not None:
+ self["rsrc"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("t", None)
+ _v = t if t is not None else _v
+ if _v is not None:
+ self["t"] = _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("textangle", None)
+ _v = textangle if textangle is not None else _v
+ if _v is not None:
+ self["textangle"] = _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
+ _v = arg.pop("textpositionsrc", None)
+ _v = textpositionsrc if textpositionsrc is not None else _v
+ if _v is not None:
+ self["textpositionsrc"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("texttemplate", None)
+ _v = texttemplate if texttemplate is not None else _v
+ if _v is not None:
+ self["texttemplate"] = _v
+ _v = arg.pop("texttemplatesrc", None)
+ _v = texttemplatesrc if texttemplatesrc is not None else _v
+ if _v is not None:
+ self["texttemplatesrc"] = _v
+ _v = arg.pop("tsrc", None)
+ _v = tsrc if tsrc is not None else _v
+ if _v is not None:
+ self["tsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("width", None)
+ _v = width if width is not None else _v
+ if _v is not None:
+ self["width"] = _v
+ _v = arg.pop("widthsrc", None)
+ _v = widthsrc if widthsrc is not None else _v
+ if _v is not None:
+ self["widthsrc"] = _v
+ _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("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ycalendar", None)
+ _v = ycalendar if ycalendar is not None else _v
+ if _v is not None:
+ self["ycalendar"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "bar"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_barpolar.py b/packages/python/plotly/plotly/graph_objs/_barpolar.py
new file mode 100644
index 00000000000..c1b7597f455
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_barpolar.py
@@ -0,0 +1,1855 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Barpolar(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "barpolar"
+ _valid_props = {
+ "base",
+ "basesrc",
+ "customdata",
+ "customdatasrc",
+ "dr",
+ "dtheta",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "offset",
+ "offsetsrc",
+ "opacity",
+ "r",
+ "r0",
+ "rsrc",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "subplot",
+ "text",
+ "textsrc",
+ "theta",
+ "theta0",
+ "thetasrc",
+ "thetaunit",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "visible",
+ "width",
+ "widthsrc",
+ }
+
+ # base
+ # ----
+ @property
+ def base(self):
+ """
+ Sets where the bar base is drawn (in radial axis units). In
+ "stack" barmode, traces that set "base" will be excluded and
+ drawn in "overlay" mode instead.
+
+ The 'base' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["base"]
+
+ @base.setter
+ def base(self, val):
+ self["base"] = val
+
+ # basesrc
+ # -------
+ @property
+ def basesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for base .
+
+ The 'basesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["basesrc"]
+
+ @basesrc.setter
+ def basesrc(self, val):
+ self["basesrc"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dr
+ # --
+ @property
+ def dr(self):
+ """
+ Sets the r coordinate step.
+
+ The 'dr' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dr"]
+
+ @dr.setter
+ def dr(self, val):
+ self["dr"] = val
+
+ # dtheta
+ # ------
+ @property
+ def dtheta(self):
+ """
+ Sets the theta coordinate step. By default, the `dtheta` step
+ equals the subplot's period divided by the length of the `r`
+ coordinates.
+
+ The 'dtheta' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dtheta"]
+
+ @dtheta.setter
+ def dtheta(self, val):
+ self["dtheta"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
+ (e.g. 'r+theta')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.barpolar.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.barpolar.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ autocolorscale
+ Determines whether the colorscale is a default
+ palette (`autocolorscale: true`) or the palette
+ determined by `marker.colorscale`. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. 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
+ in `marker.color`) or the bounds set in
+ `marker.cmin` and `marker.cmax` Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Defaults to `false` when `marker.cmin`
+ and `marker.cmax` are set by the user.
+ cmax
+ Sets the upper bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmin` must be set as well.
+ cmid
+ Sets the mid-point of the color domain by
+ scaling `marker.cmin` and/or `marker.cmax` to
+ be equidistant to this point. Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Value should have the same units as in
+ `marker.color`. Has no effect when
+ `marker.cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmax` must be set as well.
+ color
+ Sets themarkercolor. It accepts either a
+ specific color or an array of numbers that are
+ mapped to the colorscale relative to the max
+ and min values of the array or relative to
+ `marker.cmin` and `marker.cmax` if set.
+ coloraxis
+ Sets a reference to a shared color axis.
+ References to these shared color axes are
+ "coloraxis", "coloraxis2", "coloraxis3", etc.
+ Settings for these shared color axes are set in
+ the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple
+ color scales can be linked to the same color
+ axis.
+ colorbar
+ :class:`plotly.graph_objects.barpolar.marker.Co
+ lorBar` instance or dict with compatible
+ properties
+ colorscale
+ Sets the colorscale. Has an effect only if in
+ `marker.color`is set to a numerical array. 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`marker.cmin` and
+ `marker.cmax`. Alternatively, `colorscale` may
+ be a palette name string of the following list:
+ Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
+ arth,Electric,Viridis,Cividis.
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ line
+ :class:`plotly.graph_objects.barpolar.marker.Li
+ ne` instance or dict with compatible properties
+ opacity
+ Sets the opacity of the bars.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+ reversescale
+ Reverses the color mapping if true. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. If true, `marker.cmin` will
+ correspond to the last color in the array and
+ `marker.cmax` will correspond to the first
+ color.
+ showscale
+ Determines whether or not a colorbar is
+ displayed for this trace. Has an effect only if
+ in `marker.color`is set to a numerical array.
+
+ Returns
+ -------
+ plotly.graph_objs.barpolar.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # offset
+ # ------
+ @property
+ def offset(self):
+ """
+ Shifts the angular position where the bar is drawn (in
+ "thetatunit" units).
+
+ The 'offset' property is a number and may be specified as:
+ - An int or float
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ int|float|numpy.ndarray
+ """
+ return self["offset"]
+
+ @offset.setter
+ def offset(self, val):
+ self["offset"] = val
+
+ # offsetsrc
+ # ---------
+ @property
+ def offsetsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for offset .
+
+ The 'offsetsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetsrc"]
+
+ @offsetsrc.setter
+ def offsetsrc(self, val):
+ self["offsetsrc"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # r
+ # -
+ @property
+ def r(self):
+ """
+ Sets the radial coordinates
+
+ The 'r' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["r"]
+
+ @r.setter
+ def r(self, val):
+ self["r"] = val
+
+ # r0
+ # --
+ @property
+ def r0(self):
+ """
+ Alternate to `r`. Builds a linear space of r coordinates. Use
+ with `dr` where `r0` is the starting coordinate and `dr` the
+ step.
+
+ The 'r0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["r0"]
+
+ @r0.setter
+ def r0(self, val):
+ self["r0"] = val
+
+ # rsrc
+ # ----
+ @property
+ def rsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for r .
+
+ The 'rsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["rsrc"]
+
+ @rsrc.setter
+ def rsrc(self, val):
+ self["rsrc"] = val
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.barpolar.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.barpolar.selected.
+ Marker` instance or dict with compatible
+ properties
+ textfont
+ :class:`plotly.graph_objects.barpolar.selected.
+ Textfont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.barpolar.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.barpolar.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.barpolar.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # subplot
+ # -------
+ @property
+ def subplot(self):
+ """
+ Sets a reference between this trace's data coordinates and a
+ polar subplot. If "polar" (the default value), the data refer
+ to `layout.polar`. If "polar2", the data refer to
+ `layout.polar2`, and so on.
+
+ The 'subplot' property is an identifier of a particular
+ subplot, of type 'polar', that may be specified as the string 'polar'
+ optionally followed by an integer >= 1
+ (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["subplot"]
+
+ @subplot.setter
+ def subplot(self, val):
+ self["subplot"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets hover text elements associated with each bar. If a single
+ string, the same string appears over all bars. If an array of
+ string, the items are mapped in order to the this trace's
+ coordinates.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # theta
+ # -----
+ @property
+ def theta(self):
+ """
+ Sets the angular coordinates
+
+ The 'theta' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["theta"]
+
+ @theta.setter
+ def theta(self, val):
+ self["theta"] = val
+
+ # theta0
+ # ------
+ @property
+ def theta0(self):
+ """
+ Alternate to `theta`. Builds a linear space of theta
+ coordinates. Use with `dtheta` where `theta0` is the starting
+ coordinate and `dtheta` the step.
+
+ The 'theta0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["theta0"]
+
+ @theta0.setter
+ def theta0(self, val):
+ self["theta0"] = val
+
+ # thetasrc
+ # --------
+ @property
+ def thetasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for theta .
+
+ The 'thetasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["thetasrc"]
+
+ @thetasrc.setter
+ def thetasrc(self, val):
+ self["thetasrc"] = val
+
+ # thetaunit
+ # ---------
+ @property
+ def thetaunit(self):
+ """
+ Sets the unit of input "theta" values. Has an effect only when
+ on "linear" angular axes.
+
+ The 'thetaunit' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['radians', 'degrees', 'gradians']
+
+ Returns
+ -------
+ Any
+ """
+ return self["thetaunit"]
+
+ @thetaunit.setter
+ def thetaunit(self, val):
+ self["thetaunit"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.barpolar.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.barpolar.unselecte
+ d.Marker` instance or dict with compatible
+ properties
+ textfont
+ :class:`plotly.graph_objects.barpolar.unselecte
+ d.Textfont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.barpolar.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # width
+ # -----
+ @property
+ def width(self):
+ """
+ Sets the bar angular width (in "thetaunit" units).
+
+ The 'width' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ int|float|numpy.ndarray
+ """
+ return self["width"]
+
+ @width.setter
+ def width(self, val):
+ self["width"] = val
+
+ # widthsrc
+ # --------
+ @property
+ def widthsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for width .
+
+ The 'widthsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["widthsrc"]
+
+ @widthsrc.setter
+ def widthsrc(self, val):
+ self["widthsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ base
+ Sets where the bar base is drawn (in radial axis
+ units). In "stack" barmode, traces that set "base" will
+ be excluded and drawn in "overlay" mode instead.
+ basesrc
+ Sets the source reference on Chart Studio Cloud for
+ base .
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dr
+ Sets the r coordinate step.
+ dtheta
+ Sets the theta coordinate step. By default, the
+ `dtheta` step equals the subplot's period divided by
+ the length of the `r` coordinates.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.barpolar.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.barpolar.Marker` instance
+ or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the angular position where the bar is drawn (in
+ "thetatunit" units).
+ offsetsrc
+ Sets the source reference on Chart Studio Cloud for
+ offset .
+ opacity
+ Sets the opacity of the trace.
+ r
+ Sets the radial coordinates
+ r0
+ Alternate to `r`. Builds a linear space of r
+ coordinates. Use with `dr` where `r0` is the starting
+ coordinate and `dr` the step.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ selected
+ :class:`plotly.graph_objects.barpolar.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.barpolar.Stream` instance
+ or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a polar subplot. If "polar" (the default value),
+ the data refer to `layout.polar`. If "polar2", the data
+ refer to `layout.polar2`, and so on.
+ text
+ Sets hover text elements associated with each bar. If a
+ single string, the same string appears over all bars.
+ If an array of string, the items are mapped in order to
+ the this trace's coordinates.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ theta
+ Sets the angular coordinates
+ theta0
+ Alternate to `theta`. Builds a linear space of theta
+ coordinates. Use with `dtheta` where `theta0` is the
+ starting coordinate and `dtheta` the step.
+ thetasrc
+ Sets the source reference on Chart Studio Cloud for
+ theta .
+ thetaunit
+ Sets the unit of input "theta" values. Has an effect
+ only when on "linear" angular axes.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.barpolar.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar angular width (in "thetaunit" units).
+ widthsrc
+ Sets the source reference on Chart Studio Cloud for
+ width .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ base=None,
+ basesrc=None,
+ customdata=None,
+ customdatasrc=None,
+ dr=None,
+ dtheta=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ offset=None,
+ offsetsrc=None,
+ opacity=None,
+ r=None,
+ r0=None,
+ rsrc=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ subplot=None,
+ text=None,
+ textsrc=None,
+ theta=None,
+ theta0=None,
+ thetasrc=None,
+ thetaunit=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ visible=None,
+ width=None,
+ widthsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Barpolar object
+
+ The data visualized by the radial span of the bars is set in
+ `r`
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Barpolar`
+ base
+ Sets where the bar base is drawn (in radial axis
+ units). In "stack" barmode, traces that set "base" will
+ be excluded and drawn in "overlay" mode instead.
+ basesrc
+ Sets the source reference on Chart Studio Cloud for
+ base .
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dr
+ Sets the r coordinate step.
+ dtheta
+ Sets the theta coordinate step. By default, the
+ `dtheta` step equals the subplot's period divided by
+ the length of the `r` coordinates.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.barpolar.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.barpolar.Marker` instance
+ or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the angular position where the bar is drawn (in
+ "thetatunit" units).
+ offsetsrc
+ Sets the source reference on Chart Studio Cloud for
+ offset .
+ opacity
+ Sets the opacity of the trace.
+ r
+ Sets the radial coordinates
+ r0
+ Alternate to `r`. Builds a linear space of r
+ coordinates. Use with `dr` where `r0` is the starting
+ coordinate and `dr` the step.
+ rsrc
+ Sets the source reference on Chart Studio Cloud for r
+ .
+ selected
+ :class:`plotly.graph_objects.barpolar.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.barpolar.Stream` instance
+ or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a polar subplot. If "polar" (the default value),
+ the data refer to `layout.polar`. If "polar2", the data
+ refer to `layout.polar2`, and so on.
+ text
+ Sets hover text elements associated with each bar. If a
+ single string, the same string appears over all bars.
+ If an array of string, the items are mapped in order to
+ the this trace's coordinates.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ theta
+ Sets the angular coordinates
+ theta0
+ Alternate to `theta`. Builds a linear space of theta
+ coordinates. Use with `dtheta` where `theta0` is the
+ starting coordinate and `dtheta` the step.
+ thetasrc
+ Sets the source reference on Chart Studio Cloud for
+ theta .
+ thetaunit
+ Sets the unit of input "theta" values. Has an effect
+ only when on "linear" angular axes.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.barpolar.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar angular width (in "thetaunit" units).
+ widthsrc
+ Sets the source reference on Chart Studio Cloud for
+ width .
+
+ Returns
+ -------
+ Barpolar
+ """
+ super(Barpolar, self).__init__("barpolar")
+
+ if "_parent" in kwargs:
+ self._parent = kwargs["_parent"]
+ return
+
+ # Validate arg
+ # ------------
+ if arg is None:
+ arg = {}
+ elif isinstance(arg, self.__class__):
+ arg = arg.to_plotly_json()
+ elif isinstance(arg, dict):
+ arg = _copy.copy(arg)
+ else:
+ raise ValueError(
+ """\
+The first argument to the plotly.graph_objs.Barpolar
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Barpolar`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("base", None)
+ _v = base if base is not None else _v
+ if _v is not None:
+ self["base"] = _v
+ _v = arg.pop("basesrc", None)
+ _v = basesrc if basesrc is not None else _v
+ if _v is not None:
+ self["basesrc"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dr", None)
+ _v = dr if dr is not None else _v
+ if _v is not None:
+ self["dr"] = _v
+ _v = arg.pop("dtheta", None)
+ _v = dtheta if dtheta is not None else _v
+ if _v is not None:
+ self["dtheta"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("offset", None)
+ _v = offset if offset is not None else _v
+ if _v is not None:
+ self["offset"] = _v
+ _v = arg.pop("offsetsrc", None)
+ _v = offsetsrc if offsetsrc is not None else _v
+ if _v is not None:
+ self["offsetsrc"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("r", None)
+ _v = r if r is not None else _v
+ if _v is not None:
+ self["r"] = _v
+ _v = arg.pop("r0", None)
+ _v = r0 if r0 is not None else _v
+ if _v is not None:
+ self["r0"] = _v
+ _v = arg.pop("rsrc", None)
+ _v = rsrc if rsrc is not None else _v
+ if _v is not None:
+ self["rsrc"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("subplot", None)
+ _v = subplot if subplot is not None else _v
+ if _v is not None:
+ self["subplot"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("theta", None)
+ _v = theta if theta is not None else _v
+ if _v is not None:
+ self["theta"] = _v
+ _v = arg.pop("theta0", None)
+ _v = theta0 if theta0 is not None else _v
+ if _v is not None:
+ self["theta0"] = _v
+ _v = arg.pop("thetasrc", None)
+ _v = thetasrc if thetasrc is not None else _v
+ if _v is not None:
+ self["thetasrc"] = _v
+ _v = arg.pop("thetaunit", None)
+ _v = thetaunit if thetaunit is not None else _v
+ if _v is not None:
+ self["thetaunit"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("width", None)
+ _v = width if width is not None else _v
+ if _v is not None:
+ self["width"] = _v
+ _v = arg.pop("widthsrc", None)
+ _v = widthsrc if widthsrc is not None else _v
+ if _v is not None:
+ self["widthsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "barpolar"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_box.py b/packages/python/plotly/plotly/graph_objs/_box.py
new file mode 100644
index 00000000000..c0f5d6af551
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_box.py
@@ -0,0 +1,2943 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Box(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "box"
+ _valid_props = {
+ "alignmentgroup",
+ "boxmean",
+ "boxpoints",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "fillcolor",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hoveron",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "jitter",
+ "legendgroup",
+ "line",
+ "lowerfence",
+ "lowerfencesrc",
+ "marker",
+ "mean",
+ "meansrc",
+ "median",
+ "mediansrc",
+ "meta",
+ "metasrc",
+ "name",
+ "notched",
+ "notchspan",
+ "notchspansrc",
+ "notchwidth",
+ "offsetgroup",
+ "opacity",
+ "orientation",
+ "pointpos",
+ "q1",
+ "q1src",
+ "q3",
+ "q3src",
+ "quartilemethod",
+ "sd",
+ "sdsrc",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "upperfence",
+ "upperfencesrc",
+ "visible",
+ "whiskerwidth",
+ "width",
+ "x",
+ "x0",
+ "xaxis",
+ "xcalendar",
+ "xsrc",
+ "y",
+ "y0",
+ "yaxis",
+ "ycalendar",
+ "ysrc",
+ }
+
+ # alignmentgroup
+ # --------------
+ @property
+ def alignmentgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same alignmentgroup. This controls whether bars
+ compute their positional range dependently or independently.
+
+ The 'alignmentgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["alignmentgroup"]
+
+ @alignmentgroup.setter
+ def alignmentgroup(self, val):
+ self["alignmentgroup"] = val
+
+ # boxmean
+ # -------
+ @property
+ def boxmean(self):
+ """
+ If True, the mean of the box(es)' underlying distribution is
+ drawn as a dashed line inside the box(es). If "sd" the standard
+ deviation is also drawn. Defaults to True when `mean` is set.
+ Defaults to "sd" when `sd` is set Otherwise defaults to False.
+
+ The 'boxmean' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, 'sd', False]
+
+ Returns
+ -------
+ Any
+ """
+ return self["boxmean"]
+
+ @boxmean.setter
+ def boxmean(self, val):
+ self["boxmean"] = val
+
+ # boxpoints
+ # ---------
+ @property
+ def boxpoints(self):
+ """
+ If "outliers", only the sample points lying outside the
+ whiskers are shown If "suspectedoutliers", the outlier points
+ are shown and points either less than 4*Q1-3*Q3 or greater than
+ 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all
+ sample points are shown If False, only the box(es) are shown
+ with no sample points Defaults to "suspectedoutliers" when
+ `marker.outliercolor` or `marker.line.outliercolor` is set.
+ Defaults to "all" under the q1/median/q3 signature. Otherwise
+ defaults to "outliers".
+
+ The 'boxpoints' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['all', 'outliers', 'suspectedoutliers', False]
+
+ Returns
+ -------
+ Any
+ """
+ return self["boxpoints"]
+
+ @boxpoints.setter
+ def boxpoints(self, val):
+ self["boxpoints"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step for multi-box traces set using
+ q1/median/q3.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step for multi-box traces set using
+ q1/median/q3.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # fillcolor
+ # ---------
+ @property
+ def fillcolor(self):
+ """
+ Sets the fill color. Defaults to a half-transparent variant of
+ the line color, marker color, or marker line color, whichever
+ is available.
+
+ 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
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.box.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.box.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hoveron
+ # -------
+ @property
+ def hoveron(self):
+ """
+ Do the hover effects highlight individual boxes or sample
+ points or both?
+
+ The 'hoveron' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['boxes', 'points'] joined with '+' characters
+ (e.g. 'boxes+points')
+
+ Returns
+ -------
+ Any
+ """
+ return self["hoveron"]
+
+ @hoveron.setter
+ def hoveron(self, val):
+ self["hoveron"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # jitter
+ # ------
+ @property
+ def jitter(self):
+ """
+ Sets the amount of jitter in the sample points drawn. If 0, the
+ sample points align along the distribution axis. If 1, the
+ sample points are drawn in a random jitter of width equal to
+ the width of the box(es).
+
+ The 'jitter' property is a number and may be specified as:
+ - An int or float in the interval [0, 1]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["jitter"]
+
+ @jitter.setter
+ def jitter(self, val):
+ self["jitter"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # 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.box.Line`
+ - A dict of string/value properties that will be passed
+ to the Line constructor
+
+ Supported dict properties:
+
+ color
+ Sets the color of line bounding the box(es).
+ width
+ Sets the width (in px) of line bounding the
+ box(es).
+
+ Returns
+ -------
+ plotly.graph_objs.box.Line
+ """
+ return self["line"]
+
+ @line.setter
+ def line(self, val):
+ self["line"] = val
+
+ # lowerfence
+ # ----------
+ @property
+ def lowerfence(self):
+ """
+ Sets the lower fence values. There should be as many items as
+ the number of boxes desired. This attribute has effect only
+ under the q1/median/q3 signature. If `lowerfence` is not
+ provided but a sample (in `y` or `x`) is set, we compute the
+ lower as the last sample point below 1.5 times the IQR.
+
+ The 'lowerfence' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["lowerfence"]
+
+ @lowerfence.setter
+ def lowerfence(self, val):
+ self["lowerfence"] = val
+
+ # lowerfencesrc
+ # -------------
+ @property
+ def lowerfencesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for lowerfence
+ .
+
+ The 'lowerfencesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["lowerfencesrc"]
+
+ @lowerfencesrc.setter
+ def lowerfencesrc(self, val):
+ self["lowerfencesrc"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.box.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ color
+ Sets themarkercolor. It accepts either a
+ specific color or an array of numbers that are
+ mapped to the colorscale relative to the max
+ and min values of the array or relative to
+ `marker.cmin` and `marker.cmax` if set.
+ line
+ :class:`plotly.graph_objects.box.marker.Line`
+ instance or dict with compatible properties
+ opacity
+ Sets the marker opacity.
+ outliercolor
+ Sets the color of the outlier sample points.
+ size
+ Sets the marker size (in px).
+ symbol
+ Sets the marker symbol type. Adding 100 is
+ equivalent to appending "-open" to a symbol
+ name. Adding 200 is equivalent to appending
+ "-dot" to a symbol name. Adding 300 is
+ equivalent to appending "-open-dot" or "dot-
+ open" to a symbol name.
+
+ Returns
+ -------
+ plotly.graph_objs.box.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # mean
+ # ----
+ @property
+ def mean(self):
+ """
+ Sets the mean values. There should be as many items as the
+ number of boxes desired. This attribute has effect only under
+ the q1/median/q3 signature. If `mean` is not provided but a
+ sample (in `y` or `x`) is set, we compute the mean for each box
+ using the sample values.
+
+ The 'mean' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["mean"]
+
+ @mean.setter
+ def mean(self, val):
+ self["mean"] = val
+
+ # meansrc
+ # -------
+ @property
+ def meansrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for mean .
+
+ The 'meansrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["meansrc"]
+
+ @meansrc.setter
+ def meansrc(self, val):
+ self["meansrc"] = val
+
+ # median
+ # ------
+ @property
+ def median(self):
+ """
+ Sets the median values. There should be as many items as the
+ number of boxes desired.
+
+ The 'median' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["median"]
+
+ @median.setter
+ def median(self, val):
+ self["median"] = val
+
+ # mediansrc
+ # ---------
+ @property
+ def mediansrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for median .
+
+ The 'mediansrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["mediansrc"]
+
+ @mediansrc.setter
+ def mediansrc(self, val):
+ self["mediansrc"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover. For box traces, the name will also be used for
+ the position coordinate, if `x` and `x0` (`y` and `y0` if
+ horizontal) are missing and the position axis is categorical
+
+ 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
+
+ # notched
+ # -------
+ @property
+ def notched(self):
+ """
+ Determines whether or not notches are drawn. Notches displays a
+ confidence interval around the median. We compute the
+ confidence interval as median +/- 1.57 * IQR / sqrt(N), where
+ IQR is the interquartile range and N is the sample size. If two
+ boxes' notches do not overlap there is 95% confidence their
+ medians differ. See
+ https://sites.google.com/site/davidsstatistics/home/notched-
+ box-plots for more info. Defaults to False unless `notchwidth`
+ or `notchspan` is set.
+
+ The 'notched' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["notched"]
+
+ @notched.setter
+ def notched(self, val):
+ self["notched"] = val
+
+ # notchspan
+ # ---------
+ @property
+ def notchspan(self):
+ """
+ Sets the notch span from the boxes' `median` values. There
+ should be as many items as the number of boxes desired. This
+ attribute has effect only under the q1/median/q3 signature. If
+ `notchspan` is not provided but a sample (in `y` or `x`) is
+ set, we compute it as 1.57 * IQR / sqrt(N), where N is the
+ sample size.
+
+ The 'notchspan' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["notchspan"]
+
+ @notchspan.setter
+ def notchspan(self, val):
+ self["notchspan"] = val
+
+ # notchspansrc
+ # ------------
+ @property
+ def notchspansrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for notchspan
+ .
+
+ The 'notchspansrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["notchspansrc"]
+
+ @notchspansrc.setter
+ def notchspansrc(self, val):
+ self["notchspansrc"] = val
+
+ # notchwidth
+ # ----------
+ @property
+ def notchwidth(self):
+ """
+ Sets the width of the notches relative to the box' width. For
+ example, with 0, the notches are as wide as the box(es).
+
+ The 'notchwidth' property is a number and may be specified as:
+ - An int or float in the interval [0, 0.5]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["notchwidth"]
+
+ @notchwidth.setter
+ def notchwidth(self, val):
+ self["notchwidth"] = val
+
+ # offsetgroup
+ # -----------
+ @property
+ def offsetgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same offsetgroup where bars of the same position
+ coordinate will line up.
+
+ The 'offsetgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetgroup"]
+
+ @offsetgroup.setter
+ def offsetgroup(self, val):
+ self["offsetgroup"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # orientation
+ # -----------
+ @property
+ def orientation(self):
+ """
+ Sets the orientation of the box(es). If "v" ("h"), the
+ distribution is visualized along the vertical (horizontal).
+
+ 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
+
+ # pointpos
+ # --------
+ @property
+ def pointpos(self):
+ """
+ Sets the position of the sample points in relation to the
+ box(es). If 0, the sample points are places over the center of
+ the box(es). Positive (negative) values correspond to positions
+ to the right (left) for vertical boxes and above (below) for
+ horizontal boxes
+
+ The 'pointpos' property is a number and may be specified as:
+ - An int or float in the interval [-2, 2]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["pointpos"]
+
+ @pointpos.setter
+ def pointpos(self, val):
+ self["pointpos"] = val
+
+ # q1
+ # --
+ @property
+ def q1(self):
+ """
+ Sets the Quartile 1 values. There should be as many items as
+ the number of boxes desired.
+
+ The 'q1' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["q1"]
+
+ @q1.setter
+ def q1(self, val):
+ self["q1"] = val
+
+ # q1src
+ # -----
+ @property
+ def q1src(self):
+ """
+ Sets the source reference on Chart Studio Cloud for q1 .
+
+ The 'q1src' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["q1src"]
+
+ @q1src.setter
+ def q1src(self, val):
+ self["q1src"] = val
+
+ # q3
+ # --
+ @property
+ def q3(self):
+ """
+ Sets the Quartile 3 values. There should be as many items as
+ the number of boxes desired.
+
+ The 'q3' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["q3"]
+
+ @q3.setter
+ def q3(self, val):
+ self["q3"] = val
+
+ # q3src
+ # -----
+ @property
+ def q3src(self):
+ """
+ Sets the source reference on Chart Studio Cloud for q3 .
+
+ The 'q3src' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["q3src"]
+
+ @q3src.setter
+ def q3src(self, val):
+ self["q3src"] = val
+
+ # quartilemethod
+ # --------------
+ @property
+ def quartilemethod(self):
+ """
+ Sets the method used to compute the sample's Q1 and Q3
+ quartiles. The "linear" method uses the 25th percentile for Q1
+ and 75th percentile for Q3 as computed using method #10 (listed
+ on http://www.amstat.org/publications/jse/v14n3/langford.html).
+ The "exclusive" method uses the median to divide the ordered
+ dataset into two halves if the sample is odd, it does not
+ include the median in either half - Q1 is then the median of
+ the lower half and Q3 the median of the upper half. The
+ "inclusive" method also uses the median to divide the ordered
+ dataset into two halves but if the sample is odd, it includes
+ the median in both halves - Q1 is then the median of the lower
+ half and Q3 the median of the upper half.
+
+ The 'quartilemethod' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['linear', 'exclusive', 'inclusive']
+
+ Returns
+ -------
+ Any
+ """
+ return self["quartilemethod"]
+
+ @quartilemethod.setter
+ def quartilemethod(self, val):
+ self["quartilemethod"] = val
+
+ # sd
+ # --
+ @property
+ def sd(self):
+ """
+ Sets the standard deviation values. There should be as many
+ items as the number of boxes desired. This attribute has effect
+ only under the q1/median/q3 signature. If `sd` is not provided
+ but a sample (in `y` or `x`) is set, we compute the standard
+ deviation for each box using the sample values.
+
+ The 'sd' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["sd"]
+
+ @sd.setter
+ def sd(self, val):
+ self["sd"] = val
+
+ # sdsrc
+ # -----
+ @property
+ def sdsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for sd .
+
+ The 'sdsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["sdsrc"]
+
+ @sdsrc.setter
+ def sdsrc(self, val):
+ self["sdsrc"] = val
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.box.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.box.selected.Marke
+ r` instance or dict with compatible properties
+
+ Returns
+ -------
+ plotly.graph_objs.box.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.box.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.box.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each sample value. If a
+ single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ the this trace's (x,y) coordinates. To be seen, trace
+ `hoverinfo` must contain a "text" flag.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.box.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.box.unselected.Mar
+ ker` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.box.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # upperfence
+ # ----------
+ @property
+ def upperfence(self):
+ """
+ Sets the upper fence values. There should be as many items as
+ the number of boxes desired. This attribute has effect only
+ under the q1/median/q3 signature. If `upperfence` is not
+ provided but a sample (in `y` or `x`) is set, we compute the
+ lower as the last sample point above 1.5 times the IQR.
+
+ The 'upperfence' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["upperfence"]
+
+ @upperfence.setter
+ def upperfence(self, val):
+ self["upperfence"] = val
+
+ # upperfencesrc
+ # -------------
+ @property
+ def upperfencesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for upperfence
+ .
+
+ The 'upperfencesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["upperfencesrc"]
+
+ @upperfencesrc.setter
+ def upperfencesrc(self, val):
+ self["upperfencesrc"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # whiskerwidth
+ # ------------
+ @property
+ def whiskerwidth(self):
+ """
+ Sets the width of the whiskers relative to the box' width. For
+ example, with 1, the whiskers are as wide as the box(es).
+
+ The 'whiskerwidth' property is a number and may be specified as:
+ - An int or float in the interval [0, 1]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["whiskerwidth"]
+
+ @whiskerwidth.setter
+ def whiskerwidth(self, val):
+ self["whiskerwidth"] = val
+
+ # width
+ # -----
+ @property
+ def width(self):
+ """
+ Sets the width of the box in data coordinate If 0 (default
+ value) the width is automatically selected based on the
+ positions of other box traces in the same subplot.
+
+ 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
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x sample data or coordinates. See overview for more
+ info.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Sets the x coordinate for single-box traces or the starting
+ coordinate for multi-box traces set using q1/median/q3. See
+ overview for more info.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y sample data or coordinates. See overview for more
+ info.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Sets the y coordinate for single-box traces or the starting
+ coordinate for multi-box traces set using q1/median/q3. See
+ overview for more info.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ycalendar
+ # ---------
+ @property
+ def ycalendar(self):
+ """
+ Sets the calendar system to use with `y` date data.
+
+ The 'ycalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ycalendar"]
+
+ @ycalendar.setter
+ def ycalendar(self, val):
+ self["ycalendar"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ boxmean
+ If True, the mean of the box(es)' underlying
+ distribution is drawn as a dashed line inside the
+ box(es). If "sd" the standard deviation is also drawn.
+ Defaults to True when `mean` is set. Defaults to "sd"
+ when `sd` is set Otherwise defaults to False.
+ boxpoints
+ If "outliers", only the sample points lying outside the
+ whiskers are shown If "suspectedoutliers", the outlier
+ points are shown and points either less than 4*Q1-3*Q3
+ or greater than 4*Q3-3*Q1 are highlighted (see
+ `outliercolor`) If "all", all sample points are shown
+ If False, only the box(es) are shown with no sample
+ points Defaults to "suspectedoutliers" when
+ `marker.outliercolor` or `marker.line.outliercolor` is
+ set. Defaults to "all" under the q1/median/q3
+ signature. Otherwise defaults to "outliers".
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step for multi-box traces set
+ using q1/median/q3.
+ dy
+ Sets the y coordinate step for multi-box traces set
+ using q1/median/q3.
+ fillcolor
+ Sets the fill color. Defaults to a half-transparent
+ variant of the line color, marker color, or marker line
+ color, whichever is available.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.box.Hoverlabel` instance
+ or dict with compatible properties
+ hoveron
+ Do the hover effects highlight individual boxes or
+ sample points or both?
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ jitter
+ Sets the amount of jitter in the sample points drawn.
+ If 0, the sample points align along the distribution
+ axis. If 1, the sample points are drawn in a random
+ jitter of width equal to the width of the box(es).
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.box.Line` instance or dict
+ with compatible properties
+ lowerfence
+ Sets the lower fence values. There should be as many
+ items as the number of boxes desired. This attribute
+ has effect only under the q1/median/q3 signature. If
+ `lowerfence` is not provided but a sample (in `y` or
+ `x`) is set, we compute the lower as the last sample
+ point below 1.5 times the IQR.
+ lowerfencesrc
+ Sets the source reference on Chart Studio Cloud for
+ lowerfence .
+ marker
+ :class:`plotly.graph_objects.box.Marker` instance or
+ dict with compatible properties
+ mean
+ Sets the mean values. There should be as many items as
+ the number of boxes desired. This attribute has effect
+ only under the q1/median/q3 signature. If `mean` is not
+ provided but a sample (in `y` or `x`) is set, we
+ compute the mean for each box using the sample values.
+ meansrc
+ Sets the source reference on Chart Studio Cloud for
+ mean .
+ median
+ Sets the median values. There should be as many items
+ as the number of boxes desired.
+ mediansrc
+ Sets the source reference on Chart Studio Cloud for
+ median .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover. For box traces, the name will
+ also be used for the position coordinate, if `x` and
+ `x0` (`y` and `y0` if horizontal) are missing and the
+ position axis is categorical
+ notched
+ Determines whether or not notches are drawn. Notches
+ displays a confidence interval around the median. We
+ compute the confidence interval as median +/- 1.57 *
+ IQR / sqrt(N), where IQR is the interquartile range and
+ N is the sample size. If two boxes' notches do not
+ overlap there is 95% confidence their medians differ.
+ See https://sites.google.com/site/davidsstatistics/home
+ /notched-box-plots for more info. Defaults to False
+ unless `notchwidth` or `notchspan` is set.
+ notchspan
+ Sets the notch span from the boxes' `median` values.
+ There should be as many items as the number of boxes
+ desired. This attribute has effect only under the
+ q1/median/q3 signature. If `notchspan` is not provided
+ but a sample (in `y` or `x`) is set, we compute it as
+ 1.57 * IQR / sqrt(N), where N is the sample size.
+ notchspansrc
+ Sets the source reference on Chart Studio Cloud for
+ notchspan .
+ notchwidth
+ Sets the width of the notches relative to the box'
+ width. For example, with 0, the notches are as wide as
+ the box(es).
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the box(es). If "v" ("h"), the
+ distribution is visualized along the vertical
+ (horizontal).
+ pointpos
+ Sets the position of the sample points in relation to
+ the box(es). If 0, the sample points are places over
+ the center of the box(es). Positive (negative) values
+ correspond to positions to the right (left) for
+ vertical boxes and above (below) for horizontal boxes
+ q1
+ Sets the Quartile 1 values. There should be as many
+ items as the number of boxes desired.
+ q1src
+ Sets the source reference on Chart Studio Cloud for q1
+ .
+ q3
+ Sets the Quartile 3 values. There should be as many
+ items as the number of boxes desired.
+ q3src
+ Sets the source reference on Chart Studio Cloud for q3
+ .
+ quartilemethod
+ Sets the method used to compute the sample's Q1 and Q3
+ quartiles. The "linear" method uses the 25th percentile
+ for Q1 and 75th percentile for Q3 as computed using
+ method #10 (listed on http://www.amstat.org/publication
+ s/jse/v14n3/langford.html). The "exclusive" method uses
+ the median to divide the ordered dataset into two
+ halves if the sample is odd, it does not include the
+ median in either half - Q1 is then the median of the
+ lower half and Q3 the median of the upper half. The
+ "inclusive" method also uses the median to divide the
+ ordered dataset into two halves but if the sample is
+ odd, it includes the median in both halves - Q1 is then
+ the median of the lower half and Q3 the median of the
+ upper half.
+ sd
+ Sets the standard deviation values. There should be as
+ many items as the number of boxes desired. This
+ attribute has effect only under the q1/median/q3
+ signature. If `sd` is not provided but a sample (in `y`
+ or `x`) is set, we compute the standard deviation for
+ each box using the sample values.
+ sdsrc
+ Sets the source reference on Chart Studio Cloud for sd
+ .
+ selected
+ :class:`plotly.graph_objects.box.Selected` instance or
+ dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.box.Stream` instance or
+ dict with compatible properties
+ text
+ Sets the text elements associated with each sample
+ value. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.box.Unselected` instance
+ or dict with compatible properties
+ upperfence
+ Sets the upper fence values. There should be as many
+ items as the number of boxes desired. This attribute
+ has effect only under the q1/median/q3 signature. If
+ `upperfence` is not provided but a sample (in `y` or
+ `x`) is set, we compute the lower as the last sample
+ point above 1.5 times the IQR.
+ upperfencesrc
+ Sets the source reference on Chart Studio Cloud for
+ upperfence .
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ whiskerwidth
+ Sets the width of the whiskers relative to the box'
+ width. For example, with 1, the whiskers are as wide as
+ the box(es).
+ width
+ Sets the width of the box in data coordinate If 0
+ (default value) the width is automatically selected
+ based on the positions of other box traces in the same
+ subplot.
+ x
+ Sets the x sample data or coordinates. See overview for
+ more info.
+ x0
+ Sets the x coordinate for single-box traces or the
+ starting coordinate for multi-box traces set using
+ q1/median/q3. See overview for more info.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y sample data or coordinates. See overview for
+ more info.
+ y0
+ Sets the y coordinate for single-box traces or the
+ starting coordinate for multi-box traces set using
+ q1/median/q3. See overview for more info.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ alignmentgroup=None,
+ boxmean=None,
+ boxpoints=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ fillcolor=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hoveron=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ jitter=None,
+ legendgroup=None,
+ line=None,
+ lowerfence=None,
+ lowerfencesrc=None,
+ marker=None,
+ mean=None,
+ meansrc=None,
+ median=None,
+ mediansrc=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ notched=None,
+ notchspan=None,
+ notchspansrc=None,
+ notchwidth=None,
+ offsetgroup=None,
+ opacity=None,
+ orientation=None,
+ pointpos=None,
+ q1=None,
+ q1src=None,
+ q3=None,
+ q3src=None,
+ quartilemethod=None,
+ sd=None,
+ sdsrc=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ upperfence=None,
+ upperfencesrc=None,
+ visible=None,
+ whiskerwidth=None,
+ width=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xcalendar=None,
+ xsrc=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ycalendar=None,
+ ysrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Box object
+
+ Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The
+ second quartile (Q2, i.e. the median) is marked by a line
+ inside the box. The fences grow outward from the boxes' edges,
+ by default they span +/- 1.5 times the interquartile range
+ (IQR: Q3-Q1), The sample mean and standard deviation as well as
+ notches and the sample, outlier and suspected outliers points
+ can be optionally added to the box plot. The values and
+ positions corresponding to each boxes can be input using two
+ signatures. The first signature expects users to supply the
+ sample values in the `y` data array for vertical boxes (`x` for
+ horizontal boxes). By supplying an `x` (`y`) array, one box per
+ distinct `x` (`y`) value is drawn If no `x` (`y`) list is
+ provided, a single box is drawn. In this case, the box is
+ positioned with the trace `name` or with `x0` (`y0`) if
+ provided. The second signature expects users to supply the
+ boxes corresponding Q1, median and Q3 statistics in the `q1`,
+ `median` and `q3` data arrays respectively. Other box features
+ relying on statistics namely `lowerfence`, `upperfence`,
+ `notchspan` can be set directly by the users. To have plotly
+ compute them or to show sample points besides the boxes, users
+ can set the `y` data array for vertical boxes (`x` for
+ horizontal boxes) to a 2D array with the outer length
+ corresponding to the number of boxes in the traces and the
+ inner length corresponding the sample size.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Box`
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ boxmean
+ If True, the mean of the box(es)' underlying
+ distribution is drawn as a dashed line inside the
+ box(es). If "sd" the standard deviation is also drawn.
+ Defaults to True when `mean` is set. Defaults to "sd"
+ when `sd` is set Otherwise defaults to False.
+ boxpoints
+ If "outliers", only the sample points lying outside the
+ whiskers are shown If "suspectedoutliers", the outlier
+ points are shown and points either less than 4*Q1-3*Q3
+ or greater than 4*Q3-3*Q1 are highlighted (see
+ `outliercolor`) If "all", all sample points are shown
+ If False, only the box(es) are shown with no sample
+ points Defaults to "suspectedoutliers" when
+ `marker.outliercolor` or `marker.line.outliercolor` is
+ set. Defaults to "all" under the q1/median/q3
+ signature. Otherwise defaults to "outliers".
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step for multi-box traces set
+ using q1/median/q3.
+ dy
+ Sets the y coordinate step for multi-box traces set
+ using q1/median/q3.
+ fillcolor
+ Sets the fill color. Defaults to a half-transparent
+ variant of the line color, marker color, or marker line
+ color, whichever is available.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.box.Hoverlabel` instance
+ or dict with compatible properties
+ hoveron
+ Do the hover effects highlight individual boxes or
+ sample points or both?
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ jitter
+ Sets the amount of jitter in the sample points drawn.
+ If 0, the sample points align along the distribution
+ axis. If 1, the sample points are drawn in a random
+ jitter of width equal to the width of the box(es).
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.box.Line` instance or dict
+ with compatible properties
+ lowerfence
+ Sets the lower fence values. There should be as many
+ items as the number of boxes desired. This attribute
+ has effect only under the q1/median/q3 signature. If
+ `lowerfence` is not provided but a sample (in `y` or
+ `x`) is set, we compute the lower as the last sample
+ point below 1.5 times the IQR.
+ lowerfencesrc
+ Sets the source reference on Chart Studio Cloud for
+ lowerfence .
+ marker
+ :class:`plotly.graph_objects.box.Marker` instance or
+ dict with compatible properties
+ mean
+ Sets the mean values. There should be as many items as
+ the number of boxes desired. This attribute has effect
+ only under the q1/median/q3 signature. If `mean` is not
+ provided but a sample (in `y` or `x`) is set, we
+ compute the mean for each box using the sample values.
+ meansrc
+ Sets the source reference on Chart Studio Cloud for
+ mean .
+ median
+ Sets the median values. There should be as many items
+ as the number of boxes desired.
+ mediansrc
+ Sets the source reference on Chart Studio Cloud for
+ median .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover. For box traces, the name will
+ also be used for the position coordinate, if `x` and
+ `x0` (`y` and `y0` if horizontal) are missing and the
+ position axis is categorical
+ notched
+ Determines whether or not notches are drawn. Notches
+ displays a confidence interval around the median. We
+ compute the confidence interval as median +/- 1.57 *
+ IQR / sqrt(N), where IQR is the interquartile range and
+ N is the sample size. If two boxes' notches do not
+ overlap there is 95% confidence their medians differ.
+ See https://sites.google.com/site/davidsstatistics/home
+ /notched-box-plots for more info. Defaults to False
+ unless `notchwidth` or `notchspan` is set.
+ notchspan
+ Sets the notch span from the boxes' `median` values.
+ There should be as many items as the number of boxes
+ desired. This attribute has effect only under the
+ q1/median/q3 signature. If `notchspan` is not provided
+ but a sample (in `y` or `x`) is set, we compute it as
+ 1.57 * IQR / sqrt(N), where N is the sample size.
+ notchspansrc
+ Sets the source reference on Chart Studio Cloud for
+ notchspan .
+ notchwidth
+ Sets the width of the notches relative to the box'
+ width. For example, with 0, the notches are as wide as
+ the box(es).
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the box(es). If "v" ("h"), the
+ distribution is visualized along the vertical
+ (horizontal).
+ pointpos
+ Sets the position of the sample points in relation to
+ the box(es). If 0, the sample points are places over
+ the center of the box(es). Positive (negative) values
+ correspond to positions to the right (left) for
+ vertical boxes and above (below) for horizontal boxes
+ q1
+ Sets the Quartile 1 values. There should be as many
+ items as the number of boxes desired.
+ q1src
+ Sets the source reference on Chart Studio Cloud for q1
+ .
+ q3
+ Sets the Quartile 3 values. There should be as many
+ items as the number of boxes desired.
+ q3src
+ Sets the source reference on Chart Studio Cloud for q3
+ .
+ quartilemethod
+ Sets the method used to compute the sample's Q1 and Q3
+ quartiles. The "linear" method uses the 25th percentile
+ for Q1 and 75th percentile for Q3 as computed using
+ method #10 (listed on http://www.amstat.org/publication
+ s/jse/v14n3/langford.html). The "exclusive" method uses
+ the median to divide the ordered dataset into two
+ halves if the sample is odd, it does not include the
+ median in either half - Q1 is then the median of the
+ lower half and Q3 the median of the upper half. The
+ "inclusive" method also uses the median to divide the
+ ordered dataset into two halves but if the sample is
+ odd, it includes the median in both halves - Q1 is then
+ the median of the lower half and Q3 the median of the
+ upper half.
+ sd
+ Sets the standard deviation values. There should be as
+ many items as the number of boxes desired. This
+ attribute has effect only under the q1/median/q3
+ signature. If `sd` is not provided but a sample (in `y`
+ or `x`) is set, we compute the standard deviation for
+ each box using the sample values.
+ sdsrc
+ Sets the source reference on Chart Studio Cloud for sd
+ .
+ selected
+ :class:`plotly.graph_objects.box.Selected` instance or
+ dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.box.Stream` instance or
+ dict with compatible properties
+ text
+ Sets the text elements associated with each sample
+ value. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.box.Unselected` instance
+ or dict with compatible properties
+ upperfence
+ Sets the upper fence values. There should be as many
+ items as the number of boxes desired. This attribute
+ has effect only under the q1/median/q3 signature. If
+ `upperfence` is not provided but a sample (in `y` or
+ `x`) is set, we compute the lower as the last sample
+ point above 1.5 times the IQR.
+ upperfencesrc
+ Sets the source reference on Chart Studio Cloud for
+ upperfence .
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ whiskerwidth
+ Sets the width of the whiskers relative to the box'
+ width. For example, with 1, the whiskers are as wide as
+ the box(es).
+ width
+ Sets the width of the box in data coordinate If 0
+ (default value) the width is automatically selected
+ based on the positions of other box traces in the same
+ subplot.
+ x
+ Sets the x sample data or coordinates. See overview for
+ more info.
+ x0
+ Sets the x coordinate for single-box traces or the
+ starting coordinate for multi-box traces set using
+ q1/median/q3. See overview for more info.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y sample data or coordinates. See overview for
+ more info.
+ y0
+ Sets the y coordinate for single-box traces or the
+ starting coordinate for multi-box traces set using
+ q1/median/q3. See overview for more info.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+
+ Returns
+ -------
+ Box
+ """
+ super(Box, self).__init__("box")
+
+ 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.Box
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Box`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("alignmentgroup", None)
+ _v = alignmentgroup if alignmentgroup is not None else _v
+ if _v is not None:
+ self["alignmentgroup"] = _v
+ _v = arg.pop("boxmean", None)
+ _v = boxmean if boxmean is not None else _v
+ if _v is not None:
+ self["boxmean"] = _v
+ _v = arg.pop("boxpoints", None)
+ _v = boxpoints if boxpoints is not None else _v
+ if _v is not None:
+ self["boxpoints"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _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("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hoveron", None)
+ _v = hoveron if hoveron is not None else _v
+ if _v is not None:
+ self["hoveron"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("jitter", None)
+ _v = jitter if jitter is not None else _v
+ if _v is not None:
+ self["jitter"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("line", None)
+ _v = line if line is not None else _v
+ if _v is not None:
+ self["line"] = _v
+ _v = arg.pop("lowerfence", None)
+ _v = lowerfence if lowerfence is not None else _v
+ if _v is not None:
+ self["lowerfence"] = _v
+ _v = arg.pop("lowerfencesrc", None)
+ _v = lowerfencesrc if lowerfencesrc is not None else _v
+ if _v is not None:
+ self["lowerfencesrc"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("mean", None)
+ _v = mean if mean is not None else _v
+ if _v is not None:
+ self["mean"] = _v
+ _v = arg.pop("meansrc", None)
+ _v = meansrc if meansrc is not None else _v
+ if _v is not None:
+ self["meansrc"] = _v
+ _v = arg.pop("median", None)
+ _v = median if median is not None else _v
+ if _v is not None:
+ self["median"] = _v
+ _v = arg.pop("mediansrc", None)
+ _v = mediansrc if mediansrc is not None else _v
+ if _v is not None:
+ self["mediansrc"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("notched", None)
+ _v = notched if notched is not None else _v
+ if _v is not None:
+ self["notched"] = _v
+ _v = arg.pop("notchspan", None)
+ _v = notchspan if notchspan is not None else _v
+ if _v is not None:
+ self["notchspan"] = _v
+ _v = arg.pop("notchspansrc", None)
+ _v = notchspansrc if notchspansrc is not None else _v
+ if _v is not None:
+ self["notchspansrc"] = _v
+ _v = arg.pop("notchwidth", None)
+ _v = notchwidth if notchwidth is not None else _v
+ if _v is not None:
+ self["notchwidth"] = _v
+ _v = arg.pop("offsetgroup", None)
+ _v = offsetgroup if offsetgroup is not None else _v
+ if _v is not None:
+ self["offsetgroup"] = _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("orientation", None)
+ _v = orientation if orientation is not None else _v
+ if _v is not None:
+ self["orientation"] = _v
+ _v = arg.pop("pointpos", None)
+ _v = pointpos if pointpos is not None else _v
+ if _v is not None:
+ self["pointpos"] = _v
+ _v = arg.pop("q1", None)
+ _v = q1 if q1 is not None else _v
+ if _v is not None:
+ self["q1"] = _v
+ _v = arg.pop("q1src", None)
+ _v = q1src if q1src is not None else _v
+ if _v is not None:
+ self["q1src"] = _v
+ _v = arg.pop("q3", None)
+ _v = q3 if q3 is not None else _v
+ if _v is not None:
+ self["q3"] = _v
+ _v = arg.pop("q3src", None)
+ _v = q3src if q3src is not None else _v
+ if _v is not None:
+ self["q3src"] = _v
+ _v = arg.pop("quartilemethod", None)
+ _v = quartilemethod if quartilemethod is not None else _v
+ if _v is not None:
+ self["quartilemethod"] = _v
+ _v = arg.pop("sd", None)
+ _v = sd if sd is not None else _v
+ if _v is not None:
+ self["sd"] = _v
+ _v = arg.pop("sdsrc", None)
+ _v = sdsrc if sdsrc is not None else _v
+ if _v is not None:
+ self["sdsrc"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("upperfence", None)
+ _v = upperfence if upperfence is not None else _v
+ if _v is not None:
+ self["upperfence"] = _v
+ _v = arg.pop("upperfencesrc", None)
+ _v = upperfencesrc if upperfencesrc is not None else _v
+ if _v is not None:
+ self["upperfencesrc"] = _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("whiskerwidth", None)
+ _v = whiskerwidth if whiskerwidth is not None else _v
+ if _v is not None:
+ self["whiskerwidth"] = _v
+ _v = arg.pop("width", None)
+ _v = width if width is not None else _v
+ if _v is not None:
+ self["width"] = _v
+ _v = arg.pop("x", None)
+ _v = x if x is not None else _v
+ if _v is not None:
+ self["x"] = _v
+ _v = arg.pop("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ycalendar", None)
+ _v = ycalendar if ycalendar is not None else _v
+ if _v is not None:
+ self["ycalendar"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "box"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_candlestick.py b/packages/python/plotly/plotly/graph_objs/_candlestick.py
new file mode 100644
index 00000000000..bfc9c8fe85f
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_candlestick.py
@@ -0,0 +1,1584 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Candlestick(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "candlestick"
+ _valid_props = {
+ "close",
+ "closesrc",
+ "customdata",
+ "customdatasrc",
+ "decreasing",
+ "high",
+ "highsrc",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "increasing",
+ "legendgroup",
+ "line",
+ "low",
+ "lowsrc",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "open",
+ "opensrc",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "whiskerwidth",
+ "x",
+ "xaxis",
+ "xcalendar",
+ "xsrc",
+ "yaxis",
+ }
+
+ # close
+ # -----
+ @property
+ def close(self):
+ """
+ Sets the close values.
+
+ The 'close' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["close"]
+
+ @close.setter
+ def close(self, val):
+ self["close"] = val
+
+ # closesrc
+ # --------
+ @property
+ def closesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for close .
+
+ The 'closesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["closesrc"]
+
+ @closesrc.setter
+ def closesrc(self, val):
+ self["closesrc"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # decreasing
+ # ----------
+ @property
+ def decreasing(self):
+ """
+ The 'decreasing' property is an instance of Decreasing
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.candlestick.Decreasing`
+ - A dict of string/value properties that will be passed
+ to the Decreasing constructor
+
+ Supported dict properties:
+
+ fillcolor
+ Sets the fill color. Defaults to a half-
+ transparent variant of the line color, marker
+ color, or marker line color, whichever is
+ available.
+ line
+ :class:`plotly.graph_objects.candlestick.decrea
+ sing.Line` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.candlestick.Decreasing
+ """
+ return self["decreasing"]
+
+ @decreasing.setter
+ def decreasing(self, val):
+ self["decreasing"] = val
+
+ # high
+ # ----
+ @property
+ def high(self):
+ """
+ Sets the high values.
+
+ The 'high' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["high"]
+
+ @high.setter
+ def high(self, val):
+ self["high"] = val
+
+ # highsrc
+ # -------
+ @property
+ def highsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for high .
+
+ The 'highsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["highsrc"]
+
+ @highsrc.setter
+ def highsrc(self, val):
+ self["highsrc"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+ split
+ Show hover information (open, close, high, low)
+ in separate labels.
+
+ Returns
+ -------
+ plotly.graph_objs.candlestick.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # increasing
+ # ----------
+ @property
+ def increasing(self):
+ """
+ The 'increasing' property is an instance of Increasing
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.candlestick.Increasing`
+ - A dict of string/value properties that will be passed
+ to the Increasing constructor
+
+ Supported dict properties:
+
+ fillcolor
+ Sets the fill color. Defaults to a half-
+ transparent variant of the line color, marker
+ color, or marker line color, whichever is
+ available.
+ line
+ :class:`plotly.graph_objects.candlestick.increa
+ sing.Line` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.candlestick.Increasing
+ """
+ return self["increasing"]
+
+ @increasing.setter
+ def increasing(self, val):
+ self["increasing"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # 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.candlestick.Line`
+ - A dict of string/value properties that will be passed
+ to the Line constructor
+
+ Supported dict properties:
+
+ width
+ Sets the width (in px) of line bounding the
+ box(es). Note that this style setting can also
+ be set per direction via
+ `increasing.line.width` and
+ `decreasing.line.width`.
+
+ Returns
+ -------
+ plotly.graph_objs.candlestick.Line
+ """
+ return self["line"]
+
+ @line.setter
+ def line(self, val):
+ self["line"] = val
+
+ # low
+ # ---
+ @property
+ def low(self):
+ """
+ Sets the low values.
+
+ The 'low' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["low"]
+
+ @low.setter
+ def low(self, val):
+ self["low"] = val
+
+ # lowsrc
+ # ------
+ @property
+ def lowsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for low .
+
+ The 'lowsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["lowsrc"]
+
+ @lowsrc.setter
+ def lowsrc(self, val):
+ self["lowsrc"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # open
+ # ----
+ @property
+ def open(self):
+ """
+ Sets the open values.
+
+ The 'open' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["open"]
+
+ @open.setter
+ def open(self, val):
+ self["open"] = val
+
+ # opensrc
+ # -------
+ @property
+ def opensrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for open .
+
+ The 'opensrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["opensrc"]
+
+ @opensrc.setter
+ def opensrc(self, val):
+ self["opensrc"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.candlestick.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.candlestick.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets hover text elements associated with each sample point. If
+ a single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ this trace's sample points.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # whiskerwidth
+ # ------------
+ @property
+ def whiskerwidth(self):
+ """
+ Sets the width of the whiskers relative to the box' width. For
+ example, with 1, the whiskers are as wide as the box(es).
+
+ The 'whiskerwidth' property is a number and may be specified as:
+ - An int or float in the interval [0, 1]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["whiskerwidth"]
+
+ @whiskerwidth.setter
+ def whiskerwidth(self, val):
+ self["whiskerwidth"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates. If absent, linear coordinate will be
+ generated.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ close
+ Sets the close values.
+ closesrc
+ Sets the source reference on Chart Studio Cloud for
+ close .
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ decreasing
+ :class:`plotly.graph_objects.candlestick.Decreasing`
+ instance or dict with compatible properties
+ high
+ Sets the high values.
+ highsrc
+ Sets the source reference on Chart Studio Cloud for
+ high .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.candlestick.Hoverlabel`
+ instance or dict with compatible properties
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ increasing
+ :class:`plotly.graph_objects.candlestick.Increasing`
+ instance or dict with compatible properties
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.candlestick.Line` instance
+ or dict with compatible properties
+ low
+ Sets the low values.
+ lowsrc
+ Sets the source reference on Chart Studio Cloud for
+ low .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ open
+ Sets the open values.
+ opensrc
+ Sets the source reference on Chart Studio Cloud for
+ open .
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.candlestick.Stream`
+ instance or dict with compatible properties
+ text
+ Sets hover text elements associated with each sample
+ point. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to this trace's sample points.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ whiskerwidth
+ Sets the width of the whiskers relative to the box'
+ width. For example, with 1, the whiskers are as wide as
+ the box(es).
+ x
+ Sets the x coordinates. If absent, linear coordinate
+ will be generated.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ close=None,
+ closesrc=None,
+ customdata=None,
+ customdatasrc=None,
+ decreasing=None,
+ high=None,
+ highsrc=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ increasing=None,
+ legendgroup=None,
+ line=None,
+ low=None,
+ lowsrc=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ open=None,
+ opensrc=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ whiskerwidth=None,
+ x=None,
+ xaxis=None,
+ xcalendar=None,
+ xsrc=None,
+ yaxis=None,
+ **kwargs
+ ):
+ """
+ Construct a new Candlestick object
+
+ The candlestick is a style of financial chart describing open,
+ high, low and close for a given `x` coordinate (most likely
+ time). The boxes represent the spread between the `open` and
+ `close` values and the lines represent the spread between the
+ `low` and `high` values Sample points where the close value is
+ higher (lower) then the open value are called increasing
+ (decreasing). By default, increasing candles are drawn in green
+ whereas decreasing are drawn in red.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Candlestick`
+ close
+ Sets the close values.
+ closesrc
+ Sets the source reference on Chart Studio Cloud for
+ close .
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ decreasing
+ :class:`plotly.graph_objects.candlestick.Decreasing`
+ instance or dict with compatible properties
+ high
+ Sets the high values.
+ highsrc
+ Sets the source reference on Chart Studio Cloud for
+ high .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.candlestick.Hoverlabel`
+ instance or dict with compatible properties
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ increasing
+ :class:`plotly.graph_objects.candlestick.Increasing`
+ instance or dict with compatible properties
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.candlestick.Line` instance
+ or dict with compatible properties
+ low
+ Sets the low values.
+ lowsrc
+ Sets the source reference on Chart Studio Cloud for
+ low .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ open
+ Sets the open values.
+ opensrc
+ Sets the source reference on Chart Studio Cloud for
+ open .
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.candlestick.Stream`
+ instance or dict with compatible properties
+ text
+ Sets hover text elements associated with each sample
+ point. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to this trace's sample points.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ whiskerwidth
+ Sets the width of the whiskers relative to the box'
+ width. For example, with 1, the whiskers are as wide as
+ the box(es).
+ x
+ Sets the x coordinates. If absent, linear coordinate
+ will be generated.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+
+ Returns
+ -------
+ Candlestick
+ """
+ super(Candlestick, self).__init__("candlestick")
+
+ 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.Candlestick
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Candlestick`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("close", None)
+ _v = close if close is not None else _v
+ if _v is not None:
+ self["close"] = _v
+ _v = arg.pop("closesrc", None)
+ _v = closesrc if closesrc is not None else _v
+ if _v is not None:
+ self["closesrc"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("decreasing", None)
+ _v = decreasing if decreasing is not None else _v
+ if _v is not None:
+ self["decreasing"] = _v
+ _v = arg.pop("high", None)
+ _v = high if high is not None else _v
+ if _v is not None:
+ self["high"] = _v
+ _v = arg.pop("highsrc", None)
+ _v = highsrc if highsrc is not None else _v
+ if _v is not None:
+ self["highsrc"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("increasing", None)
+ _v = increasing if increasing is not None else _v
+ if _v is not None:
+ self["increasing"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("line", None)
+ _v = line if line is not None else _v
+ if _v is not None:
+ self["line"] = _v
+ _v = arg.pop("low", None)
+ _v = low if low is not None else _v
+ if _v is not None:
+ self["low"] = _v
+ _v = arg.pop("lowsrc", None)
+ _v = lowsrc if lowsrc is not None else _v
+ if _v is not None:
+ self["lowsrc"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("open", None)
+ _v = open if open is not None else _v
+ if _v is not None:
+ self["open"] = _v
+ _v = arg.pop("opensrc", None)
+ _v = opensrc if opensrc is not None else _v
+ if _v is not None:
+ self["opensrc"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("whiskerwidth", None)
+ _v = whiskerwidth if whiskerwidth is not None else _v
+ if _v is not None:
+ self["whiskerwidth"] = _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("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "candlestick"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_carpet.py b/packages/python/plotly/plotly/graph_objs/_carpet.py
new file mode 100644
index 00000000000..78a52f6556e
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_carpet.py
@@ -0,0 +1,1759 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Carpet(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "carpet"
+ _valid_props = {
+ "a",
+ "a0",
+ "aaxis",
+ "asrc",
+ "b",
+ "b0",
+ "baxis",
+ "bsrc",
+ "carpet",
+ "cheaterslope",
+ "color",
+ "customdata",
+ "customdatasrc",
+ "da",
+ "db",
+ "font",
+ "ids",
+ "idssrc",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "stream",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "x",
+ "xaxis",
+ "xsrc",
+ "y",
+ "yaxis",
+ "ysrc",
+ }
+
+ # a
+ # -
+ @property
+ def a(self):
+ """
+ An array containing values of the first parameter value
+
+ The 'a' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["a"]
+
+ @a.setter
+ def a(self, val):
+ self["a"] = val
+
+ # a0
+ # --
+ @property
+ def a0(self):
+ """
+ Alternate to `a`. Builds a linear space of a coordinates. Use
+ with `da` where `a0` is the starting coordinate and `da` the
+ step.
+
+ The 'a0' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["a0"]
+
+ @a0.setter
+ def a0(self, val):
+ self["a0"] = val
+
+ # aaxis
+ # -----
+ @property
+ def aaxis(self):
+ """
+ The 'aaxis' property is an instance of Aaxis
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.carpet.Aaxis`
+ - A dict of string/value properties that will be passed
+ to the Aaxis constructor
+
+ Supported dict properties:
+
+ arraydtick
+ The stride between grid lines along the axis
+ arraytick0
+ The starting index of grid lines along the axis
+ autorange
+ Determines whether or not the range of this
+ axis is computed in relation to the input data.
+ See `rangemode` for more info. If `range` is
+ provided, then `autorange` is set to False.
+ categoryarray
+ Sets the order in which categories on this axis
+ appear. Only has an effect if `categoryorder`
+ is set to "array". Used with `categoryorder`.
+ categoryarraysrc
+ Sets the source reference on Chart Studio Cloud
+ for categoryarray .
+ categoryorder
+ Specifies the ordering logic for the case of
+ categorical variables. By default, plotly uses
+ "trace", which specifies the order that is
+ present in the data supplied. Set
+ `categoryorder` to *category ascending* or
+ *category descending* if order should be
+ determined by the alphanumerical order of the
+ category names. Set `categoryorder` to "array"
+ to derive the ordering from the attribute
+ `categoryarray`. If a category is not found in
+ the `categoryarray` array, the sorting behavior
+ for that attribute will be identical to the
+ "trace" mode. The unspecified categories will
+ follow the categories in `categoryarray`.
+ cheatertype
+
+ color
+ Sets default for all colors associated with
+ this axis all at once: line, font, tick, and
+ grid colors. Grid color is lightened by
+ blending this with the plot background
+ Individual pieces can override this.
+ dtick
+ The stride between grid lines along the axis
+ endline
+ Determines whether or not a line is drawn at
+ along the final value of this axis. If True,
+ the end line is drawn on top of the grid lines.
+ endlinecolor
+ Sets the line color of the end line.
+ endlinewidth
+ Sets the width (in px) of the end line.
+ 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.
+ fixedrange
+ Determines whether or not this axis is zoom-
+ able. If true, then zoom is disabled.
+ gridcolor
+ Sets the axis line color.
+ gridwidth
+ Sets the width (in px) of the axis line.
+ labelpadding
+ Extra padding between label and the axis
+ labelprefix
+ Sets a axis label prefix.
+ labelsuffix
+ Sets a axis label suffix.
+ linecolor
+ Sets the axis line color.
+ linewidth
+ Sets the width (in px) of the axis line.
+ minorgridcolor
+ Sets the color of the grid lines.
+ minorgridcount
+ Sets the number of minor grid ticks per major
+ grid tick
+ minorgridwidth
+ Sets the width (in px) of the grid lines.
+ nticks
+ Specifies the maximum number of ticks for the
+ particular axis. The actual number of ticks
+ will be chosen automatically to be less than or
+ equal to `nticks`. Has an effect only if
+ `tickmode` is set to "auto".
+ range
+ Sets the range of this axis. If the axis `type`
+ is "log", then you must take the log of your
+ desired range (e.g. to set the range from 1 to
+ 100, set the range from 0 to 2). If the axis
+ `type` is "date", it should be date strings,
+ like date data, though Date objects and unix
+ milliseconds will be accepted and converted to
+ strings. If the axis `type` is "category", it
+ should be numbers, using the scale where each
+ category is assigned a serial number from zero
+ in the order it appears.
+ rangemode
+ If "normal", the range is computed in relation
+ to the extrema of the input data. If *tozero*`,
+ the range extends to 0, regardless of the input
+ data If "nonnegative", the range is non-
+ negative, regardless of the input data.
+ 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.
+ 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 axis labels are drawn on the
+ low side, the high side, both, or neither side
+ of the axis.
+ 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.
+ smoothing
+
+ startline
+ Determines whether or not a line is drawn at
+ along the starting value of this axis. If True,
+ the start line is drawn on top of the grid
+ lines.
+ startlinecolor
+ Sets the line color of the start line.
+ startlinewidth
+ Sets the width (in px) of the start line.
+ tick0
+ The starting index of grid lines along the axis
+ tickangle
+ Sets the angle of the tick labels with respect
+ to the horizontal. For example, a `tickangle`
+ of -90 draws the tick labels vertically.
+ 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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see: We add one item to d3's
+ date formatter: "%{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.carpet.
+ aaxis.Tickformatstop` instances or dicts with
+ compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.carpet.aaxis.tickformatstopdefaults), sets
+ the default property values to use for elements
+ of carpet.aaxis.tickformatstops
+ tickmode
+
+ tickprefix
+ Sets a tick label prefix.
+ 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 .
+ title
+ :class:`plotly.graph_objects.carpet.aaxis.Title
+ ` instance or dict with compatible properties
+ titlefont
+ Deprecated: Please use carpet.aaxis.title.font
+ instead. Sets this axis' title font. Note that
+ the title's font used to be set by the now
+ deprecated `titlefont` attribute.
+ titleoffset
+ Deprecated: Please use
+ carpet.aaxis.title.offset instead. An
+ additional amount by which to offset the title
+ from the tick labels, given in pixels. Note
+ that this used to be set by the now deprecated
+ `titleoffset` attribute.
+ type
+ Sets the axis type. By default, plotly attempts
+ to determined the axis type by looking into the
+ data of the traces that referenced the axis in
+ question.
+
+ Returns
+ -------
+ plotly.graph_objs.carpet.Aaxis
+ """
+ return self["aaxis"]
+
+ @aaxis.setter
+ def aaxis(self, val):
+ self["aaxis"] = val
+
+ # asrc
+ # ----
+ @property
+ def asrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for a .
+
+ The 'asrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["asrc"]
+
+ @asrc.setter
+ def asrc(self, val):
+ self["asrc"] = val
+
+ # b
+ # -
+ @property
+ def b(self):
+ """
+ A two dimensional array of y coordinates at each carpet point.
+
+ The 'b' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["b"]
+
+ @b.setter
+ def b(self, val):
+ self["b"] = val
+
+ # b0
+ # --
+ @property
+ def b0(self):
+ """
+ Alternate to `b`. Builds a linear space of a coordinates. Use
+ with `db` where `b0` is the starting coordinate and `db` the
+ step.
+
+ The 'b0' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["b0"]
+
+ @b0.setter
+ def b0(self, val):
+ self["b0"] = val
+
+ # baxis
+ # -----
+ @property
+ def baxis(self):
+ """
+ The 'baxis' property is an instance of Baxis
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.carpet.Baxis`
+ - A dict of string/value properties that will be passed
+ to the Baxis constructor
+
+ Supported dict properties:
+
+ arraydtick
+ The stride between grid lines along the axis
+ arraytick0
+ The starting index of grid lines along the axis
+ autorange
+ Determines whether or not the range of this
+ axis is computed in relation to the input data.
+ See `rangemode` for more info. If `range` is
+ provided, then `autorange` is set to False.
+ categoryarray
+ Sets the order in which categories on this axis
+ appear. Only has an effect if `categoryorder`
+ is set to "array". Used with `categoryorder`.
+ categoryarraysrc
+ Sets the source reference on Chart Studio Cloud
+ for categoryarray .
+ categoryorder
+ Specifies the ordering logic for the case of
+ categorical variables. By default, plotly uses
+ "trace", which specifies the order that is
+ present in the data supplied. Set
+ `categoryorder` to *category ascending* or
+ *category descending* if order should be
+ determined by the alphanumerical order of the
+ category names. Set `categoryorder` to "array"
+ to derive the ordering from the attribute
+ `categoryarray`. If a category is not found in
+ the `categoryarray` array, the sorting behavior
+ for that attribute will be identical to the
+ "trace" mode. The unspecified categories will
+ follow the categories in `categoryarray`.
+ cheatertype
+
+ color
+ Sets default for all colors associated with
+ this axis all at once: line, font, tick, and
+ grid colors. Grid color is lightened by
+ blending this with the plot background
+ Individual pieces can override this.
+ dtick
+ The stride between grid lines along the axis
+ endline
+ Determines whether or not a line is drawn at
+ along the final value of this axis. If True,
+ the end line is drawn on top of the grid lines.
+ endlinecolor
+ Sets the line color of the end line.
+ endlinewidth
+ Sets the width (in px) of the end line.
+ 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.
+ fixedrange
+ Determines whether or not this axis is zoom-
+ able. If true, then zoom is disabled.
+ gridcolor
+ Sets the axis line color.
+ gridwidth
+ Sets the width (in px) of the axis line.
+ labelpadding
+ Extra padding between label and the axis
+ labelprefix
+ Sets a axis label prefix.
+ labelsuffix
+ Sets a axis label suffix.
+ linecolor
+ Sets the axis line color.
+ linewidth
+ Sets the width (in px) of the axis line.
+ minorgridcolor
+ Sets the color of the grid lines.
+ minorgridcount
+ Sets the number of minor grid ticks per major
+ grid tick
+ minorgridwidth
+ Sets the width (in px) of the grid lines.
+ nticks
+ Specifies the maximum number of ticks for the
+ particular axis. The actual number of ticks
+ will be chosen automatically to be less than or
+ equal to `nticks`. Has an effect only if
+ `tickmode` is set to "auto".
+ range
+ Sets the range of this axis. If the axis `type`
+ is "log", then you must take the log of your
+ desired range (e.g. to set the range from 1 to
+ 100, set the range from 0 to 2). If the axis
+ `type` is "date", it should be date strings,
+ like date data, though Date objects and unix
+ milliseconds will be accepted and converted to
+ strings. If the axis `type` is "category", it
+ should be numbers, using the scale where each
+ category is assigned a serial number from zero
+ in the order it appears.
+ rangemode
+ If "normal", the range is computed in relation
+ to the extrema of the input data. If *tozero*`,
+ the range extends to 0, regardless of the input
+ data If "nonnegative", the range is non-
+ negative, regardless of the input data.
+ 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.
+ 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 axis labels are drawn on the
+ low side, the high side, both, or neither side
+ of the axis.
+ 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.
+ smoothing
+
+ startline
+ Determines whether or not a line is drawn at
+ along the starting value of this axis. If True,
+ the start line is drawn on top of the grid
+ lines.
+ startlinecolor
+ Sets the line color of the start line.
+ startlinewidth
+ Sets the width (in px) of the start line.
+ tick0
+ The starting index of grid lines along the axis
+ tickangle
+ Sets the angle of the tick labels with respect
+ to the horizontal. For example, a `tickangle`
+ of -90 draws the tick labels vertically.
+ 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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see: We add one item to d3's
+ date formatter: "%{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.carpet.
+ baxis.Tickformatstop` instances or dicts with
+ compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.carpet.baxis.tickformatstopdefaults), sets
+ the default property values to use for elements
+ of carpet.baxis.tickformatstops
+ tickmode
+
+ tickprefix
+ Sets a tick label prefix.
+ 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 .
+ title
+ :class:`plotly.graph_objects.carpet.baxis.Title
+ ` instance or dict with compatible properties
+ titlefont
+ Deprecated: Please use carpet.baxis.title.font
+ instead. Sets this axis' title font. Note that
+ the title's font used to be set by the now
+ deprecated `titlefont` attribute.
+ titleoffset
+ Deprecated: Please use
+ carpet.baxis.title.offset instead. An
+ additional amount by which to offset the title
+ from the tick labels, given in pixels. Note
+ that this used to be set by the now deprecated
+ `titleoffset` attribute.
+ type
+ Sets the axis type. By default, plotly attempts
+ to determined the axis type by looking into the
+ data of the traces that referenced the axis in
+ question.
+
+ Returns
+ -------
+ plotly.graph_objs.carpet.Baxis
+ """
+ return self["baxis"]
+
+ @baxis.setter
+ def baxis(self, val):
+ self["baxis"] = val
+
+ # bsrc
+ # ----
+ @property
+ def bsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for b .
+
+ The 'bsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["bsrc"]
+
+ @bsrc.setter
+ def bsrc(self, val):
+ self["bsrc"] = val
+
+ # carpet
+ # ------
+ @property
+ def carpet(self):
+ """
+ An identifier for this carpet, so that `scattercarpet` and
+ `contourcarpet` traces can specify a carpet plot on which they
+ lie
+
+ The 'carpet' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["carpet"]
+
+ @carpet.setter
+ def carpet(self, val):
+ self["carpet"] = val
+
+ # cheaterslope
+ # ------------
+ @property
+ def cheaterslope(self):
+ """
+ The shift applied to each successive row of data in creating a
+ cheater plot. Only used if `x` is been ommitted.
+
+ The 'cheaterslope' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["cheaterslope"]
+
+ @cheaterslope.setter
+ def cheaterslope(self, val):
+ self["cheaterslope"] = val
+
+ # color
+ # -----
+ @property
+ def color(self):
+ """
+ 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.
+
+ 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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # da
+ # --
+ @property
+ def da(self):
+ """
+ Sets the a coordinate step. See `a0` for more info.
+
+ The 'da' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["da"]
+
+ @da.setter
+ def da(self, val):
+ self["da"] = val
+
+ # db
+ # --
+ @property
+ def db(self):
+ """
+ Sets the b coordinate step. See `b0` for more info.
+
+ The 'db' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["db"]
+
+ @db.setter
+ def db(self, val):
+ self["db"] = val
+
+ # font
+ # ----
+ @property
+ def font(self):
+ """
+ The default font used for axis & tick labels on this carpet
+
+ The 'font' property is an instance of Font
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.carpet.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.carpet.Font
+ """
+ return self["font"]
+
+ @font.setter
+ def font(self, val):
+ self["font"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.carpet.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.carpet.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ A two dimensional array of x coordinates at each carpet point.
+ If ommitted, the plot is a cheater plot and the xaxis is hidden
+ by default.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ A two dimensional array of y coordinates at each carpet point.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ a
+ An array containing values of the first parameter value
+ a0
+ Alternate to `a`. Builds a linear space of a
+ coordinates. Use with `da` where `a0` is the starting
+ coordinate and `da` the step.
+ aaxis
+ :class:`plotly.graph_objects.carpet.Aaxis` instance or
+ dict with compatible properties
+ asrc
+ Sets the source reference on Chart Studio Cloud for a
+ .
+ b
+ A two dimensional array of y coordinates at each carpet
+ point.
+ b0
+ Alternate to `b`. Builds a linear space of a
+ coordinates. Use with `db` where `b0` is the starting
+ coordinate and `db` the step.
+ baxis
+ :class:`plotly.graph_objects.carpet.Baxis` instance or
+ dict with compatible properties
+ bsrc
+ Sets the source reference on Chart Studio Cloud for b
+ .
+ carpet
+ An identifier for this carpet, so that `scattercarpet`
+ and `contourcarpet` traces can specify a carpet plot on
+ which they lie
+ cheaterslope
+ The shift applied to each successive row of data in
+ creating a cheater plot. Only used if `x` is been
+ ommitted.
+ 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.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ da
+ Sets the a coordinate step. See `a0` for more info.
+ db
+ Sets the b coordinate step. See `b0` for more info.
+ font
+ The default font used for axis & tick labels on this
+ carpet
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ stream
+ :class:`plotly.graph_objects.carpet.Stream` instance or
+ dict with compatible properties
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ A two dimensional array of x coordinates at each carpet
+ point. If ommitted, the plot is a cheater plot and the
+ xaxis is hidden by default.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ A two dimensional array of y coordinates at each carpet
+ point.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ a=None,
+ a0=None,
+ aaxis=None,
+ asrc=None,
+ b=None,
+ b0=None,
+ baxis=None,
+ bsrc=None,
+ carpet=None,
+ cheaterslope=None,
+ color=None,
+ customdata=None,
+ customdatasrc=None,
+ da=None,
+ db=None,
+ font=None,
+ ids=None,
+ idssrc=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ stream=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ x=None,
+ xaxis=None,
+ xsrc=None,
+ y=None,
+ yaxis=None,
+ ysrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Carpet object
+
+ The data describing carpet axis layout is set in `y` and
+ (optionally) also `x`. If only `y` is present, `x` the plot is
+ interpreted as a cheater plot and is filled in using the `y`
+ values. `x` and `y` may either be 2D arrays matching with each
+ dimension matching that of `a` and `b`, or they may be 1D
+ arrays with total length equal to that of `a` and `b`.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Carpet`
+ a
+ An array containing values of the first parameter value
+ a0
+ Alternate to `a`. Builds a linear space of a
+ coordinates. Use with `da` where `a0` is the starting
+ coordinate and `da` the step.
+ aaxis
+ :class:`plotly.graph_objects.carpet.Aaxis` instance or
+ dict with compatible properties
+ asrc
+ Sets the source reference on Chart Studio Cloud for a
+ .
+ b
+ A two dimensional array of y coordinates at each carpet
+ point.
+ b0
+ Alternate to `b`. Builds a linear space of a
+ coordinates. Use with `db` where `b0` is the starting
+ coordinate and `db` the step.
+ baxis
+ :class:`plotly.graph_objects.carpet.Baxis` instance or
+ dict with compatible properties
+ bsrc
+ Sets the source reference on Chart Studio Cloud for b
+ .
+ carpet
+ An identifier for this carpet, so that `scattercarpet`
+ and `contourcarpet` traces can specify a carpet plot on
+ which they lie
+ cheaterslope
+ The shift applied to each successive row of data in
+ creating a cheater plot. Only used if `x` is been
+ ommitted.
+ 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.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ da
+ Sets the a coordinate step. See `a0` for more info.
+ db
+ Sets the b coordinate step. See `b0` for more info.
+ font
+ The default font used for axis & tick labels on this
+ carpet
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ stream
+ :class:`plotly.graph_objects.carpet.Stream` instance or
+ dict with compatible properties
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ A two dimensional array of x coordinates at each carpet
+ point. If ommitted, the plot is a cheater plot and the
+ xaxis is hidden by default.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ A two dimensional array of y coordinates at each carpet
+ point.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+
+ Returns
+ -------
+ Carpet
+ """
+ super(Carpet, self).__init__("carpet")
+
+ 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.Carpet
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Carpet`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("a", None)
+ _v = a if a is not None else _v
+ if _v is not None:
+ self["a"] = _v
+ _v = arg.pop("a0", None)
+ _v = a0 if a0 is not None else _v
+ if _v is not None:
+ self["a0"] = _v
+ _v = arg.pop("aaxis", None)
+ _v = aaxis if aaxis is not None else _v
+ if _v is not None:
+ self["aaxis"] = _v
+ _v = arg.pop("asrc", None)
+ _v = asrc if asrc is not None else _v
+ if _v is not None:
+ self["asrc"] = _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("b0", None)
+ _v = b0 if b0 is not None else _v
+ if _v is not None:
+ self["b0"] = _v
+ _v = arg.pop("baxis", None)
+ _v = baxis if baxis is not None else _v
+ if _v is not None:
+ self["baxis"] = _v
+ _v = arg.pop("bsrc", None)
+ _v = bsrc if bsrc is not None else _v
+ if _v is not None:
+ self["bsrc"] = _v
+ _v = arg.pop("carpet", None)
+ _v = carpet if carpet is not None else _v
+ if _v is not None:
+ self["carpet"] = _v
+ _v = arg.pop("cheaterslope", None)
+ _v = cheaterslope if cheaterslope is not None else _v
+ if _v is not None:
+ self["cheaterslope"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("da", None)
+ _v = da if da is not None else _v
+ if _v is not None:
+ self["da"] = _v
+ _v = arg.pop("db", None)
+ _v = db if db is not None else _v
+ if _v is not None:
+ self["db"] = _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("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("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("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "carpet"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_choropleth.py b/packages/python/plotly/plotly/graph_objs/_choropleth.py
new file mode 100644
index 00000000000..e22ea8152ef
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_choropleth.py
@@ -0,0 +1,2128 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Choropleth(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "choropleth"
+ _valid_props = {
+ "autocolorscale",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "featureidkey",
+ "geo",
+ "geojson",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "locationmode",
+ "locations",
+ "locationssrc",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "reversescale",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "showscale",
+ "stream",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "visible",
+ "z",
+ "zauto",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.choropleth.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.choropl
+ eth.colorbar.Tickformatstop` instances or dicts
+ with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.choropleth.colorbar.tickformatstopdefaults),
+ sets the default property values to use for
+ elements of choropleth.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.choropleth.colorba
+ r.Title` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ choropleth.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
+ choropleth.colorbar.title.side instead.
+ Determines the location of color bar's title
+ with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.choropleth.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # featureidkey
+ # ------------
+ @property
+ def featureidkey(self):
+ """
+ Sets the key in GeoJSON features which is used as id to match
+ the items included in the `locations` array. Only has an effect
+ when `geojson` is set. Support nested property, for example
+ "properties.name".
+
+ The 'featureidkey' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["featureidkey"]
+
+ @featureidkey.setter
+ def featureidkey(self, val):
+ self["featureidkey"] = val
+
+ # geo
+ # ---
+ @property
+ def geo(self):
+ """
+ Sets a reference between this trace's geospatial coordinates
+ and a geographic map. If "geo" (the default value), the
+ geospatial coordinates refer to `layout.geo`. If "geo2", the
+ geospatial coordinates refer to `layout.geo2`, and so on.
+
+ The 'geo' property is an identifier of a particular
+ subplot, of type 'geo', that may be specified as the string 'geo'
+ optionally followed by an integer >= 1
+ (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["geo"]
+
+ @geo.setter
+ def geo(self, val):
+ self["geo"] = val
+
+ # geojson
+ # -------
+ @property
+ def geojson(self):
+ """
+ Sets optional GeoJSON data associated with this trace. If not
+ given, the features on the base map are used. It can be set as
+ a valid GeoJSON object or as a URL string. Note that we only
+ accept GeoJSONs of type "FeatureCollection" or "Feature" with
+ geometries of type "Polygon" or "MultiPolygon".
+
+ The 'geojson' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["geojson"]
+
+ @geojson.setter
+ def geojson(self, val):
+ self["geojson"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'location+z')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.choropleth.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # locationmode
+ # ------------
+ @property
+ def locationmode(self):
+ """
+ Determines the set of locations used to match entries in
+ `locations` to regions on the map. Values "ISO-3", "USA-
+ states", *country names* correspond to features on the base map
+ and value "geojson-id" corresponds to features from a custom
+ GeoJSON linked to the `geojson` attribute.
+
+ The 'locationmode' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['ISO-3', 'USA-states', 'country names', 'geojson-id']
+
+ Returns
+ -------
+ Any
+ """
+ return self["locationmode"]
+
+ @locationmode.setter
+ def locationmode(self, val):
+ self["locationmode"] = val
+
+ # locations
+ # ---------
+ @property
+ def locations(self):
+ """
+ Sets the coordinates via location IDs or names. See
+ `locationmode` for more info.
+
+ The 'locations' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["locations"]
+
+ @locations.setter
+ def locations(self, val):
+ self["locations"] = val
+
+ # locationssrc
+ # ------------
+ @property
+ def locationssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for locations
+ .
+
+ The 'locationssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["locationssrc"]
+
+ @locationssrc.setter
+ def locationssrc(self, val):
+ self["locationssrc"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choropleth.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ line
+ :class:`plotly.graph_objects.choropleth.marker.
+ Line` instance or dict with compatible
+ properties
+ opacity
+ Sets the opacity of the locations.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+
+ Returns
+ -------
+ plotly.graph_objs.choropleth.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choropleth.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.choropleth.selecte
+ d.Marker` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.choropleth.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choropleth.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.choropleth.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each location.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choropleth.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.choropleth.unselec
+ ted.Marker` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.choropleth.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the color values.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.choropleth.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ featureidkey
+ Sets the key in GeoJSON features which is used as id to
+ match the items included in the `locations` array. Only
+ has an effect when `geojson` is set. Support nested
+ property, for example "properties.name".
+ geo
+ Sets a reference between this trace's geospatial
+ coordinates and a geographic map. If "geo" (the default
+ value), the geospatial coordinates refer to
+ `layout.geo`. If "geo2", the geospatial coordinates
+ refer to `layout.geo2`, and so on.
+ geojson
+ Sets optional GeoJSON data associated with this trace.
+ If not given, the features on the base map are used. It
+ can be set as a valid GeoJSON object or as a URL
+ string. Note that we only accept GeoJSONs of type
+ "FeatureCollection" or "Feature" with geometries of
+ type "Polygon" or "MultiPolygon".
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.choropleth.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ locationmode
+ Determines the set of locations used to match entries
+ in `locations` to regions on the map. Values "ISO-3",
+ "USA-states", *country names* correspond to features on
+ the base map and value "geojson-id" corresponds to
+ features from a custom GeoJSON linked to the `geojson`
+ attribute.
+ locations
+ Sets the coordinates via location IDs or names. See
+ `locationmode` for more info.
+ locationssrc
+ Sets the source reference on Chart Studio Cloud for
+ locations .
+ marker
+ :class:`plotly.graph_objects.choropleth.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ selected
+ :class:`plotly.graph_objects.choropleth.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.choropleth.Stream`
+ instance or dict with compatible properties
+ text
+ Sets the text elements associated with each location.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.choropleth.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the color values.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ customdata=None,
+ customdatasrc=None,
+ featureidkey=None,
+ geo=None,
+ geojson=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ locationmode=None,
+ locations=None,
+ locationssrc=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ reversescale=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ visible=None,
+ z=None,
+ zauto=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Choropleth object
+
+ The data that describes the choropleth value-to-color mapping
+ is set in `z`. The geographic locations corresponding to each
+ value in `z` are set in `locations`.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Choropleth`
+ 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.choropleth.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ featureidkey
+ Sets the key in GeoJSON features which is used as id to
+ match the items included in the `locations` array. Only
+ has an effect when `geojson` is set. Support nested
+ property, for example "properties.name".
+ geo
+ Sets a reference between this trace's geospatial
+ coordinates and a geographic map. If "geo" (the default
+ value), the geospatial coordinates refer to
+ `layout.geo`. If "geo2", the geospatial coordinates
+ refer to `layout.geo2`, and so on.
+ geojson
+ Sets optional GeoJSON data associated with this trace.
+ If not given, the features on the base map are used. It
+ can be set as a valid GeoJSON object or as a URL
+ string. Note that we only accept GeoJSONs of type
+ "FeatureCollection" or "Feature" with geometries of
+ type "Polygon" or "MultiPolygon".
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.choropleth.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ locationmode
+ Determines the set of locations used to match entries
+ in `locations` to regions on the map. Values "ISO-3",
+ "USA-states", *country names* correspond to features on
+ the base map and value "geojson-id" corresponds to
+ features from a custom GeoJSON linked to the `geojson`
+ attribute.
+ locations
+ Sets the coordinates via location IDs or names. See
+ `locationmode` for more info.
+ locationssrc
+ Sets the source reference on Chart Studio Cloud for
+ locations .
+ marker
+ :class:`plotly.graph_objects.choropleth.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ selected
+ :class:`plotly.graph_objects.choropleth.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.choropleth.Stream`
+ instance or dict with compatible properties
+ text
+ Sets the text elements associated with each location.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.choropleth.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the color values.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Choropleth
+ """
+ super(Choropleth, self).__init__("choropleth")
+
+ 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.Choropleth
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Choropleth`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("featureidkey", None)
+ _v = featureidkey if featureidkey is not None else _v
+ if _v is not None:
+ self["featureidkey"] = _v
+ _v = arg.pop("geo", None)
+ _v = geo if geo is not None else _v
+ if _v is not None:
+ self["geo"] = _v
+ _v = arg.pop("geojson", None)
+ _v = geojson if geojson is not None else _v
+ if _v is not None:
+ self["geojson"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("locationmode", None)
+ _v = locationmode if locationmode is not None else _v
+ if _v is not None:
+ self["locationmode"] = _v
+ _v = arg.pop("locations", None)
+ _v = locations if locations is not None else _v
+ if _v is not None:
+ self["locations"] = _v
+ _v = arg.pop("locationssrc", None)
+ _v = locationssrc if locationssrc is not None else _v
+ if _v is not None:
+ self["locationssrc"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("reversescale", None)
+ _v = reversescale if reversescale is not None else _v
+ if _v is not None:
+ self["reversescale"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "choropleth"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py b/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py
new file mode 100644
index 00000000000..a6731287907
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_choroplethmapbox.py
@@ -0,0 +1,2121 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Choroplethmapbox(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "choroplethmapbox"
+ _valid_props = {
+ "autocolorscale",
+ "below",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "featureidkey",
+ "geojson",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "locations",
+ "locationssrc",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "reversescale",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "showscale",
+ "stream",
+ "subplot",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "visible",
+ "z",
+ "zauto",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # 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
+
+ # below
+ # -----
+ @property
+ def below(self):
+ """
+ Determines if the choropleth polygons will be inserted before
+ the layer with the specified ID. By default, choroplethmapbox
+ traces are placed above the water layers. If 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.choroplethmapbox.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.choropl
+ ethmapbox.colorbar.Tickformatstop` instances or
+ dicts with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.choroplethmapbox.colorbar.tickformatstopdefau
+ lts), sets the default property values to use
+ for elements of
+ choroplethmapbox.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.choroplethmapbox.c
+ olorbar.Title` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ choroplethmapbox.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
+ choroplethmapbox.colorbar.title.side instead.
+ Determines the location of color bar's title
+ with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.choroplethmapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # featureidkey
+ # ------------
+ @property
+ def featureidkey(self):
+ """
+ Sets the key in GeoJSON features which is used as id to match
+ the items included in the `locations` array. Support nested
+ property, for example "properties.name".
+
+ The 'featureidkey' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["featureidkey"]
+
+ @featureidkey.setter
+ def featureidkey(self, val):
+ self["featureidkey"] = val
+
+ # geojson
+ # -------
+ @property
+ def geojson(self):
+ """
+ Sets the GeoJSON data associated with this trace. It can be set
+ as a valid GeoJSON object or as a URL string. Note that we only
+ accept GeoJSONs of type "FeatureCollection" or "Feature" with
+ geometries of type "Polygon" or "MultiPolygon".
+
+ The 'geojson' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["geojson"]
+
+ @geojson.setter
+ def geojson(self, val):
+ self["geojson"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'location+z')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.choroplethmapbox.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variable `properties` Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary box
+ completely, use an empty tag ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # locations
+ # ---------
+ @property
+ def locations(self):
+ """
+ Sets which features found in "geojson" to plot using their
+ feature `id` field.
+
+ The 'locations' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["locations"]
+
+ @locations.setter
+ def locations(self, val):
+ self["locations"] = val
+
+ # locationssrc
+ # ------------
+ @property
+ def locationssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for locations
+ .
+
+ The 'locationssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["locationssrc"]
+
+ @locationssrc.setter
+ def locationssrc(self, val):
+ self["locationssrc"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ line
+ :class:`plotly.graph_objects.choroplethmapbox.m
+ arker.Line` instance or dict with compatible
+ properties
+ opacity
+ Sets the opacity of the locations.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+
+ Returns
+ -------
+ plotly.graph_objs.choroplethmapbox.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.choroplethmapbox.s
+ elected.Marker` instance or dict with
+ compatible properties
+
+ Returns
+ -------
+ plotly.graph_objs.choroplethmapbox.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.choroplethmapbox.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # subplot
+ # -------
+ @property
+ def subplot(self):
+ """
+ Sets a reference between this trace's data coordinates and a
+ mapbox subplot. If "mapbox" (the default value), the data refer
+ to `layout.mapbox`. If "mapbox2", the data refer to
+ `layout.mapbox2`, and so on.
+
+ The 'subplot' property is an identifier of a particular
+ subplot, of type 'mapbox', that may be specified as the string 'mapbox'
+ optionally followed by an integer >= 1
+ (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["subplot"]
+
+ @subplot.setter
+ def subplot(self, val):
+ self["subplot"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each location.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.choroplethmapbox.u
+ nselected.Marker` instance or dict with
+ compatible properties
+
+ Returns
+ -------
+ plotly.graph_objs.choroplethmapbox.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the color values.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ below
+ Determines if the choropleth polygons will be inserted
+ before the layer with the specified ID. By default,
+ choroplethmapbox traces are placed above the water
+ layers. If set to '', the layer will be inserted above
+ every existing layer.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.choroplethmapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ featureidkey
+ Sets the key in GeoJSON features which is used as id to
+ match the items included in the `locations` array.
+ Support nested property, for example "properties.name".
+ geojson
+ Sets the GeoJSON data associated with this trace. It
+ can be set as a valid GeoJSON object or as a URL
+ string. Note that we only accept GeoJSONs of type
+ "FeatureCollection" or "Feature" with geometries of
+ type "Polygon" or "MultiPolygon".
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe
+ l` instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `properties` Anything contained
+ in tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ locations
+ Sets which features found in "geojson" to plot using
+ their feature `id` field.
+ locationssrc
+ Sets the source reference on Chart Studio Cloud for
+ locations .
+ marker
+ :class:`plotly.graph_objects.choroplethmapbox.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ selected
+ :class:`plotly.graph_objects.choroplethmapbox.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.choroplethmapbox.Stream`
+ instance or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a mapbox subplot. If "mapbox" (the default value),
+ the data refer to `layout.mapbox`. If "mapbox2", the
+ data refer to `layout.mapbox2`, and so on.
+ text
+ Sets the text elements associated with each location.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.choroplethmapbox.Unselecte
+ d` instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the color values.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ below=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ customdata=None,
+ customdatasrc=None,
+ featureidkey=None,
+ geojson=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ locations=None,
+ locationssrc=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ reversescale=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ subplot=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ visible=None,
+ z=None,
+ zauto=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Choroplethmapbox object
+
+ GeoJSON features to be filled are set in `geojson` The data
+ that describes the choropleth value-to-color mapping is set in
+ `locations` and `z`.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of
+ :class:`plotly.graph_objs.Choroplethmapbox`
+ 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.
+ below
+ Determines if the choropleth polygons will be inserted
+ before the layer with the specified ID. By default,
+ choroplethmapbox traces are placed above the water
+ layers. If set to '', the layer will be inserted above
+ every existing layer.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.choroplethmapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ featureidkey
+ Sets the key in GeoJSON features which is used as id to
+ match the items included in the `locations` array.
+ Support nested property, for example "properties.name".
+ geojson
+ Sets the GeoJSON data associated with this trace. It
+ can be set as a valid GeoJSON object or as a URL
+ string. Note that we only accept GeoJSONs of type
+ "FeatureCollection" or "Feature" with geometries of
+ type "Polygon" or "MultiPolygon".
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe
+ l` instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `properties` Anything contained
+ in tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ locations
+ Sets which features found in "geojson" to plot using
+ their feature `id` field.
+ locationssrc
+ Sets the source reference on Chart Studio Cloud for
+ locations .
+ marker
+ :class:`plotly.graph_objects.choroplethmapbox.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ selected
+ :class:`plotly.graph_objects.choroplethmapbox.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.choroplethmapbox.Stream`
+ instance or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a mapbox subplot. If "mapbox" (the default value),
+ the data refer to `layout.mapbox`. If "mapbox2", the
+ data refer to `layout.mapbox2`, and so on.
+ text
+ Sets the text elements associated with each location.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.choroplethmapbox.Unselecte
+ d` instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the color values.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Choroplethmapbox
+ """
+ super(Choroplethmapbox, self).__init__("choroplethmapbox")
+
+ 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.Choroplethmapbox
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Choroplethmapbox`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("below", None)
+ _v = below if below is not None else _v
+ if _v is not None:
+ self["below"] = _v
+ _v = arg.pop("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("featureidkey", None)
+ _v = featureidkey if featureidkey is not None else _v
+ if _v is not None:
+ self["featureidkey"] = _v
+ _v = arg.pop("geojson", None)
+ _v = geojson if geojson is not None else _v
+ if _v is not None:
+ self["geojson"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("locations", None)
+ _v = locations if locations is not None else _v
+ if _v is not None:
+ self["locations"] = _v
+ _v = arg.pop("locationssrc", None)
+ _v = locationssrc if locationssrc is not None else _v
+ if _v is not None:
+ self["locationssrc"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("reversescale", None)
+ _v = reversescale if reversescale is not None else _v
+ if _v is not None:
+ self["reversescale"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("subplot", None)
+ _v = subplot if subplot is not None else _v
+ if _v is not None:
+ self["subplot"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "choroplethmapbox"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_cone.py b/packages/python/plotly/plotly/graph_objs/_cone.py
new file mode 100644
index 00000000000..b36f6bd6784
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_cone.py
@@ -0,0 +1,2383 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Cone(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "cone"
+ _valid_props = {
+ "anchor",
+ "autocolorscale",
+ "cauto",
+ "cmax",
+ "cmid",
+ "cmin",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "lighting",
+ "lightposition",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "reversescale",
+ "scene",
+ "showlegend",
+ "showscale",
+ "sizemode",
+ "sizeref",
+ "stream",
+ "text",
+ "textsrc",
+ "type",
+ "u",
+ "uid",
+ "uirevision",
+ "usrc",
+ "v",
+ "visible",
+ "vsrc",
+ "w",
+ "wsrc",
+ "x",
+ "xsrc",
+ "y",
+ "ysrc",
+ "z",
+ "zsrc",
+ }
+
+ # anchor
+ # ------
+ @property
+ def anchor(self):
+ """
+ Sets the cones' anchor with respect to their x/y/z positions.
+ Note that "cm" denote the cone's center of mass which
+ corresponds to 1/4 from the tail to tip.
+
+ The 'anchor' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['tip', 'tail', 'cm', 'center']
+
+ Returns
+ -------
+ Any
+ """
+ return self["anchor"]
+
+ @anchor.setter
+ def anchor(self, val):
+ self["anchor"] = val
+
+ # 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. 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 u/v/w norm 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.cone.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.cone.co
+ lorbar.Tickformatstop` instances or dicts with
+ compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.cone.colorbar.tickformatstopdefaults), sets
+ the default property values to use for elements
+ of cone.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.cone.colorbar.Titl
+ e` instance or dict with compatible properties
+ titlefont
+ Deprecated: Please use cone.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 cone.colorbar.title.side
+ instead. Determines the location of color bar's
+ title with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.cone.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: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.cone.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.cone.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variable `norm` Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary box
+ completely, use an empty tag ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # lighting
+ # --------
+ @property
+ def lighting(self):
+ """
+ The 'lighting' property is an instance of Lighting
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.cone.Lighting`
+ - A dict of string/value properties that will be passed
+ to the Lighting constructor
+
+ Supported dict properties:
+
+ ambient
+ Ambient light increases overall color
+ visibility but can wash out the image.
+ diffuse
+ Represents the extent that incident rays are
+ reflected in a range of angles.
+ facenormalsepsilon
+ Epsilon for face normals calculation avoids
+ math issues arising from degenerate geometry.
+ fresnel
+ Represents the reflectance as a dependency of
+ the viewing angle; e.g. paper is reflective
+ when viewing it from the edge of the paper
+ (almost 90 degrees), causing shine.
+ roughness
+ Alters specular reflection; the rougher the
+ surface, the wider and less contrasty the
+ shine.
+ specular
+ Represents the level that incident rays are
+ reflected in a single direction, causing shine.
+ vertexnormalsepsilon
+ Epsilon for vertex normals calculation avoids
+ math issues arising from degenerate geometry.
+
+ Returns
+ -------
+ plotly.graph_objs.cone.Lighting
+ """
+ return self["lighting"]
+
+ @lighting.setter
+ def lighting(self, val):
+ self["lighting"] = val
+
+ # lightposition
+ # -------------
+ @property
+ def lightposition(self):
+ """
+ The 'lightposition' property is an instance of Lightposition
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.cone.Lightposition`
+ - A dict of string/value properties that will be passed
+ to the Lightposition constructor
+
+ Supported dict properties:
+
+ x
+ Numeric vector, representing the X coordinate
+ for each vertex.
+ y
+ Numeric vector, representing the Y coordinate
+ for each vertex.
+ z
+ Numeric vector, representing the Z coordinate
+ for each vertex.
+
+ Returns
+ -------
+ plotly.graph_objs.cone.Lightposition
+ """
+ return self["lightposition"]
+
+ @lightposition.setter
+ def lightposition(self, val):
+ self["lightposition"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 surface. Please note that in the case
+ of using high `opacity` values for example a value greater than
+ or equal to 0.5 on two surfaces (and 0.25 with four surfaces),
+ an overlay of multiple transparent surfaces may not perfectly
+ be sorted in depth by the webgl API. This behavior may be
+ improved in the near future and is subject to change.
+
+ 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
+
+ # 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
+
+ # scene
+ # -----
+ @property
+ def scene(self):
+ """
+ Sets a reference between this trace's 3D coordinate system and
+ a 3D scene. If "scene" (the default value), the (x,y,z)
+ coordinates refer to `layout.scene`. If "scene2", the (x,y,z)
+ coordinates refer to `layout.scene2`, and so on.
+
+ The 'scene' property is an identifier of a particular
+ subplot, of type 'scene', that may be specified as the string 'scene'
+ optionally followed by an integer >= 1
+ (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["scene"]
+
+ @scene.setter
+ def scene(self, val):
+ self["scene"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # sizemode
+ # --------
+ @property
+ def sizemode(self):
+ """
+ Determines whether `sizeref` is set as a "scaled" (i.e
+ unitless) scalar (normalized by the max u/v/w norm in the
+ vector field) or as "absolute" value (in the same units as the
+ vector field).
+
+ The 'sizemode' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['scaled', 'absolute']
+
+ Returns
+ -------
+ Any
+ """
+ return self["sizemode"]
+
+ @sizemode.setter
+ def sizemode(self, val):
+ self["sizemode"] = val
+
+ # sizeref
+ # -------
+ @property
+ def sizeref(self):
+ """
+ Adjusts the cone size scaling. The size of the cones is
+ determined by their u/v/w norm multiplied a factor and
+ `sizeref`. This factor (computed internally) corresponds to the
+ minimum "time" to travel across two successive x/y/z positions
+ at the average velocity of those two successive positions. All
+ cones in a given trace use the same factor. With `sizemode` set
+ to "scaled", `sizeref` is unitless, its default value is 0.5
+ With `sizemode` set to "absolute", `sizeref` has the same units
+ as the u/v/w vector field, its the default value is half the
+ sample's maximum vector norm.
+
+ The 'sizeref' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["sizeref"]
+
+ @sizeref.setter
+ def sizeref(self, val):
+ self["sizeref"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.cone.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.cone.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with the cones. If trace
+ `hoverinfo` contains a "text" flag and "hovertext" is not set,
+ these elements will be seen in the hover labels.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # u
+ # -
+ @property
+ def u(self):
+ """
+ Sets the x components of the vector field.
+
+ The 'u' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["u"]
+
+ @u.setter
+ def u(self, val):
+ self["u"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # usrc
+ # ----
+ @property
+ def usrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for u .
+
+ The 'usrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["usrc"]
+
+ @usrc.setter
+ def usrc(self, val):
+ self["usrc"] = val
+
+ # v
+ # -
+ @property
+ def v(self):
+ """
+ Sets the y components of the vector field.
+
+ The 'v' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["v"]
+
+ @v.setter
+ def v(self, val):
+ self["v"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # vsrc
+ # ----
+ @property
+ def vsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for v .
+
+ The 'vsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["vsrc"]
+
+ @vsrc.setter
+ def vsrc(self, val):
+ self["vsrc"] = val
+
+ # w
+ # -
+ @property
+ def w(self):
+ """
+ Sets the z components of the vector field.
+
+ The 'w' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["w"]
+
+ @w.setter
+ def w(self, val):
+ self["w"] = val
+
+ # wsrc
+ # ----
+ @property
+ def wsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for w .
+
+ The 'wsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["wsrc"]
+
+ @wsrc.setter
+ def wsrc(self, val):
+ self["wsrc"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates of the vector field and of the displayed
+ cones.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates of the vector field and of the displayed
+ cones.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the z coordinates of the vector field and of the displayed
+ cones.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ anchor
+ Sets the cones' anchor with respect to their x/y/z
+ positions. Note that "cm" denote the cone's center of
+ mass which corresponds to 1/4 from the tail to tip.
+ 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
+ effect when `cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as u/v/w norm and if set, `cmax`
+ must be set as well.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.cone.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: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.cone.Hoverlabel` instance
+ or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `norm` Anything contained in
+ tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ lighting
+ :class:`plotly.graph_objects.cone.Lighting` instance or
+ dict with compatible properties
+ lightposition
+ :class:`plotly.graph_objects.cone.Lightposition`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the surface. Please note that in
+ the case of using high `opacity` values for example a
+ value greater than or equal to 0.5 on two surfaces (and
+ 0.25 with four surfaces), an overlay of multiple
+ transparent surfaces may not perfectly be sorted in
+ depth by the webgl API. This behavior may be improved
+ in the near future and is subject to change.
+ 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.
+ scene
+ Sets a reference between this trace's 3D coordinate
+ system and a 3D scene. If "scene" (the default value),
+ the (x,y,z) coordinates refer to `layout.scene`. If
+ "scene2", the (x,y,z) coordinates refer to
+ `layout.scene2`, and so on.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ sizemode
+ Determines whether `sizeref` is set as a "scaled" (i.e
+ unitless) scalar (normalized by the max u/v/w norm in
+ the vector field) or as "absolute" value (in the same
+ units as the vector field).
+ sizeref
+ Adjusts the cone size scaling. The size of the cones is
+ determined by their u/v/w norm multiplied a factor and
+ `sizeref`. This factor (computed internally)
+ corresponds to the minimum "time" to travel across two
+ successive x/y/z positions at the average velocity of
+ those two successive positions. All cones in a given
+ trace use the same factor. With `sizemode` set to
+ "scaled", `sizeref` is unitless, its default value is
+ 0.5 With `sizemode` set to "absolute", `sizeref` has
+ the same units as the u/v/w vector field, its the
+ default value is half the sample's maximum vector norm.
+ stream
+ :class:`plotly.graph_objects.cone.Stream` instance or
+ dict with compatible properties
+ text
+ Sets the text elements associated with the cones. If
+ trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ u
+ Sets the x components of the vector field.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ usrc
+ Sets the source reference on Chart Studio Cloud for u
+ .
+ v
+ Sets the y components of the vector field.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ vsrc
+ Sets the source reference on Chart Studio Cloud for v
+ .
+ w
+ Sets the z components of the vector field.
+ wsrc
+ Sets the source reference on Chart Studio Cloud for w
+ .
+ x
+ Sets the x coordinates of the vector field and of the
+ displayed cones.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates of the vector field and of the
+ displayed cones.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ z
+ Sets the z coordinates of the vector field and of the
+ displayed cones.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ anchor=None,
+ autocolorscale=None,
+ cauto=None,
+ cmax=None,
+ cmid=None,
+ cmin=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ customdata=None,
+ customdatasrc=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ lighting=None,
+ lightposition=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ reversescale=None,
+ scene=None,
+ showlegend=None,
+ showscale=None,
+ sizemode=None,
+ sizeref=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ u=None,
+ uid=None,
+ uirevision=None,
+ usrc=None,
+ v=None,
+ visible=None,
+ vsrc=None,
+ w=None,
+ wsrc=None,
+ x=None,
+ xsrc=None,
+ y=None,
+ ysrc=None,
+ z=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Cone object
+
+ Use cone traces to visualize vector fields. Specify a vector
+ field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and
+ 3 vector component arrays `u`, `v`, `w`. The cones are drawn
+ exactly at the positions given by `x`, `y` and `z`.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Cone`
+ anchor
+ Sets the cones' anchor with respect to their x/y/z
+ positions. Note that "cm" denote the cone's center of
+ mass which corresponds to 1/4 from the tail to tip.
+ 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 u/v/w norm) 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 u/v/w norm 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 u/v/w norm. Has no
+ effect when `cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as u/v/w norm and if set, `cmax`
+ must be set as well.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.cone.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: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.cone.Hoverlabel` instance
+ or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `norm` Anything contained in
+ tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ lighting
+ :class:`plotly.graph_objects.cone.Lighting` instance or
+ dict with compatible properties
+ lightposition
+ :class:`plotly.graph_objects.cone.Lightposition`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the surface. Please note that in
+ the case of using high `opacity` values for example a
+ value greater than or equal to 0.5 on two surfaces (and
+ 0.25 with four surfaces), an overlay of multiple
+ transparent surfaces may not perfectly be sorted in
+ depth by the webgl API. This behavior may be improved
+ in the near future and is subject to change.
+ 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.
+ scene
+ Sets a reference between this trace's 3D coordinate
+ system and a 3D scene. If "scene" (the default value),
+ the (x,y,z) coordinates refer to `layout.scene`. If
+ "scene2", the (x,y,z) coordinates refer to
+ `layout.scene2`, and so on.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ sizemode
+ Determines whether `sizeref` is set as a "scaled" (i.e
+ unitless) scalar (normalized by the max u/v/w norm in
+ the vector field) or as "absolute" value (in the same
+ units as the vector field).
+ sizeref
+ Adjusts the cone size scaling. The size of the cones is
+ determined by their u/v/w norm multiplied a factor and
+ `sizeref`. This factor (computed internally)
+ corresponds to the minimum "time" to travel across two
+ successive x/y/z positions at the average velocity of
+ those two successive positions. All cones in a given
+ trace use the same factor. With `sizemode` set to
+ "scaled", `sizeref` is unitless, its default value is
+ 0.5 With `sizemode` set to "absolute", `sizeref` has
+ the same units as the u/v/w vector field, its the
+ default value is half the sample's maximum vector norm.
+ stream
+ :class:`plotly.graph_objects.cone.Stream` instance or
+ dict with compatible properties
+ text
+ Sets the text elements associated with the cones. If
+ trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ u
+ Sets the x components of the vector field.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ usrc
+ Sets the source reference on Chart Studio Cloud for u
+ .
+ v
+ Sets the y components of the vector field.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ vsrc
+ Sets the source reference on Chart Studio Cloud for v
+ .
+ w
+ Sets the z components of the vector field.
+ wsrc
+ Sets the source reference on Chart Studio Cloud for w
+ .
+ x
+ Sets the x coordinates of the vector field and of the
+ displayed cones.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates of the vector field and of the
+ displayed cones.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ z
+ Sets the z coordinates of the vector field and of the
+ displayed cones.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Cone
+ """
+ super(Cone, self).__init__("cone")
+
+ 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.Cone
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Cone`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("anchor", None)
+ _v = anchor if anchor is not None else _v
+ if _v is not None:
+ self["anchor"] = _v
+ _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("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("lighting", None)
+ _v = lighting if lighting is not None else _v
+ if _v is not None:
+ self["lighting"] = _v
+ _v = arg.pop("lightposition", None)
+ _v = lightposition if lightposition is not None else _v
+ if _v is not None:
+ self["lightposition"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _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("scene", None)
+ _v = scene if scene is not None else _v
+ if _v is not None:
+ self["scene"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("sizemode", None)
+ _v = sizemode if sizemode is not None else _v
+ if _v is not None:
+ self["sizemode"] = _v
+ _v = arg.pop("sizeref", None)
+ _v = sizeref if sizeref is not None else _v
+ if _v is not None:
+ self["sizeref"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("u", None)
+ _v = u if u is not None else _v
+ if _v is not None:
+ self["u"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("usrc", None)
+ _v = usrc if usrc is not None else _v
+ if _v is not None:
+ self["usrc"] = _v
+ _v = arg.pop("v", None)
+ _v = v if v is not None else _v
+ if _v is not None:
+ self["v"] = _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("vsrc", None)
+ _v = vsrc if vsrc is not None else _v
+ if _v is not None:
+ self["vsrc"] = _v
+ _v = arg.pop("w", None)
+ _v = w if w is not None else _v
+ if _v is not None:
+ self["w"] = _v
+ _v = arg.pop("wsrc", None)
+ _v = wsrc if wsrc is not None else _v
+ if _v is not None:
+ self["wsrc"] = _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("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "cone"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_contour.py b/packages/python/plotly/plotly/graph_objs/_contour.py
new file mode 100644
index 00000000000..41a55d3a193
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_contour.py
@@ -0,0 +1,2695 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Contour(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "contour"
+ _valid_props = {
+ "autocolorscale",
+ "autocontour",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "connectgaps",
+ "contours",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "fillcolor",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hoverongaps",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "line",
+ "meta",
+ "metasrc",
+ "name",
+ "ncontours",
+ "opacity",
+ "reversescale",
+ "showlegend",
+ "showscale",
+ "stream",
+ "text",
+ "textsrc",
+ "transpose",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "x",
+ "x0",
+ "xaxis",
+ "xcalendar",
+ "xsrc",
+ "xtype",
+ "y",
+ "y0",
+ "yaxis",
+ "ycalendar",
+ "ysrc",
+ "ytype",
+ "z",
+ "zauto",
+ "zhoverformat",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # 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
+
+ # autocontour
+ # -----------
+ @property
+ def autocontour(self):
+ """
+ Determines whether or not the contour level attributes are
+ picked by an algorithm. If True, the number of contour levels
+ can be set in `ncontours`. If False, set the contour level
+ attributes in `contours`.
+
+ The 'autocontour' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autocontour"]
+
+ @autocontour.setter
+ def autocontour(self, val):
+ self["autocontour"] = val
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.contour.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.contour
+ .colorbar.Tickformatstop` instances or dicts
+ with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.contour.colorbar.tickformatstopdefaults),
+ sets the default property values to use for
+ elements of contour.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.contour.colorbar.T
+ itle` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ contour.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
+ contour.colorbar.title.side instead. Determines
+ the location of color bar's title with respect
+ to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.contour.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # connectgaps
+ # -----------
+ @property
+ def connectgaps(self):
+ """
+ Determines whether or not gaps (i.e. {nan} or missing values)
+ in the `z` data are filled in. It is defaulted to true if `z`
+ is a one dimensional array otherwise it is defaulted to false.
+
+ The 'connectgaps' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["connectgaps"]
+
+ @connectgaps.setter
+ def connectgaps(self, val):
+ self["connectgaps"] = val
+
+ # contours
+ # --------
+ @property
+ def contours(self):
+ """
+ The 'contours' property is an instance of Contours
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.contour.Contours`
+ - A dict of string/value properties that will be passed
+ to the Contours constructor
+
+ Supported dict properties:
+
+ coloring
+ Determines the coloring method showing the
+ contour values. If "fill", coloring is done
+ evenly between each contour level If "heatmap",
+ a heatmap gradient coloring is applied 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-language which is very similar
+ to Python, see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#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
+ -------
+ plotly.graph_objs.contour.Contours
+ """
+ return self["contours"]
+
+ @contours.setter
+ def contours(self, val):
+ self["contours"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # fillcolor
+ # ---------
+ @property
+ def fillcolor(self):
+ """
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line color,
+ marker color, or marker line color, whichever is available.
+
+ 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
+ - A number that will be interpreted as a color
+ according to contour.colorscale
+
+ Returns
+ -------
+ str
+ """
+ return self["fillcolor"]
+
+ @fillcolor.setter
+ def fillcolor(self, val):
+ self["fillcolor"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.contour.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.contour.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hoverongaps
+ # -----------
+ @property
+ def hoverongaps(self):
+ """
+ Determines whether or not gaps (i.e. {nan} or missing values)
+ in the `z` data have hover labels associated with them.
+
+ The 'hoverongaps' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["hoverongaps"]
+
+ @hoverongaps.setter
+ def hoverongaps(self, val):
+ self["hoverongaps"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # 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.contour.Line`
+ - A dict of string/value properties that will be passed
+ to the Line constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.contour.Line
+ """
+ return self["line"]
+
+ @line.setter
+ def line(self, val):
+ self["line"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # ncontours
+ # ---------
+ @property
+ def ncontours(self):
+ """
+ Sets the maximum number of contour levels. The actual number of
+ contours will be chosen automatically to be less than or equal
+ to the value of `ncontours`. Has an effect only if
+ `autocontour` is True or if `contours.size` is missing.
+
+ The 'ncontours' 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["ncontours"]
+
+ @ncontours.setter
+ def ncontours(self, val):
+ self["ncontours"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.contour.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.contour.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each z value.
+
+ The 'text' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # transpose
+ # ---------
+ @property
+ def transpose(self):
+ """
+ Transposes the z data.
+
+ The 'transpose' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["transpose"]
+
+ @transpose.setter
+ def transpose(self, val):
+ self["transpose"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # xtype
+ # -----
+ @property
+ def xtype(self):
+ """
+ If "array", the heatmap's x coordinates are given by "x" (the
+ default behavior when `x` is provided). If "scaled", the
+ heatmap's x coordinates are given by "x0" and "dx" (the default
+ behavior when `x` is not provided).
+
+ The 'xtype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xtype"]
+
+ @xtype.setter
+ def xtype(self, val):
+ self["xtype"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ycalendar
+ # ---------
+ @property
+ def ycalendar(self):
+ """
+ Sets the calendar system to use with `y` date data.
+
+ The 'ycalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ycalendar"]
+
+ @ycalendar.setter
+ def ycalendar(self, val):
+ self["ycalendar"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # ytype
+ # -----
+ @property
+ def ytype(self):
+ """
+ If "array", the heatmap's y coordinates are given by "y" (the
+ default behavior when `y` is provided) If "scaled", the
+ heatmap's y coordinates are given by "y0" and "dy" (the default
+ behavior when `y` is not provided)
+
+ The 'ytype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ytype"]
+
+ @ytype.setter
+ def ytype(self, val):
+ self["ytype"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the z data.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zhoverformat
+ # ------------
+ @property
+ def zhoverformat(self):
+ """
+ Sets the hover text formatting rule using d3 formatting mini-
+ languages which are very similar to those in Python. See:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+
+ The 'zhoverformat' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["zhoverformat"]
+
+ @zhoverformat.setter
+ def zhoverformat(self, val):
+ self["zhoverformat"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ autocontour
+ Determines whether or not the contour level attributes
+ are picked by an algorithm. If True, the number of
+ contour levels can be set in `ncontours`. If False, set
+ the contour level attributes in `contours`.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.contour.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ connectgaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data are filled in. It is defaulted
+ to true if `z` is a one dimensional array otherwise it
+ is defaulted to false.
+ contours
+ :class:`plotly.graph_objects.contour.Contours` instance
+ or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ fillcolor
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line
+ color, marker color, or marker line color, whichever is
+ available.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.contour.Hoverlabel`
+ instance or dict with compatible properties
+ hoverongaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data have hover labels associated
+ with them.
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.contour.Line` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ ncontours
+ Sets the maximum number of contour levels. The actual
+ number of contours will be chosen automatically to be
+ less than or equal to the value of `ncontours`. Has an
+ effect only if `autocontour` is True or if
+ `contours.size` is missing.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.contour.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zhoverformat
+ Sets the hover text formatting rule using d3 formatting
+ mini-languages which are very similar to those in
+ Python. See: https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ autocontour=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ connectgaps=None,
+ contours=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ fillcolor=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hoverongaps=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ line=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ ncontours=None,
+ opacity=None,
+ reversescale=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ transpose=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xcalendar=None,
+ xsrc=None,
+ xtype=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ycalendar=None,
+ ysrc=None,
+ ytype=None,
+ z=None,
+ zauto=None,
+ zhoverformat=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Contour object
+
+ The data from which contour lines are computed is set in `z`.
+ Data in `z` must be a 2D list of numbers. Say that `z` has N
+ rows and M columns, then by default, these N rows correspond to
+ N y coordinates (set in `y` or auto-generated) and the M
+ columns correspond to M x coordinates (set in `x` or auto-
+ generated). By setting `transpose` to True, the above behavior
+ is flipped.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Contour`
+ 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.
+ autocontour
+ Determines whether or not the contour level attributes
+ are picked by an algorithm. If True, the number of
+ contour levels can be set in `ncontours`. If False, set
+ the contour level attributes in `contours`.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.contour.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ connectgaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data are filled in. It is defaulted
+ to true if `z` is a one dimensional array otherwise it
+ is defaulted to false.
+ contours
+ :class:`plotly.graph_objects.contour.Contours` instance
+ or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ fillcolor
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line
+ color, marker color, or marker line color, whichever is
+ available.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.contour.Hoverlabel`
+ instance or dict with compatible properties
+ hoverongaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data have hover labels associated
+ with them.
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.contour.Line` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ ncontours
+ Sets the maximum number of contour levels. The actual
+ number of contours will be chosen automatically to be
+ less than or equal to the value of `ncontours`. Has an
+ effect only if `autocontour` is True or if
+ `contours.size` is missing.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.contour.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zhoverformat
+ Sets the hover text formatting rule using d3 formatting
+ mini-languages which are very similar to those in
+ Python. See: https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Contour
+ """
+ super(Contour, self).__init__("contour")
+
+ 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.Contour
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Contour`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("autocontour", None)
+ _v = autocontour if autocontour is not None else _v
+ if _v is not None:
+ self["autocontour"] = _v
+ _v = arg.pop("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("connectgaps", None)
+ _v = connectgaps if connectgaps is not None else _v
+ if _v is not None:
+ self["connectgaps"] = _v
+ _v = arg.pop("contours", None)
+ _v = contours if contours is not None else _v
+ if _v is not None:
+ self["contours"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _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("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hoverongaps", None)
+ _v = hoverongaps if hoverongaps is not None else _v
+ if _v is not None:
+ self["hoverongaps"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _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("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("ncontours", None)
+ _v = ncontours if ncontours is not None else _v
+ if _v is not None:
+ self["ncontours"] = _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("reversescale", None)
+ _v = reversescale if reversescale is not None else _v
+ if _v is not None:
+ self["reversescale"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("transpose", None)
+ _v = transpose if transpose is not None else _v
+ if _v is not None:
+ self["transpose"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("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("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _v
+ _v = arg.pop("xtype", None)
+ _v = xtype if xtype is not None else _v
+ if _v is not None:
+ self["xtype"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ycalendar", None)
+ _v = ycalendar if ycalendar is not None else _v
+ if _v is not None:
+ self["ycalendar"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+ _v = arg.pop("ytype", None)
+ _v = ytype if ytype is not None else _v
+ if _v is not None:
+ self["ytype"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zhoverformat", None)
+ _v = zhoverformat if zhoverformat is not None else _v
+ if _v is not None:
+ self["zhoverformat"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "contour"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_contourcarpet.py b/packages/python/plotly/plotly/graph_objs/_contourcarpet.py
new file mode 100644
index 00000000000..11469fdec12
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_contourcarpet.py
@@ -0,0 +1,2271 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Contourcarpet(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "contourcarpet"
+ _valid_props = {
+ "a",
+ "a0",
+ "asrc",
+ "atype",
+ "autocolorscale",
+ "autocontour",
+ "b",
+ "b0",
+ "bsrc",
+ "btype",
+ "carpet",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "contours",
+ "customdata",
+ "customdatasrc",
+ "da",
+ "db",
+ "fillcolor",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "line",
+ "meta",
+ "metasrc",
+ "name",
+ "ncontours",
+ "opacity",
+ "reversescale",
+ "showlegend",
+ "showscale",
+ "stream",
+ "text",
+ "textsrc",
+ "transpose",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "xaxis",
+ "yaxis",
+ "z",
+ "zauto",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # a
+ # -
+ @property
+ def a(self):
+ """
+ Sets the x coordinates.
+
+ The 'a' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["a"]
+
+ @a.setter
+ def a(self, val):
+ self["a"] = val
+
+ # a0
+ # --
+ @property
+ def a0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'a0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["a0"]
+
+ @a0.setter
+ def a0(self, val):
+ self["a0"] = val
+
+ # asrc
+ # ----
+ @property
+ def asrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for a .
+
+ The 'asrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["asrc"]
+
+ @asrc.setter
+ def asrc(self, val):
+ self["asrc"] = val
+
+ # atype
+ # -----
+ @property
+ def atype(self):
+ """
+ If "array", the heatmap's x coordinates are given by "x" (the
+ default behavior when `x` is provided). If "scaled", the
+ heatmap's x coordinates are given by "x0" and "dx" (the default
+ behavior when `x` is not provided).
+
+ The 'atype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["atype"]
+
+ @atype.setter
+ def atype(self, val):
+ self["atype"] = val
+
+ # 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
+
+ # autocontour
+ # -----------
+ @property
+ def autocontour(self):
+ """
+ Determines whether or not the contour level attributes are
+ picked by an algorithm. If True, the number of contour levels
+ can be set in `ncontours`. If False, set the contour level
+ attributes in `contours`.
+
+ The 'autocontour' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autocontour"]
+
+ @autocontour.setter
+ def autocontour(self, val):
+ self["autocontour"] = val
+
+ # b
+ # -
+ @property
+ def b(self):
+ """
+ Sets the y coordinates.
+
+ The 'b' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["b"]
+
+ @b.setter
+ def b(self, val):
+ self["b"] = val
+
+ # b0
+ # --
+ @property
+ def b0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'b0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["b0"]
+
+ @b0.setter
+ def b0(self, val):
+ self["b0"] = val
+
+ # bsrc
+ # ----
+ @property
+ def bsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for b .
+
+ The 'bsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["bsrc"]
+
+ @bsrc.setter
+ def bsrc(self, val):
+ self["bsrc"] = val
+
+ # btype
+ # -----
+ @property
+ def btype(self):
+ """
+ If "array", the heatmap's y coordinates are given by "y" (the
+ default behavior when `y` is provided) If "scaled", the
+ heatmap's y coordinates are given by "y0" and "dy" (the default
+ behavior when `y` is not provided)
+
+ The 'btype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["btype"]
+
+ @btype.setter
+ def btype(self, val):
+ self["btype"] = val
+
+ # carpet
+ # ------
+ @property
+ def carpet(self):
+ """
+ The `carpet` of the carpet axes on which this contour trace
+ lies
+
+ The 'carpet' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["carpet"]
+
+ @carpet.setter
+ def carpet(self, val):
+ self["carpet"] = val
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.contourcarpet.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.contour
+ carpet.colorbar.Tickformatstop` instances or
+ dicts with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.contourcarpet.colorbar.tickformatstopdefaults
+ ), sets the default property values to use for
+ elements of
+ contourcarpet.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.contourcarpet.colo
+ rbar.Title` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ contourcarpet.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
+ contourcarpet.colorbar.title.side instead.
+ Determines the location of color bar's title
+ with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.contourcarpet.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # contours
+ # --------
+ @property
+ def contours(self):
+ """
+ The 'contours' property is an instance of Contours
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.contourcarpet.Contours`
+ - A dict of string/value properties that will be passed
+ to the Contours constructor
+
+ Supported dict properties:
+
+ 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-language which is very similar
+ to Python, see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#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
+ -------
+ plotly.graph_objs.contourcarpet.Contours
+ """
+ return self["contours"]
+
+ @contours.setter
+ def contours(self, val):
+ self["contours"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # da
+ # --
+ @property
+ def da(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'da' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["da"]
+
+ @da.setter
+ def da(self, val):
+ self["da"] = val
+
+ # db
+ # --
+ @property
+ def db(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'db' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["db"]
+
+ @db.setter
+ def db(self, val):
+ self["db"] = val
+
+ # fillcolor
+ # ---------
+ @property
+ def fillcolor(self):
+ """
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line color,
+ marker color, or marker line color, whichever is available.
+
+ 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
+ - A number that will be interpreted as a color
+ according to contourcarpet.colorscale
+
+ Returns
+ -------
+ str
+ """
+ return self["fillcolor"]
+
+ @fillcolor.setter
+ def fillcolor(self, val):
+ self["fillcolor"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # 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.contourcarpet.Line`
+ - A dict of string/value properties that will be passed
+ to the Line constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.contourcarpet.Line
+ """
+ return self["line"]
+
+ @line.setter
+ def line(self, val):
+ self["line"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # ncontours
+ # ---------
+ @property
+ def ncontours(self):
+ """
+ Sets the maximum number of contour levels. The actual number of
+ contours will be chosen automatically to be less than or equal
+ to the value of `ncontours`. Has an effect only if
+ `autocontour` is True or if `contours.size` is missing.
+
+ The 'ncontours' 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["ncontours"]
+
+ @ncontours.setter
+ def ncontours(self, val):
+ self["ncontours"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.contourcarpet.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.contourcarpet.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each z value.
+
+ The 'text' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # transpose
+ # ---------
+ @property
+ def transpose(self):
+ """
+ Transposes the z data.
+
+ The 'transpose' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["transpose"]
+
+ @transpose.setter
+ def transpose(self, val):
+ self["transpose"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the z data.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ a
+ Sets the x coordinates.
+ a0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ asrc
+ Sets the source reference on Chart Studio Cloud for a
+ .
+ atype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ 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.
+ autocontour
+ Determines whether or not the contour level attributes
+ are picked by an algorithm. If True, the number of
+ contour levels can be set in `ncontours`. If False, set
+ the contour level attributes in `contours`.
+ b
+ Sets the y coordinates.
+ b0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ bsrc
+ Sets the source reference on Chart Studio Cloud for b
+ .
+ btype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ carpet
+ The `carpet` of the carpet axes on which this contour
+ trace lies
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.contourcarpet.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ contours
+ :class:`plotly.graph_objects.contourcarpet.Contours`
+ instance or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ da
+ Sets the x coordinate step. See `x0` for more info.
+ db
+ Sets the y coordinate step. See `y0` for more info.
+ fillcolor
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line
+ color, marker color, or marker line color, whichever is
+ available.
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.contourcarpet.Line`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ ncontours
+ Sets the maximum number of contour levels. The actual
+ number of contours will be chosen automatically to be
+ less than or equal to the value of `ncontours`. Has an
+ effect only if `autocontour` is True or if
+ `contours.size` is missing.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.contourcarpet.Stream`
+ instance or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ a=None,
+ a0=None,
+ asrc=None,
+ atype=None,
+ autocolorscale=None,
+ autocontour=None,
+ b=None,
+ b0=None,
+ bsrc=None,
+ btype=None,
+ carpet=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ contours=None,
+ customdata=None,
+ customdatasrc=None,
+ da=None,
+ db=None,
+ fillcolor=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ line=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ ncontours=None,
+ opacity=None,
+ reversescale=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ transpose=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ xaxis=None,
+ yaxis=None,
+ z=None,
+ zauto=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Contourcarpet object
+
+ Plots contours on either the first carpet axis or the carpet
+ axis with a matching `carpet` attribute. Data `z` is
+ interpreted as matching that of the corresponding carpet axis.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Contourcarpet`
+ a
+ Sets the x coordinates.
+ a0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ asrc
+ Sets the source reference on Chart Studio Cloud for a
+ .
+ atype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ 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.
+ autocontour
+ Determines whether or not the contour level attributes
+ are picked by an algorithm. If True, the number of
+ contour levels can be set in `ncontours`. If False, set
+ the contour level attributes in `contours`.
+ b
+ Sets the y coordinates.
+ b0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ bsrc
+ Sets the source reference on Chart Studio Cloud for b
+ .
+ btype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ carpet
+ The `carpet` of the carpet axes on which this contour
+ trace lies
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.contourcarpet.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ contours
+ :class:`plotly.graph_objects.contourcarpet.Contours`
+ instance or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ da
+ Sets the x coordinate step. See `x0` for more info.
+ db
+ Sets the y coordinate step. See `y0` for more info.
+ fillcolor
+ Sets the fill color if `contours.type` is "constraint".
+ Defaults to a half-transparent variant of the line
+ color, marker color, or marker line color, whichever is
+ available.
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ line
+ :class:`plotly.graph_objects.contourcarpet.Line`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ ncontours
+ Sets the maximum number of contour levels. The actual
+ number of contours will be chosen automatically to be
+ less than or equal to the value of `ncontours`. Has an
+ effect only if `autocontour` is True or if
+ `contours.size` is missing.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.contourcarpet.Stream`
+ instance or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Contourcarpet
+ """
+ super(Contourcarpet, self).__init__("contourcarpet")
+
+ 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
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Contourcarpet`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("a", None)
+ _v = a if a is not None else _v
+ if _v is not None:
+ self["a"] = _v
+ _v = arg.pop("a0", None)
+ _v = a0 if a0 is not None else _v
+ if _v is not None:
+ self["a0"] = _v
+ _v = arg.pop("asrc", None)
+ _v = asrc if asrc is not None else _v
+ if _v is not None:
+ self["asrc"] = _v
+ _v = arg.pop("atype", None)
+ _v = atype if atype is not None else _v
+ if _v is not None:
+ self["atype"] = _v
+ _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("autocontour", None)
+ _v = autocontour if autocontour is not None else _v
+ if _v is not None:
+ self["autocontour"] = _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("b0", None)
+ _v = b0 if b0 is not None else _v
+ if _v is not None:
+ self["b0"] = _v
+ _v = arg.pop("bsrc", None)
+ _v = bsrc if bsrc is not None else _v
+ if _v is not None:
+ self["bsrc"] = _v
+ _v = arg.pop("btype", None)
+ _v = btype if btype is not None else _v
+ if _v is not None:
+ self["btype"] = _v
+ _v = arg.pop("carpet", None)
+ _v = carpet if carpet is not None else _v
+ if _v is not None:
+ self["carpet"] = _v
+ _v = arg.pop("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("contours", None)
+ _v = contours if contours is not None else _v
+ if _v is not None:
+ self["contours"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("da", None)
+ _v = da if da is not None else _v
+ if _v is not None:
+ self["da"] = _v
+ _v = arg.pop("db", None)
+ _v = db if db is not None else _v
+ if _v is not None:
+ self["db"] = _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("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _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("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("ncontours", None)
+ _v = ncontours if ncontours is not None else _v
+ if _v is not None:
+ self["ncontours"] = _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("reversescale", None)
+ _v = reversescale if reversescale is not None else _v
+ if _v is not None:
+ self["reversescale"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("transpose", None)
+ _v = transpose if transpose is not None else _v
+ if _v is not None:
+ self["transpose"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "contourcarpet"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_densitymapbox.py b/packages/python/plotly/plotly/graph_objs/_densitymapbox.py
new file mode 100644
index 00000000000..f99061d2275
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_densitymapbox.py
@@ -0,0 +1,2065 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Densitymapbox(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "densitymapbox"
+ _valid_props = {
+ "autocolorscale",
+ "below",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "lat",
+ "latsrc",
+ "legendgroup",
+ "lon",
+ "lonsrc",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "radius",
+ "radiussrc",
+ "reversescale",
+ "showlegend",
+ "showscale",
+ "stream",
+ "subplot",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "z",
+ "zauto",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # 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
+
+ # below
+ # -----
+ @property
+ def below(self):
+ """
+ Determines if the densitymapbox trace will be inserted before
+ the layer with the specified ID. By default, densitymapbox
+ traces are placed below the first layer of type symbol If 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.densitymapbox.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.density
+ mapbox.colorbar.Tickformatstop` instances or
+ dicts with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.densitymapbox.colorbar.tickformatstopdefaults
+ ), sets the default property values to use for
+ elements of
+ densitymapbox.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.densitymapbox.colo
+ rbar.Title` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ densitymapbox.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
+ densitymapbox.colorbar.title.side instead.
+ Determines the location of color bar's title
+ with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.densitymapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'lon+lat')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.densitymapbox.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Sets hover text elements associated with each (lon,lat) pair If
+ a single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ the this trace's (lon,lat) coordinates. To be seen, trace
+ `hoverinfo` must contain a "text" flag.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # lat
+ # ---
+ @property
+ def lat(self):
+ """
+ Sets the latitude coordinates (in degrees North).
+
+ The 'lat' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["lat"]
+
+ @lat.setter
+ def lat(self, val):
+ self["lat"] = val
+
+ # latsrc
+ # ------
+ @property
+ def latsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for lat .
+
+ The 'latsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["latsrc"]
+
+ @latsrc.setter
+ def latsrc(self, val):
+ self["latsrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # lon
+ # ---
+ @property
+ def lon(self):
+ """
+ Sets the longitude coordinates (in degrees East).
+
+ The 'lon' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["lon"]
+
+ @lon.setter
+ def lon(self, val):
+ self["lon"] = val
+
+ # lonsrc
+ # ------
+ @property
+ def lonsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for lon .
+
+ The 'lonsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["lonsrc"]
+
+ @lonsrc.setter
+ def lonsrc(self, val):
+ self["lonsrc"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # radius
+ # ------
+ @property
+ def radius(self):
+ """
+ Sets the radius of influence of one `lon` / `lat` point in
+ pixels. Increasing the value makes the densitymapbox trace
+ smoother, but less detailed.
+
+ The 'radius' property is a number and may be specified as:
+ - An int or float in the interval [1, inf]
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ int|float|numpy.ndarray
+ """
+ return self["radius"]
+
+ @radius.setter
+ def radius(self, val):
+ self["radius"] = val
+
+ # radiussrc
+ # ---------
+ @property
+ def radiussrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for radius .
+
+ The 'radiussrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["radiussrc"]
+
+ @radiussrc.setter
+ def radiussrc(self, val):
+ self["radiussrc"] = val
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.densitymapbox.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.densitymapbox.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # subplot
+ # -------
+ @property
+ def subplot(self):
+ """
+ Sets a reference between this trace's data coordinates and a
+ mapbox subplot. If "mapbox" (the default value), the data refer
+ to `layout.mapbox`. If "mapbox2", the data refer to
+ `layout.mapbox2`, and so on.
+
+ The 'subplot' property is an identifier of a particular
+ subplot, of type 'mapbox', that may be specified as the string 'mapbox'
+ optionally followed by an integer >= 1
+ (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["subplot"]
+
+ @subplot.setter
+ def subplot(self, val):
+ self["subplot"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets text elements associated with each (lon,lat) pair If a
+ single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ the this trace's (lon,lat) coordinates. If trace `hoverinfo`
+ contains a "text" flag and "hovertext" is not set, these
+ elements will be seen in the hover labels.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the points' weight. For example, a value of 10 would be
+ equivalent to having 10 points of weight 1 in the same spot
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ below
+ Determines if the densitymapbox trace will be inserted
+ before the layer with the specified ID. By default,
+ densitymapbox traces are placed below the first layer
+ of type symbol If set to '', the layer will be inserted
+ above every existing layer.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.densitymapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.densitymapbox.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (lon,lat)
+ pair If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (lon,lat)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ lat
+ Sets the latitude coordinates (in degrees North).
+ latsrc
+ Sets the source reference on Chart Studio Cloud for
+ lat .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ lon
+ Sets the longitude coordinates (in degrees East).
+ lonsrc
+ Sets the source reference on Chart Studio Cloud for
+ lon .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ radius
+ Sets the radius of influence of one `lon` / `lat` point
+ in pixels. Increasing the value makes the densitymapbox
+ trace smoother, but less detailed.
+ radiussrc
+ Sets the source reference on Chart Studio Cloud for
+ radius .
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.densitymapbox.Stream`
+ instance or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a mapbox subplot. If "mapbox" (the default value),
+ the data refer to `layout.mapbox`. If "mapbox2", the
+ data refer to `layout.mapbox2`, and so on.
+ text
+ Sets text elements associated with each (lon,lat) pair
+ If a single string, the same string appears over all
+ the data points. If an array of string, the items are
+ mapped in order to the this trace's (lon,lat)
+ coordinates. If trace `hoverinfo` contains a "text"
+ flag and "hovertext" is not set, these elements will be
+ seen in the hover labels.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the points' weight. For example, a value of 10
+ would be equivalent to having 10 points of weight 1 in
+ the same spot
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ below=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ customdata=None,
+ customdatasrc=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ lat=None,
+ latsrc=None,
+ legendgroup=None,
+ lon=None,
+ lonsrc=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ radius=None,
+ radiussrc=None,
+ reversescale=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ subplot=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ z=None,
+ zauto=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Densitymapbox object
+
+ Draws a bivariate kernel density estimation with a Gaussian
+ kernel from `lon` and `lat` coordinates and optional `z` values
+ using a colorscale.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Densitymapbox`
+ 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.
+ below
+ Determines if the densitymapbox trace will be inserted
+ before the layer with the specified ID. By default,
+ densitymapbox traces are placed below the first layer
+ of type symbol If set to '', the layer will be inserted
+ above every existing layer.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.densitymapbox.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.densitymapbox.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (lon,lat)
+ pair If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (lon,lat)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ lat
+ Sets the latitude coordinates (in degrees North).
+ latsrc
+ Sets the source reference on Chart Studio Cloud for
+ lat .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ lon
+ Sets the longitude coordinates (in degrees East).
+ lonsrc
+ Sets the source reference on Chart Studio Cloud for
+ lon .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ radius
+ Sets the radius of influence of one `lon` / `lat` point
+ in pixels. Increasing the value makes the densitymapbox
+ trace smoother, but less detailed.
+ radiussrc
+ Sets the source reference on Chart Studio Cloud for
+ radius .
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.densitymapbox.Stream`
+ instance or dict with compatible properties
+ subplot
+ Sets a reference between this trace's data coordinates
+ and a mapbox subplot. If "mapbox" (the default value),
+ the data refer to `layout.mapbox`. If "mapbox2", the
+ data refer to `layout.mapbox2`, and so on.
+ text
+ Sets text elements associated with each (lon,lat) pair
+ If a single string, the same string appears over all
+ the data points. If an array of string, the items are
+ mapped in order to the this trace's (lon,lat)
+ coordinates. If trace `hoverinfo` contains a "text"
+ flag and "hovertext" is not set, these elements will be
+ seen in the hover labels.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ z
+ Sets the points' weight. For example, a value of 10
+ would be equivalent to having 10 points of weight 1 in
+ the same spot
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Densitymapbox
+ """
+ super(Densitymapbox, self).__init__("densitymapbox")
+
+ 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.Densitymapbox
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Densitymapbox`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("below", None)
+ _v = below if below is not None else _v
+ if _v is not None:
+ self["below"] = _v
+ _v = arg.pop("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("lat", None)
+ _v = lat if lat is not None else _v
+ if _v is not None:
+ self["lat"] = _v
+ _v = arg.pop("latsrc", None)
+ _v = latsrc if latsrc is not None else _v
+ if _v is not None:
+ self["latsrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("lon", None)
+ _v = lon if lon is not None else _v
+ if _v is not None:
+ self["lon"] = _v
+ _v = arg.pop("lonsrc", None)
+ _v = lonsrc if lonsrc is not None else _v
+ if _v is not None:
+ self["lonsrc"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("radius", None)
+ _v = radius if radius is not None else _v
+ if _v is not None:
+ self["radius"] = _v
+ _v = arg.pop("radiussrc", None)
+ _v = radiussrc if radiussrc is not None else _v
+ if _v is not None:
+ self["radiussrc"] = _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("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("subplot", None)
+ _v = subplot if subplot is not None else _v
+ if _v is not None:
+ self["subplot"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "densitymapbox"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_figure.py b/packages/python/plotly/plotly/graph_objs/_figure.py
index 696a3eb0a9c..1491b97e4e4 100644
--- a/packages/python/plotly/plotly/graph_objs/_figure.py
+++ b/packages/python/plotly/plotly/graph_objs/_figure.py
@@ -1,54 +1,4 @@
from plotly.basedatatypes import BaseFigure
-from plotly.graph_objs import (
- Area,
- Bar,
- Barpolar,
- Box,
- Candlestick,
- Carpet,
- Choropleth,
- Choroplethmapbox,
- Cone,
- Contour,
- Contourcarpet,
- Densitymapbox,
- Funnel,
- Funnelarea,
- Heatmap,
- Heatmapgl,
- Histogram,
- Histogram2d,
- Histogram2dContour,
- Image,
- Indicator,
- Isosurface,
- Mesh3d,
- Ohlc,
- Parcats,
- Parcoords,
- Pie,
- Pointcloud,
- Sankey,
- Scatter,
- Scatter3d,
- Scattercarpet,
- Scattergeo,
- Scattergl,
- Scattermapbox,
- Scatterpolar,
- Scatterpolargl,
- Scatterternary,
- Splom,
- Streamtube,
- Sunburst,
- Surface,
- Table,
- Treemap,
- Violin,
- Volume,
- Waterfall,
- layout as _layout,
-)
class Figure(BaseFigure):
@@ -774,6 +724,8 @@ def add_area(
-------
Figure
"""
+ from plotly.graph_objs import Area
+
new_trace = Area(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -1199,6 +1151,8 @@ def add_bar(
-------
Figure
"""
+ from plotly.graph_objs import Bar
+
new_trace = Bar(
alignmentgroup=alignmentgroup,
base=base,
@@ -1528,6 +1482,8 @@ def add_barpolar(
-------
Figure
"""
+ from plotly.graph_objs import Barpolar
+
new_trace = Barpolar(
base=base,
basesrc=basesrc,
@@ -2046,6 +2002,8 @@ def add_box(
-------
Figure
"""
+ from plotly.graph_objs import Box
+
new_trace = Box(
alignmentgroup=alignmentgroup,
boxmean=boxmean,
@@ -2359,6 +2317,8 @@ def add_candlestick(
-------
Figure
"""
+ from plotly.graph_objs import Candlestick
+
new_trace = Candlestick(
close=close,
closesrc=closesrc,
@@ -2611,6 +2571,8 @@ def add_carpet(
-------
Figure
"""
+ from plotly.graph_objs import Carpet
+
new_trace = Carpet(
a=a,
a0=a0,
@@ -2944,6 +2906,8 @@ def add_choropleth(
-------
Figure
"""
+ from plotly.graph_objs import Choropleth
+
new_trace = Choropleth(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -3286,6 +3250,8 @@ def add_choroplethmapbox(
-------
Figure
"""
+ from plotly.graph_objs import Choroplethmapbox
+
new_trace = Choroplethmapbox(
autocolorscale=autocolorscale,
below=below,
@@ -3665,6 +3631,8 @@ def add_cone(
-------
Figure
"""
+ from plotly.graph_objs import Cone
+
new_trace = Cone(
anchor=anchor,
autocolorscale=autocolorscale,
@@ -4087,6 +4055,8 @@ def add_contour(
-------
Figure
"""
+ from plotly.graph_objs import Contour
+
new_trace = Contour(
autocolorscale=autocolorscale,
autocontour=autocontour,
@@ -4451,6 +4421,8 @@ def add_contourcarpet(
-------
Figure
"""
+ from plotly.graph_objs import Contourcarpet
+
new_trace = Contourcarpet(
a=a,
a0=a0,
@@ -4796,6 +4768,8 @@ def add_densitymapbox(
-------
Figure
"""
+ from plotly.graph_objs import Densitymapbox
+
new_trace = Densitymapbox(
autocolorscale=autocolorscale,
below=below,
@@ -5201,6 +5175,8 @@ def add_funnel(
-------
Figure
"""
+ from plotly.graph_objs import Funnel
+
new_trace = Funnel(
alignmentgroup=alignmentgroup,
cliponaxis=cliponaxis,
@@ -5533,6 +5509,8 @@ def add_funnelarea(
-------
Figure
"""
+ from plotly.graph_objs import Funnelarea
+
new_trace = Funnelarea(
aspectratio=aspectratio,
baseratio=baseratio,
@@ -5938,6 +5916,8 @@ def add_heatmap(
-------
Figure
"""
+ from plotly.graph_objs import Heatmap
+
new_trace = Heatmap(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -6265,6 +6245,8 @@ def add_heatmapgl(
-------
Figure
"""
+ from plotly.graph_objs import Heatmapgl
+
new_trace = Heatmapgl(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -6653,6 +6635,8 @@ def add_histogram(
-------
Figure
"""
+ from plotly.graph_objs import Histogram
+
new_trace = Histogram(
alignmentgroup=alignmentgroup,
autobinx=autobinx,
@@ -7087,6 +7071,8 @@ def add_histogram2d(
-------
Figure
"""
+ from plotly.graph_objs import Histogram2d
+
new_trace = Histogram2d(
autobinx=autobinx,
autobiny=autobiny,
@@ -7538,6 +7524,8 @@ def add_histogram2dcontour(
-------
Figure
"""
+ from plotly.graph_objs import Histogram2dContour
+
new_trace = Histogram2dContour(
autobinx=autobinx,
autobiny=autobiny,
@@ -7829,6 +7817,8 @@ def add_image(
-------
Figure
"""
+ from plotly.graph_objs import Image
+
new_trace = Image(
colormodel=colormodel,
customdata=customdata,
@@ -8007,6 +7997,8 @@ def add_indicator(
-------
Figure
"""
+ from plotly.graph_objs import Indicator
+
new_trace = Indicator(
align=align,
customdata=customdata,
@@ -8352,6 +8344,8 @@ def add_isosurface(
-------
Figure
"""
+ from plotly.graph_objs import Isosurface
+
new_trace = Isosurface(
autocolorscale=autocolorscale,
caps=caps,
@@ -8817,6 +8811,8 @@ def add_mesh3d(
-------
Figure
"""
+ from plotly.graph_objs import Mesh3d
+
new_trace = Mesh3d(
alphahull=alphahull,
autocolorscale=autocolorscale,
@@ -9122,6 +9118,8 @@ def add_ohlc(
-------
Figure
"""
+ from plotly.graph_objs import Ohlc
+
new_trace = Ohlc(
close=close,
closesrc=closesrc,
@@ -9340,6 +9338,8 @@ def add_parcats(
-------
Figure
"""
+ from plotly.graph_objs import Parcats
+
new_trace = Parcats(
arrangement=arrangement,
bundlecolors=bundlecolors,
@@ -9510,6 +9510,8 @@ def add_parcoords(
-------
Figure
"""
+ from plotly.graph_objs import Parcoords
+
new_trace = Parcoords(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -9856,6 +9858,8 @@ def add_pie(
-------
Figure
"""
+ from plotly.graph_objs import Pie
+
new_trace = Pie(
automargin=automargin,
customdata=customdata,
@@ -10138,6 +10142,8 @@ def add_pointcloud(
-------
Figure
"""
+ from plotly.graph_objs import Pointcloud
+
new_trace = Pointcloud(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -10337,6 +10343,8 @@ def add_sankey(
-------
Figure
"""
+ from plotly.graph_objs import Sankey
+
new_trace = Sankey(
arrangement=arrangement,
customdata=customdata,
@@ -10791,6 +10799,8 @@ def add_scatter(
-------
Figure
"""
+ from plotly.graph_objs import Scatter
+
new_trace = Scatter(
cliponaxis=cliponaxis,
connectgaps=connectgaps,
@@ -11156,6 +11166,8 @@ def add_scatter3d(
-------
Figure
"""
+ from plotly.graph_objs import Scatter3d
+
new_trace = Scatter3d(
connectgaps=connectgaps,
customdata=customdata,
@@ -11524,6 +11536,8 @@ def add_scattercarpet(
-------
Figure
"""
+ from plotly.graph_objs import Scattercarpet
+
new_trace = Scattercarpet(
a=a,
asrc=asrc,
@@ -11891,6 +11905,8 @@ def add_scattergeo(
-------
Figure
"""
+ from plotly.graph_objs import Scattergeo
+
new_trace = Scattergeo(
connectgaps=connectgaps,
customdata=customdata,
@@ -12285,6 +12301,8 @@ def add_scattergl(
-------
Figure
"""
+ from plotly.graph_objs import Scattergl
+
new_trace = Scattergl(
connectgaps=connectgaps,
customdata=customdata,
@@ -12626,6 +12644,8 @@ def add_scattermapbox(
-------
Figure
"""
+ from plotly.graph_objs import Scattermapbox
+
new_trace = Scattermapbox(
below=below,
connectgaps=connectgaps,
@@ -13001,6 +13021,8 @@ def add_scatterpolar(
-------
Figure
"""
+ from plotly.graph_objs import Scatterpolar
+
new_trace = Scatterpolar(
cliponaxis=cliponaxis,
connectgaps=connectgaps,
@@ -13380,6 +13402,8 @@ def add_scatterpolargl(
-------
Figure
"""
+ from plotly.graph_objs import Scatterpolargl
+
new_trace = Scatterpolargl(
connectgaps=connectgaps,
customdata=customdata,
@@ -13761,6 +13785,8 @@ def add_scatterternary(
-------
Figure
"""
+ from plotly.graph_objs import Scatterternary
+
new_trace = Scatterternary(
a=a,
asrc=asrc,
@@ -14053,6 +14079,8 @@ def add_splom(
-------
Figure
"""
+ from plotly.graph_objs import Splom
+
new_trace = Splom(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -14406,6 +14434,8 @@ def add_streamtube(
-------
Figure
"""
+ from plotly.graph_objs import Streamtube
+
new_trace = Streamtube(
autocolorscale=autocolorscale,
cauto=cauto,
@@ -14749,6 +14779,8 @@ def add_sunburst(
-------
Figure
"""
+ from plotly.graph_objs import Sunburst
+
new_trace = Sunburst(
branchvalues=branchvalues,
count=count,
@@ -15124,6 +15156,8 @@ def add_surface(
-------
Figure
"""
+ from plotly.graph_objs import Surface
+
new_trace = Surface(
autocolorscale=autocolorscale,
cauto=cauto,
@@ -15330,6 +15364,8 @@ def add_table(
-------
Figure
"""
+ from plotly.graph_objs import Table
+
new_trace = Table(
cells=cells,
columnorder=columnorder,
@@ -15642,6 +15678,8 @@ def add_treemap(
-------
Figure
"""
+ from plotly.graph_objs import Treemap
+
new_trace = Treemap(
branchvalues=branchvalues,
count=count,
@@ -16053,6 +16091,8 @@ def add_violin(
-------
Figure
"""
+ from plotly.graph_objs import Violin
+
new_trace = Violin(
alignmentgroup=alignmentgroup,
bandwidth=bandwidth,
@@ -16444,6 +16484,8 @@ def add_volume(
-------
Figure
"""
+ from plotly.graph_objs import Volume
+
new_trace = Volume(
autocolorscale=autocolorscale,
caps=caps,
@@ -16884,6 +16926,8 @@ def add_waterfall(
-------
Figure
"""
+ from plotly.graph_objs import Waterfall
+
new_trace = Waterfall(
alignmentgroup=alignmentgroup,
base=base,
@@ -18245,6 +18289,8 @@ def add_annotation(
-------
Figure
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Annotation(
arg,
align=align,
@@ -18552,6 +18598,8 @@ def add_layout_image(
-------
Figure
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Image(
arg,
layer=layer,
@@ -18889,6 +18937,8 @@ def add_shape(
-------
Figure
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Shape(
arg,
fillcolor=fillcolor,
diff --git a/packages/python/plotly/plotly/graph_objs/_figurewidget.py b/packages/python/plotly/plotly/graph_objs/_figurewidget.py
index cb41f9c981c..390a4629bc4 100644
--- a/packages/python/plotly/plotly/graph_objs/_figurewidget.py
+++ b/packages/python/plotly/plotly/graph_objs/_figurewidget.py
@@ -1,54 +1,4 @@
from plotly.basewidget import BaseFigureWidget
-from plotly.graph_objs import (
- Area,
- Bar,
- Barpolar,
- Box,
- Candlestick,
- Carpet,
- Choropleth,
- Choroplethmapbox,
- Cone,
- Contour,
- Contourcarpet,
- Densitymapbox,
- Funnel,
- Funnelarea,
- Heatmap,
- Heatmapgl,
- Histogram,
- Histogram2d,
- Histogram2dContour,
- Image,
- Indicator,
- Isosurface,
- Mesh3d,
- Ohlc,
- Parcats,
- Parcoords,
- Pie,
- Pointcloud,
- Sankey,
- Scatter,
- Scatter3d,
- Scattercarpet,
- Scattergeo,
- Scattergl,
- Scattermapbox,
- Scatterpolar,
- Scatterpolargl,
- Scatterternary,
- Splom,
- Streamtube,
- Sunburst,
- Surface,
- Table,
- Treemap,
- Violin,
- Volume,
- Waterfall,
- layout as _layout,
-)
class FigureWidget(BaseFigureWidget):
@@ -774,6 +724,8 @@ def add_area(
-------
FigureWidget
"""
+ from plotly.graph_objs import Area
+
new_trace = Area(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -1199,6 +1151,8 @@ def add_bar(
-------
FigureWidget
"""
+ from plotly.graph_objs import Bar
+
new_trace = Bar(
alignmentgroup=alignmentgroup,
base=base,
@@ -1528,6 +1482,8 @@ def add_barpolar(
-------
FigureWidget
"""
+ from plotly.graph_objs import Barpolar
+
new_trace = Barpolar(
base=base,
basesrc=basesrc,
@@ -2046,6 +2002,8 @@ def add_box(
-------
FigureWidget
"""
+ from plotly.graph_objs import Box
+
new_trace = Box(
alignmentgroup=alignmentgroup,
boxmean=boxmean,
@@ -2359,6 +2317,8 @@ def add_candlestick(
-------
FigureWidget
"""
+ from plotly.graph_objs import Candlestick
+
new_trace = Candlestick(
close=close,
closesrc=closesrc,
@@ -2611,6 +2571,8 @@ def add_carpet(
-------
FigureWidget
"""
+ from plotly.graph_objs import Carpet
+
new_trace = Carpet(
a=a,
a0=a0,
@@ -2944,6 +2906,8 @@ def add_choropleth(
-------
FigureWidget
"""
+ from plotly.graph_objs import Choropleth
+
new_trace = Choropleth(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -3286,6 +3250,8 @@ def add_choroplethmapbox(
-------
FigureWidget
"""
+ from plotly.graph_objs import Choroplethmapbox
+
new_trace = Choroplethmapbox(
autocolorscale=autocolorscale,
below=below,
@@ -3665,6 +3631,8 @@ def add_cone(
-------
FigureWidget
"""
+ from plotly.graph_objs import Cone
+
new_trace = Cone(
anchor=anchor,
autocolorscale=autocolorscale,
@@ -4087,6 +4055,8 @@ def add_contour(
-------
FigureWidget
"""
+ from plotly.graph_objs import Contour
+
new_trace = Contour(
autocolorscale=autocolorscale,
autocontour=autocontour,
@@ -4451,6 +4421,8 @@ def add_contourcarpet(
-------
FigureWidget
"""
+ from plotly.graph_objs import Contourcarpet
+
new_trace = Contourcarpet(
a=a,
a0=a0,
@@ -4796,6 +4768,8 @@ def add_densitymapbox(
-------
FigureWidget
"""
+ from plotly.graph_objs import Densitymapbox
+
new_trace = Densitymapbox(
autocolorscale=autocolorscale,
below=below,
@@ -5201,6 +5175,8 @@ def add_funnel(
-------
FigureWidget
"""
+ from plotly.graph_objs import Funnel
+
new_trace = Funnel(
alignmentgroup=alignmentgroup,
cliponaxis=cliponaxis,
@@ -5533,6 +5509,8 @@ def add_funnelarea(
-------
FigureWidget
"""
+ from plotly.graph_objs import Funnelarea
+
new_trace = Funnelarea(
aspectratio=aspectratio,
baseratio=baseratio,
@@ -5938,6 +5916,8 @@ def add_heatmap(
-------
FigureWidget
"""
+ from plotly.graph_objs import Heatmap
+
new_trace = Heatmap(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -6265,6 +6245,8 @@ def add_heatmapgl(
-------
FigureWidget
"""
+ from plotly.graph_objs import Heatmapgl
+
new_trace = Heatmapgl(
autocolorscale=autocolorscale,
coloraxis=coloraxis,
@@ -6653,6 +6635,8 @@ def add_histogram(
-------
FigureWidget
"""
+ from plotly.graph_objs import Histogram
+
new_trace = Histogram(
alignmentgroup=alignmentgroup,
autobinx=autobinx,
@@ -7087,6 +7071,8 @@ def add_histogram2d(
-------
FigureWidget
"""
+ from plotly.graph_objs import Histogram2d
+
new_trace = Histogram2d(
autobinx=autobinx,
autobiny=autobiny,
@@ -7538,6 +7524,8 @@ def add_histogram2dcontour(
-------
FigureWidget
"""
+ from plotly.graph_objs import Histogram2dContour
+
new_trace = Histogram2dContour(
autobinx=autobinx,
autobiny=autobiny,
@@ -7829,6 +7817,8 @@ def add_image(
-------
FigureWidget
"""
+ from plotly.graph_objs import Image
+
new_trace = Image(
colormodel=colormodel,
customdata=customdata,
@@ -8007,6 +7997,8 @@ def add_indicator(
-------
FigureWidget
"""
+ from plotly.graph_objs import Indicator
+
new_trace = Indicator(
align=align,
customdata=customdata,
@@ -8352,6 +8344,8 @@ def add_isosurface(
-------
FigureWidget
"""
+ from plotly.graph_objs import Isosurface
+
new_trace = Isosurface(
autocolorscale=autocolorscale,
caps=caps,
@@ -8817,6 +8811,8 @@ def add_mesh3d(
-------
FigureWidget
"""
+ from plotly.graph_objs import Mesh3d
+
new_trace = Mesh3d(
alphahull=alphahull,
autocolorscale=autocolorscale,
@@ -9122,6 +9118,8 @@ def add_ohlc(
-------
FigureWidget
"""
+ from plotly.graph_objs import Ohlc
+
new_trace = Ohlc(
close=close,
closesrc=closesrc,
@@ -9340,6 +9338,8 @@ def add_parcats(
-------
FigureWidget
"""
+ from plotly.graph_objs import Parcats
+
new_trace = Parcats(
arrangement=arrangement,
bundlecolors=bundlecolors,
@@ -9510,6 +9510,8 @@ def add_parcoords(
-------
FigureWidget
"""
+ from plotly.graph_objs import Parcoords
+
new_trace = Parcoords(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -9856,6 +9858,8 @@ def add_pie(
-------
FigureWidget
"""
+ from plotly.graph_objs import Pie
+
new_trace = Pie(
automargin=automargin,
customdata=customdata,
@@ -10138,6 +10142,8 @@ def add_pointcloud(
-------
FigureWidget
"""
+ from plotly.graph_objs import Pointcloud
+
new_trace = Pointcloud(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -10337,6 +10343,8 @@ def add_sankey(
-------
FigureWidget
"""
+ from plotly.graph_objs import Sankey
+
new_trace = Sankey(
arrangement=arrangement,
customdata=customdata,
@@ -10791,6 +10799,8 @@ def add_scatter(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scatter
+
new_trace = Scatter(
cliponaxis=cliponaxis,
connectgaps=connectgaps,
@@ -11156,6 +11166,8 @@ def add_scatter3d(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scatter3d
+
new_trace = Scatter3d(
connectgaps=connectgaps,
customdata=customdata,
@@ -11524,6 +11536,8 @@ def add_scattercarpet(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scattercarpet
+
new_trace = Scattercarpet(
a=a,
asrc=asrc,
@@ -11891,6 +11905,8 @@ def add_scattergeo(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scattergeo
+
new_trace = Scattergeo(
connectgaps=connectgaps,
customdata=customdata,
@@ -12285,6 +12301,8 @@ def add_scattergl(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scattergl
+
new_trace = Scattergl(
connectgaps=connectgaps,
customdata=customdata,
@@ -12626,6 +12644,8 @@ def add_scattermapbox(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scattermapbox
+
new_trace = Scattermapbox(
below=below,
connectgaps=connectgaps,
@@ -13001,6 +13021,8 @@ def add_scatterpolar(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scatterpolar
+
new_trace = Scatterpolar(
cliponaxis=cliponaxis,
connectgaps=connectgaps,
@@ -13380,6 +13402,8 @@ def add_scatterpolargl(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scatterpolargl
+
new_trace = Scatterpolargl(
connectgaps=connectgaps,
customdata=customdata,
@@ -13761,6 +13785,8 @@ def add_scatterternary(
-------
FigureWidget
"""
+ from plotly.graph_objs import Scatterternary
+
new_trace = Scatterternary(
a=a,
asrc=asrc,
@@ -14053,6 +14079,8 @@ def add_splom(
-------
FigureWidget
"""
+ from plotly.graph_objs import Splom
+
new_trace = Splom(
customdata=customdata,
customdatasrc=customdatasrc,
@@ -14406,6 +14434,8 @@ def add_streamtube(
-------
FigureWidget
"""
+ from plotly.graph_objs import Streamtube
+
new_trace = Streamtube(
autocolorscale=autocolorscale,
cauto=cauto,
@@ -14749,6 +14779,8 @@ def add_sunburst(
-------
FigureWidget
"""
+ from plotly.graph_objs import Sunburst
+
new_trace = Sunburst(
branchvalues=branchvalues,
count=count,
@@ -15124,6 +15156,8 @@ def add_surface(
-------
FigureWidget
"""
+ from plotly.graph_objs import Surface
+
new_trace = Surface(
autocolorscale=autocolorscale,
cauto=cauto,
@@ -15330,6 +15364,8 @@ def add_table(
-------
FigureWidget
"""
+ from plotly.graph_objs import Table
+
new_trace = Table(
cells=cells,
columnorder=columnorder,
@@ -15642,6 +15678,8 @@ def add_treemap(
-------
FigureWidget
"""
+ from plotly.graph_objs import Treemap
+
new_trace = Treemap(
branchvalues=branchvalues,
count=count,
@@ -16053,6 +16091,8 @@ def add_violin(
-------
FigureWidget
"""
+ from plotly.graph_objs import Violin
+
new_trace = Violin(
alignmentgroup=alignmentgroup,
bandwidth=bandwidth,
@@ -16444,6 +16484,8 @@ def add_volume(
-------
FigureWidget
"""
+ from plotly.graph_objs import Volume
+
new_trace = Volume(
autocolorscale=autocolorscale,
caps=caps,
@@ -16884,6 +16926,8 @@ def add_waterfall(
-------
FigureWidget
"""
+ from plotly.graph_objs import Waterfall
+
new_trace = Waterfall(
alignmentgroup=alignmentgroup,
base=base,
@@ -18245,6 +18289,8 @@ def add_annotation(
-------
FigureWidget
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Annotation(
arg,
align=align,
@@ -18552,6 +18598,8 @@ def add_layout_image(
-------
FigureWidget
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Image(
arg,
layer=layer,
@@ -18889,6 +18937,8 @@ def add_shape(
-------
FigureWidget
"""
+ from plotly.graph_objs import layout as _layout
+
new_obj = _layout.Shape(
arg,
fillcolor=fillcolor,
diff --git a/packages/python/plotly/plotly/graph_objs/_frame.py b/packages/python/plotly/plotly/graph_objs/_frame.py
new file mode 100644
index 00000000000..1b5457ef5e8
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_frame.py
@@ -0,0 +1,266 @@
+from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType
+import copy as _copy
+
+
+class Frame(_BaseFrameHierarchyType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "frame"
+ _valid_props = {"baseframe", "data", "group", "layout", "name", "traces"}
+
+ # baseframe
+ # ---------
+ @property
+ def baseframe(self):
+ """
+ The name of the frame into which this frame's properties are
+ merged before applying. This is used to unify properties and
+ avoid needing to specify the same values for the same
+ properties in multiple frames.
+
+ The 'baseframe' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["baseframe"]
+
+ @baseframe.setter
+ def baseframe(self, val):
+ self["baseframe"] = val
+
+ # data
+ # ----
+ @property
+ def data(self):
+ """
+ A list of traces this frame modifies. The format is identical
+ to the normal trace definition.
+
+ Returns
+ -------
+ Any
+ """
+ return self["data"]
+
+ @data.setter
+ def data(self, val):
+ self["data"] = val
+
+ # group
+ # -----
+ @property
+ def group(self):
+ """
+ An identifier that specifies the group to which the frame
+ belongs, used by animate to select a subset of frames.
+
+ The 'group' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["group"]
+
+ @group.setter
+ def group(self, val):
+ self["group"] = val
+
+ # layout
+ # ------
+ @property
+ def layout(self):
+ """
+ Layout properties which this frame modifies. The format is
+ identical to the normal layout definition.
+
+ Returns
+ -------
+ Any
+ """
+ return self["layout"]
+
+ @layout.setter
+ def layout(self, val):
+ self["layout"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ A label by which to identify the frame
+
+ 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
+
+ # traces
+ # ------
+ @property
+ def traces(self):
+ """
+ A list of trace indices that identify the respective traces in
+ the data attribute
+
+ The 'traces' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["traces"]
+
+ @traces.setter
+ def traces(self, val):
+ self["traces"] = val
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ baseframe
+ The name of the frame into which this frame's
+ properties are merged before applying. This is used to
+ unify properties and avoid needing to specify the same
+ values for the same properties in multiple frames.
+ data
+ A list of traces this frame modifies. The format is
+ identical to the normal trace definition.
+ group
+ An identifier that specifies the group to which the
+ frame belongs, used by animate to select a subset of
+ frames.
+ layout
+ Layout properties which this frame modifies. The format
+ is identical to the normal layout definition.
+ name
+ A label by which to identify the frame
+ traces
+ A list of trace indices that identify the respective
+ traces in the data attribute
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ baseframe=None,
+ data=None,
+ group=None,
+ layout=None,
+ name=None,
+ traces=None,
+ **kwargs
+ ):
+ """
+ Construct a new Frame object
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Frame`
+ baseframe
+ The name of the frame into which this frame's
+ properties are merged before applying. This is used to
+ unify properties and avoid needing to specify the same
+ values for the same properties in multiple frames.
+ data
+ A list of traces this frame modifies. The format is
+ identical to the normal trace definition.
+ group
+ An identifier that specifies the group to which the
+ frame belongs, used by animate to select a subset of
+ frames.
+ layout
+ Layout properties which this frame modifies. The format
+ is identical to the normal layout definition.
+ name
+ A label by which to identify the frame
+ traces
+ A list of trace indices that identify the respective
+ traces in the data attribute
+
+ Returns
+ -------
+ Frame
+ """
+ super(Frame, self).__init__("frames")
+
+ 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.Frame
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Frame`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("baseframe", None)
+ _v = baseframe if baseframe is not None else _v
+ if _v is not None:
+ self["baseframe"] = _v
+ _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("group", None)
+ _v = group if group is not None else _v
+ if _v is not None:
+ self["group"] = _v
+ _v = arg.pop("layout", None)
+ _v = layout if layout is not None else _v
+ if _v is not None:
+ self["layout"] = _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("traces", None)
+ _v = traces if traces is not None else _v
+ if _v is not None:
+ self["traces"] = _v
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_funnel.py b/packages/python/plotly/plotly/graph_objs/_funnel.py
new file mode 100644
index 00000000000..607b67124fa
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_funnel.py
@@ -0,0 +1,2423 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Funnel(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "funnel"
+ _valid_props = {
+ "alignmentgroup",
+ "cliponaxis",
+ "connector",
+ "constraintext",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "insidetextanchor",
+ "insidetextfont",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "offset",
+ "offsetgroup",
+ "opacity",
+ "orientation",
+ "outsidetextfont",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "text",
+ "textangle",
+ "textfont",
+ "textinfo",
+ "textposition",
+ "textpositionsrc",
+ "textsrc",
+ "texttemplate",
+ "texttemplatesrc",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "width",
+ "x",
+ "x0",
+ "xaxis",
+ "xsrc",
+ "y",
+ "y0",
+ "yaxis",
+ "ysrc",
+ }
+
+ # alignmentgroup
+ # --------------
+ @property
+ def alignmentgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same alignmentgroup. This controls whether bars
+ compute their positional range dependently or independently.
+
+ The 'alignmentgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["alignmentgroup"]
+
+ @alignmentgroup.setter
+ def alignmentgroup(self, val):
+ self["alignmentgroup"] = val
+
+ # cliponaxis
+ # ----------
+ @property
+ def cliponaxis(self):
+ """
+ Determines whether the text nodes are clipped about the subplot
+ axes. To show the text nodes above axis lines and tick labels,
+ make sure to set `xaxis.layer` and `yaxis.layer` to *below
+ traces*.
+
+ The 'cliponaxis' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["cliponaxis"]
+
+ @cliponaxis.setter
+ def cliponaxis(self, val):
+ self["cliponaxis"] = val
+
+ # connector
+ # ---------
+ @property
+ def connector(self):
+ """
+ The 'connector' property is an instance of Connector
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Connector`
+ - A dict of string/value properties that will be passed
+ to the Connector constructor
+
+ Supported dict properties:
+
+ fillcolor
+ Sets the fill color.
+ line
+ :class:`plotly.graph_objects.funnel.connector.L
+ ine` instance or dict with compatible
+ properties
+ visible
+ Determines if connector regions and lines are
+ drawn.
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Connector
+ """
+ return self["connector"]
+
+ @connector.setter
+ def connector(self, val):
+ self["connector"] = val
+
+ # constraintext
+ # -------------
+ @property
+ def constraintext(self):
+ """
+ Constrain the size of text inside or outside a bar to be no
+ larger than the bar itself.
+
+ The 'constraintext' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['inside', 'outside', 'both', 'none']
+
+ Returns
+ -------
+ Any
+ """
+ return self["constraintext"]
+
+ @constraintext.setter
+ def constraintext(self, val):
+ self["constraintext"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters
+ (e.g. 'name+x')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variables `percentInitial`, `percentPrevious` and
+ `percentTotal`. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary box
+ completely, use an empty tag ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Sets hover text elements associated with each (x,y) pair. If a
+ single string, the same string appears over all the data
+ points. If an array of string, the items are mapped in order to
+ the this trace's (x,y) coordinates. To be seen, trace
+ `hoverinfo` must contain a "text" flag.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # insidetextanchor
+ # ----------------
+ @property
+ def insidetextanchor(self):
+ """
+ Determines if texts are kept at center or start/end points in
+ `textposition` "inside" mode.
+
+ The 'insidetextanchor' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['end', 'middle', 'start']
+
+ Returns
+ -------
+ Any
+ """
+ return self["insidetextanchor"]
+
+ @insidetextanchor.setter
+ def insidetextanchor(self, val):
+ self["insidetextanchor"] = val
+
+ # insidetextfont
+ # --------------
+ @property
+ def insidetextfont(self):
+ """
+ Sets the font used for `text` lying inside the bar.
+
+ The 'insidetextfont' property is an instance of Insidetextfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Insidetextfont`
+ - A dict of string/value properties that will be passed
+ to the Insidetextfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Insidetextfont
+ """
+ return self["insidetextfont"]
+
+ @insidetextfont.setter
+ def insidetextfont(self, val):
+ self["insidetextfont"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ autocolorscale
+ Determines whether the colorscale is a default
+ palette (`autocolorscale: true`) or the palette
+ determined by `marker.colorscale`. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. 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
+ in `marker.color`) or the bounds set in
+ `marker.cmin` and `marker.cmax` Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Defaults to `false` when `marker.cmin`
+ and `marker.cmax` are set by the user.
+ cmax
+ Sets the upper bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmin` must be set as well.
+ cmid
+ Sets the mid-point of the color domain by
+ scaling `marker.cmin` and/or `marker.cmax` to
+ be equidistant to this point. Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Value should have the same units as in
+ `marker.color`. Has no effect when
+ `marker.cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmax` must be set as well.
+ color
+ Sets themarkercolor. It accepts either a
+ specific color or an array of numbers that are
+ mapped to the colorscale relative to the max
+ and min values of the array or relative to
+ `marker.cmin` and `marker.cmax` if set.
+ coloraxis
+ Sets a reference to a shared color axis.
+ References to these shared color axes are
+ "coloraxis", "coloraxis2", "coloraxis3", etc.
+ Settings for these shared color axes are set in
+ the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple
+ color scales can be linked to the same color
+ axis.
+ colorbar
+ :class:`plotly.graph_objects.funnel.marker.Colo
+ rBar` instance or dict with compatible
+ properties
+ colorscale
+ Sets the colorscale. Has an effect only if in
+ `marker.color`is set to a numerical array. 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`marker.cmin` and
+ `marker.cmax`. Alternatively, `colorscale` may
+ be a palette name string of the following list:
+ Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
+ arth,Electric,Viridis,Cividis.
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ line
+ :class:`plotly.graph_objects.funnel.marker.Line
+ ` instance or dict with compatible properties
+ opacity
+ Sets the opacity of the bars.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+ reversescale
+ Reverses the color mapping if true. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. If true, `marker.cmin` will
+ correspond to the last color in the array and
+ `marker.cmax` will correspond to the first
+ color.
+ showscale
+ Determines whether or not a colorbar is
+ displayed for this trace. Has an effect only if
+ in `marker.color`is set to a numerical array.
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # offset
+ # ------
+ @property
+ def offset(self):
+ """
+ Shifts the position where the bar is drawn (in position axis
+ units). In "group" barmode, traces that set "offset" will be
+ excluded and drawn in "overlay" mode instead.
+
+ The 'offset' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["offset"]
+
+ @offset.setter
+ def offset(self, val):
+ self["offset"] = val
+
+ # offsetgroup
+ # -----------
+ @property
+ def offsetgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same offsetgroup where bars of the same position
+ coordinate will line up.
+
+ The 'offsetgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetgroup"]
+
+ @offsetgroup.setter
+ def offsetgroup(self, val):
+ self["offsetgroup"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # orientation
+ # -----------
+ @property
+ def orientation(self):
+ """
+ Sets the orientation of the funnels. With "v" ("h"), the value
+ of the each bar spans along the vertical (horizontal). By
+ default funnels are tend to be oriented horizontally; unless
+ only "y" array is presented or orientation is set to "v". Also
+ regarding graphs including only 'horizontal' funnels,
+ "autorange" on the "y-axis" are set to "reversed".
+
+ 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
+
+ # outsidetextfont
+ # ---------------
+ @property
+ def outsidetextfont(self):
+ """
+ Sets the font used for `text` lying outside the bar.
+
+ The 'outsidetextfont' property is an instance of Outsidetextfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Outsidetextfont`
+ - A dict of string/value properties that will be passed
+ to the Outsidetextfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Outsidetextfont
+ """
+ return self["outsidetextfont"]
+
+ @outsidetextfont.setter
+ def outsidetextfont(self, val):
+ self["outsidetextfont"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.funnel.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets text elements associated with each (x,y) pair. If a single
+ string, the same string appears over all the data points. If an
+ array of string, the items are mapped in order to the this
+ trace's (x,y) coordinates. If trace `hoverinfo` contains a
+ "text" flag and "hovertext" is not set, these elements will be
+ seen in the hover labels.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textangle
+ # ---------
+ @property
+ def textangle(self):
+ """
+ Sets the angle of the tick labels with respect to the bar. For
+ example, a `tickangle` of -90 draws the tick labels vertically.
+ With "auto" the texts may automatically be rotated to fit with
+ the maximum size in bars.
+
+ The 'textangle' property is a angle (in degrees) that may be
+ specified as a number between -180 and 180. Numeric values outside this
+ range are converted to the equivalent value
+ (e.g. 270 is converted to -90).
+
+ Returns
+ -------
+ int|float
+ """
+ return self["textangle"]
+
+ @textangle.setter
+ def textangle(self, val):
+ self["textangle"] = val
+
+ # textfont
+ # --------
+ @property
+ def textfont(self):
+ """
+ Sets the font used for `text`.
+
+ The 'textfont' property is an instance of Textfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnel.Textfont`
+ - A dict of string/value properties that will be passed
+ to the Textfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.funnel.Textfont
+ """
+ return self["textfont"]
+
+ @textfont.setter
+ def textfont(self, val):
+ self["textfont"] = val
+
+ # textinfo
+ # --------
+ @property
+ def textinfo(self):
+ """
+ Determines which trace information appear on the graph. In the
+ case of having multiple funnels, percentages & totals are
+ computed separately (per trace).
+
+ The 'textinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters
+ (e.g. 'label+text')
+ OR exactly one of ['none'] (e.g. 'none')
+
+ Returns
+ -------
+ Any
+ """
+ return self["textinfo"]
+
+ @textinfo.setter
+ def textinfo(self, val):
+ self["textinfo"] = val
+
+ # textposition
+ # ------------
+ @property
+ def textposition(self):
+ """
+ Specifies the location of the `text`. "inside" positions `text`
+ inside, next to the bar end (rotated and scaled if needed).
+ "outside" positions `text` outside, next to the bar end (scaled
+ if needed), unless there is another bar stacked on this one,
+ then the text gets pushed inside. "auto" tries to position
+ `text` inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+
+ The 'textposition' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['inside', 'outside', 'auto', 'none']
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["textposition"]
+
+ @textposition.setter
+ def textposition(self, val):
+ self["textposition"] = val
+
+ # textpositionsrc
+ # ---------------
+ @property
+ def textpositionsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+
+ The 'textpositionsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textpositionsrc"]
+
+ @textpositionsrc.setter
+ def textpositionsrc(self, val):
+ self["textpositionsrc"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # texttemplate
+ # ------------
+ @property
+ def texttemplate(self):
+ """
+ Template string used for rendering the information text that
+ appear on points. Note that this will override `textinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. Every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`) are
+ available. variables `percentInitial`, `percentPrevious`,
+ `percentTotal`, `label` and `value`.
+
+ The 'texttemplate' 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["texttemplate"]
+
+ @texttemplate.setter
+ def texttemplate(self, val):
+ self["texttemplate"] = val
+
+ # texttemplatesrc
+ # ---------------
+ @property
+ def texttemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+
+ The 'texttemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["texttemplatesrc"]
+
+ @texttemplatesrc.setter
+ def texttemplatesrc(self, val):
+ self["texttemplatesrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # width
+ # -----
+ @property
+ def width(self):
+ """
+ Sets the bar width (in position axis units).
+
+ 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
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ cliponaxis
+ Determines whether the text nodes are clipped about the
+ subplot axes. To show the text nodes above axis lines
+ and tick labels, make sure to set `xaxis.layer` and
+ `yaxis.layer` to *below traces*.
+ connector
+ :class:`plotly.graph_objects.funnel.Connector` instance
+ or dict with compatible properties
+ constraintext
+ Constrain the size of text inside or outside a bar to
+ be no larger than the bar itself.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.funnel.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `percentInitial`,
+ `percentPrevious` and `percentTotal`. Anything
+ contained in tag `` is displayed in the
+ secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (x,y)
+ pair. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextanchor
+ Determines if texts are kept at center or start/end
+ points in `textposition` "inside" mode.
+ insidetextfont
+ Sets the font used for `text` lying inside the bar.
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.funnel.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the position where the bar is drawn (in position
+ axis units). In "group" barmode, traces that set
+ "offset" will be excluded and drawn in "overlay" mode
+ instead.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the funnels. With "v" ("h"),
+ the value of the each bar spans along the vertical
+ (horizontal). By default funnels are tend to be
+ oriented horizontally; unless only "y" array is
+ presented or orientation is set to "v". Also regarding
+ graphs including only 'horizontal' funnels, "autorange"
+ on the "y-axis" are set to "reversed".
+ outsidetextfont
+ Sets the font used for `text` lying outside the bar.
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.funnel.Stream` instance or
+ dict with compatible properties
+ text
+ Sets text elements associated with each (x,y) pair. If
+ a single string, the same string appears over all the
+ data points. If an array of string, the items are
+ mapped in order to the this trace's (x,y) coordinates.
+ If trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textangle
+ Sets the angle of the tick labels with respect to the
+ bar. For example, a `tickangle` of -90 draws the tick
+ labels vertically. With "auto" the texts may
+ automatically be rotated to fit with the maximum size
+ in bars.
+ textfont
+ Sets the font used for `text`.
+ textinfo
+ Determines which trace information appear on the graph.
+ In the case of having multiple funnels, percentages &
+ totals are computed separately (per trace).
+ textposition
+ Specifies the location of the `text`. "inside"
+ positions `text` inside, next to the bar end (rotated
+ and scaled if needed). "outside" positions `text`
+ outside, next to the bar end (scaled if needed), unless
+ there is another bar stacked on this one, then the text
+ gets pushed inside. "auto" tries to position `text`
+ inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables
+ `percentInitial`, `percentPrevious`, `percentTotal`,
+ `label` and `value`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar width (in position axis units).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ alignmentgroup=None,
+ cliponaxis=None,
+ connector=None,
+ constraintext=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ insidetextanchor=None,
+ insidetextfont=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ offset=None,
+ offsetgroup=None,
+ opacity=None,
+ orientation=None,
+ outsidetextfont=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ text=None,
+ textangle=None,
+ textfont=None,
+ textinfo=None,
+ textposition=None,
+ textpositionsrc=None,
+ textsrc=None,
+ texttemplate=None,
+ texttemplatesrc=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ width=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xsrc=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ysrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Funnel object
+
+ Visualize stages in a process using length-encoded bars. This
+ trace can be used to show data in either a part-to-whole
+ representation wherein each item appears in a single stage, or
+ in a "drop-off" representation wherein each item appears in
+ each stage it traversed. See also the "funnelarea" trace type
+ for a different approach to visualizing funnel data.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Funnel`
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ cliponaxis
+ Determines whether the text nodes are clipped about the
+ subplot axes. To show the text nodes above axis lines
+ and tick labels, make sure to set `xaxis.layer` and
+ `yaxis.layer` to *below traces*.
+ connector
+ :class:`plotly.graph_objects.funnel.Connector` instance
+ or dict with compatible properties
+ constraintext
+ Constrain the size of text inside or outside a bar to
+ be no larger than the bar itself.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.funnel.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `percentInitial`,
+ `percentPrevious` and `percentTotal`. Anything
+ contained in tag `` is displayed in the
+ secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each (x,y)
+ pair. If a single string, the same string appears over
+ all the data points. If an array of string, the items
+ are mapped in order to the this trace's (x,y)
+ coordinates. To be seen, trace `hoverinfo` must contain
+ a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextanchor
+ Determines if texts are kept at center or start/end
+ points in `textposition` "inside" mode.
+ insidetextfont
+ Sets the font used for `text` lying inside the bar.
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.funnel.Marker` instance or
+ dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ offset
+ Shifts the position where the bar is drawn (in position
+ axis units). In "group" barmode, traces that set
+ "offset" will be excluded and drawn in "overlay" mode
+ instead.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the funnels. With "v" ("h"),
+ the value of the each bar spans along the vertical
+ (horizontal). By default funnels are tend to be
+ oriented horizontally; unless only "y" array is
+ presented or orientation is set to "v". Also regarding
+ graphs including only 'horizontal' funnels, "autorange"
+ on the "y-axis" are set to "reversed".
+ outsidetextfont
+ Sets the font used for `text` lying outside the bar.
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.funnel.Stream` instance or
+ dict with compatible properties
+ text
+ Sets text elements associated with each (x,y) pair. If
+ a single string, the same string appears over all the
+ data points. If an array of string, the items are
+ mapped in order to the this trace's (x,y) coordinates.
+ If trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in
+ the hover labels.
+ textangle
+ Sets the angle of the tick labels with respect to the
+ bar. For example, a `tickangle` of -90 draws the tick
+ labels vertically. With "auto" the texts may
+ automatically be rotated to fit with the maximum size
+ in bars.
+ textfont
+ Sets the font used for `text`.
+ textinfo
+ Determines which trace information appear on the graph.
+ In the case of having multiple funnels, percentages &
+ totals are computed separately (per trace).
+ textposition
+ Specifies the location of the `text`. "inside"
+ positions `text` inside, next to the bar end (rotated
+ and scaled if needed). "outside" positions `text`
+ outside, next to the bar end (scaled if needed), unless
+ there is another bar stacked on this one, then the text
+ gets pushed inside. "auto" tries to position `text`
+ inside the bar, but if the bar is too small and no bar
+ is stacked on this one the text is moved outside.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables
+ `percentInitial`, `percentPrevious`, `percentTotal`,
+ `label` and `value`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ width
+ Sets the bar width (in position axis units).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+
+ Returns
+ -------
+ Funnel
+ """
+ super(Funnel, self).__init__("funnel")
+
+ 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.Funnel
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Funnel`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("alignmentgroup", None)
+ _v = alignmentgroup if alignmentgroup is not None else _v
+ if _v is not None:
+ self["alignmentgroup"] = _v
+ _v = arg.pop("cliponaxis", None)
+ _v = cliponaxis if cliponaxis is not None else _v
+ if _v is not None:
+ self["cliponaxis"] = _v
+ _v = arg.pop("connector", None)
+ _v = connector if connector is not None else _v
+ if _v is not None:
+ self["connector"] = _v
+ _v = arg.pop("constraintext", None)
+ _v = constraintext if constraintext is not None else _v
+ if _v is not None:
+ self["constraintext"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("insidetextanchor", None)
+ _v = insidetextanchor if insidetextanchor is not None else _v
+ if _v is not None:
+ self["insidetextanchor"] = _v
+ _v = arg.pop("insidetextfont", None)
+ _v = insidetextfont if insidetextfont is not None else _v
+ if _v is not None:
+ self["insidetextfont"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("offset", None)
+ _v = offset if offset is not None else _v
+ if _v is not None:
+ self["offset"] = _v
+ _v = arg.pop("offsetgroup", None)
+ _v = offsetgroup if offsetgroup is not None else _v
+ if _v is not None:
+ self["offsetgroup"] = _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("orientation", None)
+ _v = orientation if orientation is not None else _v
+ if _v is not None:
+ self["orientation"] = _v
+ _v = arg.pop("outsidetextfont", None)
+ _v = outsidetextfont if outsidetextfont is not None else _v
+ if _v is not None:
+ self["outsidetextfont"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textangle", None)
+ _v = textangle if textangle is not None else _v
+ if _v is not None:
+ self["textangle"] = _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("textinfo", None)
+ _v = textinfo if textinfo is not None else _v
+ if _v is not None:
+ self["textinfo"] = _v
+ _v = arg.pop("textposition", None)
+ _v = textposition if textposition is not None else _v
+ if _v is not None:
+ self["textposition"] = _v
+ _v = arg.pop("textpositionsrc", None)
+ _v = textpositionsrc if textpositionsrc is not None else _v
+ if _v is not None:
+ self["textpositionsrc"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("texttemplate", None)
+ _v = texttemplate if texttemplate is not None else _v
+ if _v is not None:
+ self["texttemplate"] = _v
+ _v = arg.pop("texttemplatesrc", None)
+ _v = texttemplatesrc if texttemplatesrc is not None else _v
+ if _v is not None:
+ self["texttemplatesrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("width", None)
+ _v = width if width is not None else _v
+ if _v is not None:
+ self["width"] = _v
+ _v = arg.pop("x", None)
+ _v = x if x is not None else _v
+ if _v is not None:
+ self["x"] = _v
+ _v = arg.pop("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "funnel"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_funnelarea.py b/packages/python/plotly/plotly/graph_objs/_funnelarea.py
new file mode 100644
index 00000000000..bfcd1551969
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_funnelarea.py
@@ -0,0 +1,1876 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Funnelarea(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "funnelarea"
+ _valid_props = {
+ "aspectratio",
+ "baseratio",
+ "customdata",
+ "customdatasrc",
+ "dlabel",
+ "domain",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "insidetextfont",
+ "label0",
+ "labels",
+ "labelssrc",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "scalegroup",
+ "showlegend",
+ "stream",
+ "text",
+ "textfont",
+ "textinfo",
+ "textposition",
+ "textpositionsrc",
+ "textsrc",
+ "texttemplate",
+ "texttemplatesrc",
+ "title",
+ "type",
+ "uid",
+ "uirevision",
+ "values",
+ "valuessrc",
+ "visible",
+ }
+
+ # aspectratio
+ # -----------
+ @property
+ def aspectratio(self):
+ """
+ Sets the ratio between height and width
+
+ The 'aspectratio' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["aspectratio"]
+
+ @aspectratio.setter
+ def aspectratio(self, val):
+ self["aspectratio"] = val
+
+ # baseratio
+ # ---------
+ @property
+ def baseratio(self):
+ """
+ Sets the ratio between bottom length and maximum top length.
+
+ The 'baseratio' property is a number and may be specified as:
+ - An int or float in the interval [0, 1]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["baseratio"]
+
+ @baseratio.setter
+ def baseratio(self, val):
+ self["baseratio"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dlabel
+ # ------
+ @property
+ def dlabel(self):
+ """
+ Sets the label step. See `label0` for more info.
+
+ The 'dlabel' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dlabel"]
+
+ @dlabel.setter
+ def dlabel(self, val):
+ self["dlabel"] = 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.funnelarea.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 funnelarea
+ trace .
+ row
+ If there is a layout grid, use the domain for
+ this row in the grid for this funnelarea trace
+ .
+ x
+ Sets the horizontal domain of this funnelarea
+ trace (in plot fraction).
+ y
+ Sets the vertical domain of this funnelarea
+ trace (in plot fraction).
+
+ Returns
+ -------
+ plotly.graph_objs.funnelarea.Domain
+ """
+ return self["domain"]
+
+ @domain.setter
+ def domain(self, val):
+ self["domain"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters
+ (e.g. 'label+text')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.funnelarea.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variables `label`, `color`, `value`, `text` and `percent`.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Sets hover text elements associated with each sector. If a
+ single string, the same string appears for all data points. If
+ an array of string, the items are mapped in order of this
+ trace's sectors. To be seen, trace `hoverinfo` must contain a
+ "text" flag.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # insidetextfont
+ # --------------
+ @property
+ def insidetextfont(self):
+ """
+ Sets the font used for `textinfo` lying inside the sector.
+
+ The 'insidetextfont' property is an instance of Insidetextfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont`
+ - A dict of string/value properties that will be passed
+ to the Insidetextfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.funnelarea.Insidetextfont
+ """
+ return self["insidetextfont"]
+
+ @insidetextfont.setter
+ def insidetextfont(self, val):
+ self["insidetextfont"] = val
+
+ # label0
+ # ------
+ @property
+ def label0(self):
+ """
+ Alternate to `labels`. Builds a numeric set of labels. Use with
+ `dlabel` where `label0` is the starting label and `dlabel` the
+ step.
+
+ The 'label0' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["label0"]
+
+ @label0.setter
+ def label0(self, val):
+ self["label0"] = val
+
+ # labels
+ # ------
+ @property
+ def labels(self):
+ """
+ Sets the sector labels. If `labels` entries are duplicated, we
+ sum associated `values` or simply count occurrences if `values`
+ is not provided. For other array attributes (including color)
+ we use the first non-empty entry among all occurrences of the
+ label.
+
+ The 'labels' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["labels"]
+
+ @labels.setter
+ def labels(self, val):
+ self["labels"] = val
+
+ # labelssrc
+ # ---------
+ @property
+ def labelssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for labels .
+
+ The 'labelssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["labelssrc"]
+
+ @labelssrc.setter
+ def labelssrc(self, val):
+ self["labelssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnelarea.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ colors
+ Sets the color of each sector. If not
+ specified, the default trace color set is used
+ to pick the sector colors.
+ colorssrc
+ Sets the source reference on Chart Studio Cloud
+ for colors .
+ line
+ :class:`plotly.graph_objects.funnelarea.marker.
+ Line` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.funnelarea.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # scalegroup
+ # ----------
+ @property
+ def scalegroup(self):
+ """
+ If there are multiple funnelareas that should be sized
+ according to their totals, link them by providing a non-empty
+ group id here shared by every trace in the same group.
+
+ The 'scalegroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["scalegroup"]
+
+ @scalegroup.setter
+ def scalegroup(self, val):
+ self["scalegroup"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnelarea.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.funnelarea.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets text elements associated with each sector. If trace
+ `textinfo` contains a "text" flag, these elements will be seen
+ on the chart. If trace `hoverinfo` contains a "text" flag and
+ "hovertext" is not set, these elements will be seen in the
+ hover labels.
+
+ The 'text' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textfont
+ # --------
+ @property
+ def textfont(self):
+ """
+ Sets the font used for `textinfo`.
+
+ The 'textfont' property is an instance of Textfont
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.funnelarea.Textfont`
+ - A dict of string/value properties that will be passed
+ to the Textfont constructor
+
+ Supported dict properties:
+
+ color
+
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ family
+ HTML font family - the typeface that will be
+ applied by the web browser. The web browser
+ will only be able to apply a font if it is
+ available on the system which it operates.
+ Provide multiple font families, separated by
+ commas, to indicate the preference in which to
+ apply fonts if they aren't available on the
+ system. The Chart Studio Cloud (at
+ https://chart-studio.plotly.com or on-premise)
+ generates images on a server, where only a
+ select number of fonts are installed and
+ supported. These include "Arial", "Balto",
+ "Courier New", "Droid Sans",, "Droid Serif",
+ "Droid Sans Mono", "Gravitas One", "Old
+ Standard TT", "Open Sans", "Overpass", "PT Sans
+ Narrow", "Raleway", "Times New Roman".
+ familysrc
+ Sets the source reference on Chart Studio Cloud
+ for family .
+ size
+
+ sizesrc
+ Sets the source reference on Chart Studio Cloud
+ for size .
+
+ Returns
+ -------
+ plotly.graph_objs.funnelarea.Textfont
+ """
+ return self["textfont"]
+
+ @textfont.setter
+ def textfont(self, val):
+ self["textfont"] = val
+
+ # textinfo
+ # --------
+ @property
+ def textinfo(self):
+ """
+ Determines which trace information appear on the graph.
+
+ The 'textinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters
+ (e.g. 'label+text')
+ OR exactly one of ['none'] (e.g. 'none')
+
+ Returns
+ -------
+ Any
+ """
+ return self["textinfo"]
+
+ @textinfo.setter
+ def textinfo(self, val):
+ self["textinfo"] = val
+
+ # textposition
+ # ------------
+ @property
+ def textposition(self):
+ """
+ Specifies the location of the `textinfo`.
+
+ The 'textposition' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['inside', 'none']
+ - A tuple, list, or one-dimensional numpy array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["textposition"]
+
+ @textposition.setter
+ def textposition(self, val):
+ self["textposition"] = val
+
+ # textpositionsrc
+ # ---------------
+ @property
+ def textpositionsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+
+ The 'textpositionsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textpositionsrc"]
+
+ @textpositionsrc.setter
+ def textpositionsrc(self, val):
+ self["textpositionsrc"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # texttemplate
+ # ------------
+ @property
+ def texttemplate(self):
+ """
+ Template string used for rendering the information text that
+ appear on points. Note that this will override `textinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. Every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`) are
+ available. variables `label`, `color`, `value`, `text` and
+ `percent`.
+
+ The 'texttemplate' 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["texttemplate"]
+
+ @texttemplate.setter
+ def texttemplate(self, val):
+ self["texttemplate"] = val
+
+ # texttemplatesrc
+ # ---------------
+ @property
+ def texttemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+
+ The 'texttemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["texttemplatesrc"]
+
+ @texttemplatesrc.setter
+ def texttemplatesrc(self, val):
+ self["texttemplatesrc"] = 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.funnelarea.Title`
+ - A dict of string/value properties that will be passed
+ to the Title constructor
+
+ Supported dict properties:
+
+ font
+ Sets the font used for `title`. Note that the
+ title's font used to be set by the now
+ deprecated `titlefont` attribute.
+ position
+ Specifies the location of the `title`. Note
+ that the title's position used to be set by the
+ now deprecated `titleposition` attribute.
+ text
+ Sets the title of the chart. If it is empty, no
+ title is displayed. 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
+ -------
+ plotly.graph_objs.funnelarea.Title
+ """
+ return self["title"]
+
+ @title.setter
+ def title(self, val):
+ self["title"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # values
+ # ------
+ @property
+ def values(self):
+ """
+ Sets the values of the sectors. If omitted, we count
+ occurrences of each label.
+
+ The 'values' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["values"]
+
+ @values.setter
+ def values(self, val):
+ self["values"] = val
+
+ # valuessrc
+ # ---------
+ @property
+ def valuessrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for values .
+
+ The 'valuessrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["valuessrc"]
+
+ @valuessrc.setter
+ def valuessrc(self, val):
+ self["valuessrc"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ aspectratio
+ Sets the ratio between height and width
+ baseratio
+ Sets the ratio between bottom length and maximum top
+ length.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dlabel
+ Sets the label step. See `label0` for more info.
+ domain
+ :class:`plotly.graph_objects.funnelarea.Domain`
+ instance or dict with compatible properties
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.funnelarea.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `label`, `color`, `value`,
+ `text` and `percent`. Anything contained in tag
+ `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each sector.
+ If a single string, the same string appears for all
+ data points. If an array of string, the items are
+ mapped in order of this trace's sectors. To be seen,
+ trace `hoverinfo` must contain a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextfont
+ Sets the font used for `textinfo` lying inside the
+ sector.
+ label0
+ Alternate to `labels`. Builds a numeric set of labels.
+ Use with `dlabel` where `label0` is the starting label
+ and `dlabel` the step.
+ labels
+ Sets the sector labels. If `labels` entries are
+ duplicated, we sum associated `values` or simply count
+ occurrences if `values` is not provided. For other
+ array attributes (including color) we use the first
+ non-empty entry among all occurrences of the label.
+ labelssrc
+ Sets the source reference on Chart Studio Cloud for
+ labels .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.funnelarea.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ scalegroup
+ If there are multiple funnelareas that should be sized
+ according to their totals, link them by providing a
+ non-empty group id here shared by every trace in the
+ same group.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.funnelarea.Stream`
+ instance or dict with compatible properties
+ text
+ Sets text elements associated with each sector. If
+ trace `textinfo` contains a "text" flag, these elements
+ will be seen on the chart. If trace `hoverinfo`
+ contains a "text" flag and "hovertext" is not set,
+ these elements will be seen in the hover labels.
+ textfont
+ Sets the font used for `textinfo`.
+ textinfo
+ Determines which trace information appear on the graph.
+ textposition
+ Specifies the location of the `textinfo`.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables `label`,
+ `color`, `value`, `text` and `percent`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ title
+ :class:`plotly.graph_objects.funnelarea.Title` instance
+ or dict with compatible properties
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ values
+ Sets the values of the sectors. If omitted, we count
+ occurrences of each label.
+ valuessrc
+ Sets the source reference on Chart Studio Cloud for
+ values .
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ aspectratio=None,
+ baseratio=None,
+ customdata=None,
+ customdatasrc=None,
+ dlabel=None,
+ domain=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ insidetextfont=None,
+ label0=None,
+ labels=None,
+ labelssrc=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ scalegroup=None,
+ showlegend=None,
+ stream=None,
+ text=None,
+ textfont=None,
+ textinfo=None,
+ textposition=None,
+ textpositionsrc=None,
+ textsrc=None,
+ texttemplate=None,
+ texttemplatesrc=None,
+ title=None,
+ uid=None,
+ uirevision=None,
+ values=None,
+ valuessrc=None,
+ visible=None,
+ **kwargs
+ ):
+ """
+ Construct a new Funnelarea object
+
+ Visualize stages in a process using area-encoded trapezoids.
+ This trace can be used to show data in a part-to-whole
+ representation similar to a "pie" trace, wherein each item
+ appears in a single stage. See also the "funnel" trace type for
+ a different approach to visualizing funnel data.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Funnelarea`
+ aspectratio
+ Sets the ratio between height and width
+ baseratio
+ Sets the ratio between bottom length and maximum top
+ length.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dlabel
+ Sets the label step. See `label0` for more info.
+ domain
+ :class:`plotly.graph_objects.funnelarea.Domain`
+ instance or dict with compatible properties
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.funnelarea.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variables `label`, `color`, `value`,
+ `text` and `percent`. Anything contained in tag
+ `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Sets hover text elements associated with each sector.
+ If a single string, the same string appears for all
+ data points. If an array of string, the items are
+ mapped in order of this trace's sectors. To be seen,
+ trace `hoverinfo` must contain a "text" flag.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ insidetextfont
+ Sets the font used for `textinfo` lying inside the
+ sector.
+ label0
+ Alternate to `labels`. Builds a numeric set of labels.
+ Use with `dlabel` where `label0` is the starting label
+ and `dlabel` the step.
+ labels
+ Sets the sector labels. If `labels` entries are
+ duplicated, we sum associated `values` or simply count
+ occurrences if `values` is not provided. For other
+ array attributes (including color) we use the first
+ non-empty entry among all occurrences of the label.
+ labelssrc
+ Sets the source reference on Chart Studio Cloud for
+ labels .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.funnelarea.Marker`
+ instance or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ scalegroup
+ If there are multiple funnelareas that should be sized
+ according to their totals, link them by providing a
+ non-empty group id here shared by every trace in the
+ same group.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.funnelarea.Stream`
+ instance or dict with compatible properties
+ text
+ Sets text elements associated with each sector. If
+ trace `textinfo` contains a "text" flag, these elements
+ will be seen on the chart. If trace `hoverinfo`
+ contains a "text" flag and "hovertext" is not set,
+ these elements will be seen in the hover labels.
+ textfont
+ Sets the font used for `textinfo`.
+ textinfo
+ Determines which trace information appear on the graph.
+ textposition
+ Specifies the location of the `textinfo`.
+ textpositionsrc
+ Sets the source reference on Chart Studio Cloud for
+ textposition .
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ texttemplate
+ Template string used for rendering the information text
+ that appear on points. Note that this will override
+ `textinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. Every attributes
+ that can be specified per-point (the ones that are
+ `arrayOk: true`) are available. variables `label`,
+ `color`, `value`, `text` and `percent`.
+ texttemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ texttemplate .
+ title
+ :class:`plotly.graph_objects.funnelarea.Title` instance
+ or dict with compatible properties
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ values
+ Sets the values of the sectors. If omitted, we count
+ occurrences of each label.
+ valuessrc
+ Sets the source reference on Chart Studio Cloud for
+ values .
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+
+ Returns
+ -------
+ Funnelarea
+ """
+ super(Funnelarea, self).__init__("funnelarea")
+
+ if "_parent" in kwargs:
+ self._parent = kwargs["_parent"]
+ return
+
+ # Validate arg
+ # ------------
+ if arg is None:
+ arg = {}
+ elif isinstance(arg, self.__class__):
+ arg = arg.to_plotly_json()
+ elif isinstance(arg, dict):
+ arg = _copy.copy(arg)
+ else:
+ raise ValueError(
+ """\
+The first argument to the plotly.graph_objs.Funnelarea
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Funnelarea`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("aspectratio", None)
+ _v = aspectratio if aspectratio is not None else _v
+ if _v is not None:
+ self["aspectratio"] = _v
+ _v = arg.pop("baseratio", None)
+ _v = baseratio if baseratio is not None else _v
+ if _v is not None:
+ self["baseratio"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dlabel", None)
+ _v = dlabel if dlabel is not None else _v
+ if _v is not None:
+ self["dlabel"] = _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("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("insidetextfont", None)
+ _v = insidetextfont if insidetextfont is not None else _v
+ if _v is not None:
+ self["insidetextfont"] = _v
+ _v = arg.pop("label0", None)
+ _v = label0 if label0 is not None else _v
+ if _v is not None:
+ self["label0"] = _v
+ _v = arg.pop("labels", None)
+ _v = labels if labels is not None else _v
+ if _v is not None:
+ self["labels"] = _v
+ _v = arg.pop("labelssrc", None)
+ _v = labelssrc if labelssrc is not None else _v
+ if _v is not None:
+ self["labelssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _v
+ _v = arg.pop("scalegroup", None)
+ _v = scalegroup if scalegroup is not None else _v
+ if _v is not None:
+ self["scalegroup"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("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("textinfo", None)
+ _v = textinfo if textinfo is not None else _v
+ if _v is not None:
+ self["textinfo"] = _v
+ _v = arg.pop("textposition", None)
+ _v = textposition if textposition is not None else _v
+ if _v is not None:
+ self["textposition"] = _v
+ _v = arg.pop("textpositionsrc", None)
+ _v = textpositionsrc if textpositionsrc is not None else _v
+ if _v is not None:
+ self["textpositionsrc"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("texttemplate", None)
+ _v = texttemplate if texttemplate is not None else _v
+ if _v is not None:
+ self["texttemplate"] = _v
+ _v = arg.pop("texttemplatesrc", None)
+ _v = texttemplatesrc if texttemplatesrc is not None else _v
+ if _v is not None:
+ self["texttemplatesrc"] = _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("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("values", None)
+ _v = values if values is not None else _v
+ if _v is not None:
+ self["values"] = _v
+ _v = arg.pop("valuessrc", None)
+ _v = valuessrc if valuessrc is not None else _v
+ if _v is not None:
+ self["valuessrc"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "funnelarea"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_heatmap.py b/packages/python/plotly/plotly/graph_objs/_heatmap.py
new file mode 100644
index 00000000000..ec6cf07e68f
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_heatmap.py
@@ -0,0 +1,2485 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Heatmap(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "heatmap"
+ _valid_props = {
+ "autocolorscale",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "connectgaps",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hoverongaps",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "reversescale",
+ "showlegend",
+ "showscale",
+ "stream",
+ "text",
+ "textsrc",
+ "transpose",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "x",
+ "x0",
+ "xaxis",
+ "xcalendar",
+ "xgap",
+ "xsrc",
+ "xtype",
+ "y",
+ "y0",
+ "yaxis",
+ "ycalendar",
+ "ygap",
+ "ysrc",
+ "ytype",
+ "z",
+ "zauto",
+ "zhoverformat",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsmooth",
+ "zsrc",
+ }
+
+ # 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.heatmap.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.heatmap
+ .colorbar.Tickformatstop` instances or dicts
+ with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.heatmap.colorbar.tickformatstopdefaults),
+ sets the default property values to use for
+ elements of heatmap.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.heatmap.colorbar.T
+ itle` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ heatmap.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
+ heatmap.colorbar.title.side instead. Determines
+ the location of color bar's title with respect
+ to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.heatmap.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # connectgaps
+ # -----------
+ @property
+ def connectgaps(self):
+ """
+ Determines whether or not gaps (i.e. {nan} or missing values)
+ in the `z` data are filled in. It is defaulted to true if `z`
+ is a one dimensional array and `zsmooth` is not false;
+ otherwise it is defaulted to false.
+
+ The 'connectgaps' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["connectgaps"]
+
+ @connectgaps.setter
+ def connectgaps(self, val):
+ self["connectgaps"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.heatmap.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.heatmap.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hoverongaps
+ # -----------
+ @property
+ def hoverongaps(self):
+ """
+ Determines whether or not gaps (i.e. {nan} or missing values)
+ in the `z` data have hover labels associated with them.
+
+ The 'hoverongaps' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["hoverongaps"]
+
+ @hoverongaps.setter
+ def hoverongaps(self, val):
+ self["hoverongaps"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ Anything contained in tag `` is displayed in the
+ secondary box, for example "{fullData.name}". To
+ hide the secondary box completely, use an empty tag
+ ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.heatmap.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.heatmap.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each z value.
+
+ The 'text' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # transpose
+ # ---------
+ @property
+ def transpose(self):
+ """
+ Transposes the z data.
+
+ The 'transpose' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["transpose"]
+
+ @transpose.setter
+ def transpose(self, val):
+ self["transpose"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xgap
+ # ----
+ @property
+ def xgap(self):
+ """
+ Sets the horizontal gap (in pixels) between bricks.
+
+ The 'xgap' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["xgap"]
+
+ @xgap.setter
+ def xgap(self, val):
+ self["xgap"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # xtype
+ # -----
+ @property
+ def xtype(self):
+ """
+ If "array", the heatmap's x coordinates are given by "x" (the
+ default behavior when `x` is provided). If "scaled", the
+ heatmap's x coordinates are given by "x0" and "dx" (the default
+ behavior when `x` is not provided).
+
+ The 'xtype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xtype"]
+
+ @xtype.setter
+ def xtype(self, val):
+ self["xtype"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ycalendar
+ # ---------
+ @property
+ def ycalendar(self):
+ """
+ Sets the calendar system to use with `y` date data.
+
+ The 'ycalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ycalendar"]
+
+ @ycalendar.setter
+ def ycalendar(self, val):
+ self["ycalendar"] = val
+
+ # ygap
+ # ----
+ @property
+ def ygap(self):
+ """
+ Sets the vertical gap (in pixels) between bricks.
+
+ The 'ygap' property is a number and may be specified as:
+ - An int or float in the interval [0, inf]
+
+ Returns
+ -------
+ int|float
+ """
+ return self["ygap"]
+
+ @ygap.setter
+ def ygap(self, val):
+ self["ygap"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # ytype
+ # -----
+ @property
+ def ytype(self):
+ """
+ If "array", the heatmap's y coordinates are given by "y" (the
+ default behavior when `y` is provided) If "scaled", the
+ heatmap's y coordinates are given by "y0" and "dy" (the default
+ behavior when `y` is not provided)
+
+ The 'ytype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ytype"]
+
+ @ytype.setter
+ def ytype(self, val):
+ self["ytype"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the z data.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zhoverformat
+ # ------------
+ @property
+ def zhoverformat(self):
+ """
+ Sets the hover text formatting rule using d3 formatting mini-
+ languages which are very similar to those in Python. See:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+
+ The 'zhoverformat' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["zhoverformat"]
+
+ @zhoverformat.setter
+ def zhoverformat(self, val):
+ self["zhoverformat"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsmooth
+ # -------
+ @property
+ def zsmooth(self):
+ """
+ Picks a smoothing algorithm use to smooth `z` data.
+
+ The 'zsmooth' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['fast', 'best', False]
+
+ Returns
+ -------
+ Any
+ """
+ return self["zsmooth"]
+
+ @zsmooth.setter
+ def zsmooth(self, val):
+ self["zsmooth"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.heatmap.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ connectgaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data are filled in. It is defaulted
+ to true if `z` is a one dimensional array and `zsmooth`
+ is not false; otherwise it is defaulted to false.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.heatmap.Hoverlabel`
+ instance or dict with compatible properties
+ hoverongaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data have hover labels associated
+ with them.
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.heatmap.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xgap
+ Sets the horizontal gap (in pixels) between bricks.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ygap
+ Sets the vertical gap (in pixels) between bricks.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zhoverformat
+ Sets the hover text formatting rule using d3 formatting
+ mini-languages which are very similar to those in
+ Python. See: https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsmooth
+ Picks a smoothing algorithm use to smooth `z` data.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ connectgaps=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hoverongaps=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ reversescale=None,
+ showlegend=None,
+ showscale=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ transpose=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xcalendar=None,
+ xgap=None,
+ xsrc=None,
+ xtype=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ycalendar=None,
+ ygap=None,
+ ysrc=None,
+ ytype=None,
+ z=None,
+ zauto=None,
+ zhoverformat=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsmooth=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Heatmap object
+
+ The data that describes the heatmap value-to-color mapping is
+ set in `z`. Data in `z` can either be a 2D list of values
+ (ragged or not) or a 1D array of values. In the case where `z`
+ is a 2D list, say that `z` has N rows and M columns. Then, by
+ default, the resulting heatmap will have N partitions along the
+ y axis and M partitions along the x axis. In other words, the
+ i-th row/ j-th column cell in `z` is mapped to the i-th
+ partition of the y axis (starting from the bottom of the plot)
+ and the j-th partition of the x-axis (starting from the left of
+ the plot). This behavior can be flipped by using `transpose`.
+ Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1)
+ elements. If M (N), then the coordinates correspond to the
+ center of the heatmap cells and the cells have equal width. If
+ M+1 (N+1), then the coordinates correspond to the edges of the
+ heatmap cells. In the case where `z` is a 1D list, the x and y
+ coordinates must be provided in `x` and `y` respectively to
+ form data triplets.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Heatmap`
+ 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.heatmap.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ connectgaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data are filled in. It is defaulted
+ to true if `z` is a one dimensional array and `zsmooth`
+ is not false; otherwise it is defaulted to false.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.heatmap.Hoverlabel`
+ instance or dict with compatible properties
+ hoverongaps
+ Determines whether or not gaps (i.e. {nan} or missing
+ values) in the `z` data have hover labels associated
+ with them.
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary
+ box completely, use an empty tag ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.heatmap.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xgap
+ Sets the horizontal gap (in pixels) between bricks.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ygap
+ Sets the vertical gap (in pixels) between bricks.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zhoverformat
+ Sets the hover text formatting rule using d3 formatting
+ mini-languages which are very similar to those in
+ Python. See: https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsmooth
+ Picks a smoothing algorithm use to smooth `z` data.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Heatmap
+ """
+ super(Heatmap, self).__init__("heatmap")
+
+ 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.Heatmap
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Heatmap`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("connectgaps", None)
+ _v = connectgaps if connectgaps is not None else _v
+ if _v is not None:
+ self["connectgaps"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hoverongaps", None)
+ _v = hoverongaps if hoverongaps is not None else _v
+ if _v is not None:
+ self["hoverongaps"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _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("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("showscale", None)
+ _v = showscale if showscale is not None else _v
+ if _v is not None:
+ self["showscale"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("transpose", None)
+ _v = transpose if transpose is not None else _v
+ if _v is not None:
+ self["transpose"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("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("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _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("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _v
+ _v = arg.pop("xtype", None)
+ _v = xtype if xtype is not None else _v
+ if _v is not None:
+ self["xtype"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ycalendar", None)
+ _v = ycalendar if ycalendar is not None else _v
+ if _v is not None:
+ self["ycalendar"] = _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("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+ _v = arg.pop("ytype", None)
+ _v = ytype if ytype is not None else _v
+ if _v is not None:
+ self["ytype"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zhoverformat", None)
+ _v = zhoverformat if zhoverformat is not None else _v
+ if _v is not None:
+ self["zhoverformat"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsmooth", None)
+ _v = zsmooth if zsmooth is not None else _v
+ if _v is not None:
+ self["zsmooth"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "heatmap"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_heatmapgl.py b/packages/python/plotly/plotly/graph_objs/_heatmapgl.py
new file mode 100644
index 00000000000..1de1d19171b
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_heatmapgl.py
@@ -0,0 +1,1937 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Heatmapgl(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "heatmapgl"
+ _valid_props = {
+ "autocolorscale",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "dx",
+ "dy",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "ids",
+ "idssrc",
+ "meta",
+ "metasrc",
+ "name",
+ "opacity",
+ "reversescale",
+ "showscale",
+ "stream",
+ "text",
+ "textsrc",
+ "transpose",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "x",
+ "x0",
+ "xaxis",
+ "xsrc",
+ "xtype",
+ "y",
+ "y0",
+ "yaxis",
+ "ysrc",
+ "ytype",
+ "z",
+ "zauto",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsrc",
+ }
+
+ # 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
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.heatmapgl.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", 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" 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.
+ 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".
+ 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* (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:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format
+ And for dates see:
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format
+ We add one item to d3's date formatter: "%{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.heatmap
+ gl.colorbar.Tickformatstop` instances or dicts
+ with compatible properties
+ tickformatstopdefaults
+ When used in a template (as layout.template.dat
+ a.heatmapgl.colorbar.tickformatstopdefaults),
+ sets the default property values to use for
+ elements of heatmapgl.colorbar.tickformatstops
+ ticklen
+ Sets the tick length (in px).
+ tickmode
+ Sets the tick mode for this axis. If "auto",
+ the number of ticks is set via `nticks`. If
+ "linear", the placement of the ticks is
+ determined by a starting position `tick0` and a
+ tick step `dtick` ("linear" is the default
+ value if `tick0` and `dtick` are provided). If
+ "array", the placement of the ticks is set via
+ `tickvals` and the tick text is `ticktext`.
+ ("array" is the default value if `tickvals` is
+ provided).
+ tickprefix
+ Sets a tick label prefix.
+ ticks
+ Determines whether ticks are drawn or not. If
+ "", this axis' ticks are not drawn. If
+ "outside" ("inside"), this axis' are drawn
+ outside (inside) the axis lines.
+ ticksuffix
+ Sets a tick label suffix.
+ ticktext
+ Sets the text displayed at the ticks position
+ via `tickvals`. Only has an effect if
+ `tickmode` is set to "array". Used with
+ `tickvals`.
+ ticktextsrc
+ Sets the source reference on Chart Studio Cloud
+ for ticktext .
+ tickvals
+ Sets the values at which ticks on this axis
+ appear. Only has an effect if `tickmode` is set
+ to "array". Used with `ticktext`.
+ tickvalssrc
+ Sets the source reference on Chart Studio Cloud
+ for tickvals .
+ tickwidth
+ Sets the tick width (in px).
+ title
+ :class:`plotly.graph_objects.heatmapgl.colorbar
+ .Title` instance or dict with compatible
+ properties
+ titlefont
+ Deprecated: Please use
+ heatmapgl.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
+ heatmapgl.colorbar.title.side instead.
+ Determines the location of color bar's title
+ with respect to the color bar. 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).
+ 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.
+ xpad
+ Sets the amount of padding (in px) along the x
+ direction.
+ y
+ Sets the y position of the color bar (in plot
+ fraction).
+ 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.
+ ypad
+ Sets the amount of padding (in px) along the y
+ direction.
+
+ Returns
+ -------
+ plotly.graph_objs.heatmapgl.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name string of the
+ following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
+ ridis,Cividis.
+
+ 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', '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', '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
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # dx
+ # --
+ @property
+ def dx(self):
+ """
+ Sets the x coordinate step. See `x0` for more info.
+
+ The 'dx' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dx"]
+
+ @dx.setter
+ def dx(self, val):
+ self["dx"] = val
+
+ # dy
+ # --
+ @property
+ def dy(self):
+ """
+ Sets the y coordinate step. See `y0` for more info.
+
+ The 'dy' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["dy"]
+
+ @dy.setter
+ def dy(self, val):
+ self["dy"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.heatmapgl.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.heatmapgl.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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 trace.
+
+ 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
+
+ # reversescale
+ # ------------
+ @property
+ def reversescale(self):
+ """
+ Reverses the color mapping if true. If true, `zmin` will
+ correspond to the last color in the array and `zmax` 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
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.heatmapgl.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.heatmapgl.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets the text elements associated with each z value.
+
+ The 'text' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # transpose
+ # ---------
+ @property
+ def transpose(self):
+ """
+ Transposes the z data.
+
+ The 'transpose' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["transpose"]
+
+ @transpose.setter
+ def transpose(self, val):
+ self["transpose"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the x coordinates.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # x0
+ # --
+ @property
+ def x0(self):
+ """
+ Alternate to `x`. Builds a linear space of x coordinates. Use
+ with `dx` where `x0` is the starting coordinate and `dx` the
+ step.
+
+ The 'x0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["x0"]
+
+ @x0.setter
+ def x0(self, val):
+ self["x0"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # xtype
+ # -----
+ @property
+ def xtype(self):
+ """
+ If "array", the heatmap's x coordinates are given by "x" (the
+ default behavior when `x` is provided). If "scaled", the
+ heatmap's x coordinates are given by "x0" and "dx" (the default
+ behavior when `x` is not provided).
+
+ The 'xtype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xtype"]
+
+ @xtype.setter
+ def xtype(self, val):
+ self["xtype"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the y coordinates.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # y0
+ # --
+ @property
+ def y0(self):
+ """
+ Alternate to `y`. Builds a linear space of y coordinates. Use
+ with `dy` where `y0` is the starting coordinate and `dy` the
+ step.
+
+ The 'y0' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["y0"]
+
+ @y0.setter
+ def y0(self, val):
+ self["y0"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # ytype
+ # -----
+ @property
+ def ytype(self):
+ """
+ If "array", the heatmap's y coordinates are given by "y" (the
+ default behavior when `y` is provided) If "scaled", the
+ heatmap's y coordinates are given by "y0" and "dy" (the default
+ behavior when `y` is not provided)
+
+ The 'ytype' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['array', 'scaled']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ytype"]
+
+ @ytype.setter
+ def ytype(self, val):
+ self["ytype"] = val
+
+ # z
+ # -
+ @property
+ def z(self):
+ """
+ Sets the z data.
+
+ The 'z' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["z"]
+
+ @z.setter
+ def z(self, val):
+ self["z"] = val
+
+ # zauto
+ # -----
+ @property
+ def zauto(self):
+ """
+ Determines whether or not the color domain is computed with
+ respect to the input data (here in `z`) or the bounds set in
+ `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
+ are set by the user.
+
+ The 'zauto' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["zauto"]
+
+ @zauto.setter
+ def zauto(self, val):
+ self["zauto"] = val
+
+ # zmax
+ # ----
+ @property
+ def zmax(self):
+ """
+ Sets the upper bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmin` must be set as well.
+
+ The 'zmax' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmax"]
+
+ @zmax.setter
+ def zmax(self, val):
+ self["zmax"] = val
+
+ # zmid
+ # ----
+ @property
+ def zmid(self):
+ """
+ Sets the mid-point of the color domain by scaling `zmin` and/or
+ `zmax` to be equidistant to this point. Value should have the
+ same units as in `z`. Has no effect when `zauto` is `false`.
+
+ The 'zmid' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmid"]
+
+ @zmid.setter
+ def zmid(self, val):
+ self["zmid"] = val
+
+ # zmin
+ # ----
+ @property
+ def zmin(self):
+ """
+ Sets the lower bound of the color domain. Value should have the
+ same units as in `z` and if set, `zmax` must be set as well.
+
+ The 'zmin' property is a number and may be specified as:
+ - An int or float
+
+ Returns
+ -------
+ int|float
+ """
+ return self["zmin"]
+
+ @zmin.setter
+ def zmin(self, val):
+ self["zmin"] = val
+
+ # zsrc
+ # ----
+ @property
+ def zsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for z .
+
+ The 'zsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["zsrc"]
+
+ @zsrc.setter
+ def zsrc(self, val):
+ self["zsrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.heatmapgl.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.heatmapgl.Hoverlabel`
+ instance or dict with compatible properties
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.heatmapgl.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ autocolorscale=None,
+ coloraxis=None,
+ colorbar=None,
+ colorscale=None,
+ customdata=None,
+ customdatasrc=None,
+ dx=None,
+ dy=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ ids=None,
+ idssrc=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ opacity=None,
+ reversescale=None,
+ showscale=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ transpose=None,
+ uid=None,
+ uirevision=None,
+ visible=None,
+ x=None,
+ x0=None,
+ xaxis=None,
+ xsrc=None,
+ xtype=None,
+ y=None,
+ y0=None,
+ yaxis=None,
+ ysrc=None,
+ ytype=None,
+ z=None,
+ zauto=None,
+ zmax=None,
+ zmid=None,
+ zmin=None,
+ zsrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Heatmapgl object
+
+ WebGL version of the heatmap trace type.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Heatmapgl`
+ 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.
+ coloraxis
+ Sets a reference to a shared color axis. References to
+ these shared color axes are "coloraxis", "coloraxis2",
+ "coloraxis3", etc. Settings for these shared color axes
+ are set in the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple color
+ scales can be linked to the same color axis.
+ colorbar
+ :class:`plotly.graph_objects.heatmapgl.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`zmin` and `zmax`.
+ Alternatively, `colorscale` may be a palette name
+ string of the following list: Greys,YlGnBu,Greens,YlOrR
+ d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
+ ot,Blackbody,Earth,Electric,Viridis,Cividis.
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ dx
+ Sets the x coordinate step. See `x0` for more info.
+ dy
+ Sets the y coordinate step. See `y0` for more info.
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.heatmapgl.Hoverlabel`
+ instance or dict with compatible properties
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ opacity
+ Sets the opacity of the trace.
+ reversescale
+ Reverses the color mapping if true. If true, `zmin`
+ will correspond to the last color in the array and
+ `zmax` will correspond to the first color.
+ showscale
+ Determines whether or not a colorbar is displayed for
+ this trace.
+ stream
+ :class:`plotly.graph_objects.heatmapgl.Stream` instance
+ or dict with compatible properties
+ text
+ Sets the text elements associated with each z value.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ transpose
+ Transposes the z data.
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the x coordinates.
+ x0
+ Alternate to `x`. Builds a linear space of x
+ coordinates. Use with `dx` where `x0` is the starting
+ coordinate and `dx` the step.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ xtype
+ If "array", the heatmap's x coordinates are given by
+ "x" (the default behavior when `x` is provided). If
+ "scaled", the heatmap's x coordinates are given by "x0"
+ and "dx" (the default behavior when `x` is not
+ provided).
+ y
+ Sets the y coordinates.
+ y0
+ Alternate to `y`. Builds a linear space of y
+ coordinates. Use with `dy` where `y0` is the starting
+ coordinate and `dy` the step.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ ytype
+ If "array", the heatmap's y coordinates are given by
+ "y" (the default behavior when `y` is provided) If
+ "scaled", the heatmap's y coordinates are given by "y0"
+ and "dy" (the default behavior when `y` is not
+ provided)
+ z
+ Sets the z data.
+ zauto
+ Determines whether or not the color domain is computed
+ with respect to the input data (here in `z`) or the
+ bounds set in `zmin` and `zmax` Defaults to `false`
+ when `zmin` and `zmax` are set by the user.
+ zmax
+ Sets the upper bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmin` must
+ be set as well.
+ zmid
+ Sets the mid-point of the color domain by scaling
+ `zmin` and/or `zmax` to be equidistant to this point.
+ Value should have the same units as in `z`. Has no
+ effect when `zauto` is `false`.
+ zmin
+ Sets the lower bound of the color domain. Value should
+ have the same units as in `z` and if set, `zmax` must
+ be set as well.
+ zsrc
+ Sets the source reference on Chart Studio Cloud for z
+ .
+
+ Returns
+ -------
+ Heatmapgl
+ """
+ super(Heatmapgl, self).__init__("heatmapgl")
+
+ 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.Heatmapgl
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Heatmapgl`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # 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("coloraxis", None)
+ _v = coloraxis if coloraxis is not None else _v
+ if _v is not None:
+ self["coloraxis"] = _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("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("dx", None)
+ _v = dx if dx is not None else _v
+ if _v is not None:
+ self["dx"] = _v
+ _v = arg.pop("dy", None)
+ _v = dy if dy is not None else _v
+ if _v is not None:
+ self["dy"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("opacity", None)
+ _v = opacity if opacity is not None else _v
+ if _v is not None:
+ self["opacity"] = _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
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("transpose", None)
+ _v = transpose if transpose is not None else _v
+ if _v is not None:
+ self["transpose"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("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("x0", None)
+ _v = x0 if x0 is not None else _v
+ if _v is not None:
+ self["x0"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _v
+ _v = arg.pop("xtype", None)
+ _v = xtype if xtype is not None else _v
+ if _v is not None:
+ self["xtype"] = _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("y0", None)
+ _v = y0 if y0 is not None else _v
+ if _v is not None:
+ self["y0"] = _v
+ _v = arg.pop("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+ _v = arg.pop("ytype", None)
+ _v = ytype if ytype is not None else _v
+ if _v is not None:
+ self["ytype"] = _v
+ _v = arg.pop("z", None)
+ _v = z if z is not None else _v
+ if _v is not None:
+ self["z"] = _v
+ _v = arg.pop("zauto", None)
+ _v = zauto if zauto is not None else _v
+ if _v is not None:
+ self["zauto"] = _v
+ _v = arg.pop("zmax", None)
+ _v = zmax if zmax is not None else _v
+ if _v is not None:
+ self["zmax"] = _v
+ _v = arg.pop("zmid", None)
+ _v = zmid if zmid is not None else _v
+ if _v is not None:
+ self["zmid"] = _v
+ _v = arg.pop("zmin", None)
+ _v = zmin if zmin is not None else _v
+ if _v is not None:
+ self["zmin"] = _v
+ _v = arg.pop("zsrc", None)
+ _v = zsrc if zsrc is not None else _v
+ if _v is not None:
+ self["zsrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "heatmapgl"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_histogram.py b/packages/python/plotly/plotly/graph_objs/_histogram.py
new file mode 100644
index 00000000000..ff2667b32a7
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_histogram.py
@@ -0,0 +1,2461 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Histogram(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "histogram"
+ _valid_props = {
+ "alignmentgroup",
+ "autobinx",
+ "autobiny",
+ "bingroup",
+ "cumulative",
+ "customdata",
+ "customdatasrc",
+ "error_x",
+ "error_y",
+ "histfunc",
+ "histnorm",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "hovertext",
+ "hovertextsrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "nbinsx",
+ "nbinsy",
+ "offsetgroup",
+ "opacity",
+ "orientation",
+ "selected",
+ "selectedpoints",
+ "showlegend",
+ "stream",
+ "text",
+ "textsrc",
+ "type",
+ "uid",
+ "uirevision",
+ "unselected",
+ "visible",
+ "x",
+ "xaxis",
+ "xbins",
+ "xcalendar",
+ "xsrc",
+ "y",
+ "yaxis",
+ "ybins",
+ "ycalendar",
+ "ysrc",
+ }
+
+ # alignmentgroup
+ # --------------
+ @property
+ def alignmentgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same alignmentgroup. This controls whether bars
+ compute their positional range dependently or independently.
+
+ The 'alignmentgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["alignmentgroup"]
+
+ @alignmentgroup.setter
+ def alignmentgroup(self, val):
+ self["alignmentgroup"] = val
+
+ # autobinx
+ # --------
+ @property
+ def autobinx(self):
+ """
+ Obsolete: since v1.42 each bin attribute is auto-determined
+ separately and `autobinx` is not needed. However, we accept
+ `autobinx: true` or `false` and will update `xbins` accordingly
+ before deleting `autobinx` from the trace.
+
+ The 'autobinx' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autobinx"]
+
+ @autobinx.setter
+ def autobinx(self, val):
+ self["autobinx"] = val
+
+ # autobiny
+ # --------
+ @property
+ def autobiny(self):
+ """
+ Obsolete: since v1.42 each bin attribute is auto-determined
+ separately and `autobiny` is not needed. However, we accept
+ `autobiny: true` or `false` and will update `ybins` accordingly
+ before deleting `autobiny` from the trace.
+
+ The 'autobiny' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autobiny"]
+
+ @autobiny.setter
+ def autobiny(self, val):
+ self["autobiny"] = val
+
+ # bingroup
+ # --------
+ @property
+ def bingroup(self):
+ """
+ Set a group of histogram traces which will have compatible bin
+ settings. Note that traces on the same subplot and with the
+ same "orientation" under `barmode` "stack", "relative" and
+ "group" are forced into the same bingroup, Using `bingroup`,
+ traces under `barmode` "overlay" and on different axes (of the
+ same axis type) can have compatible bin settings. Note that
+ histogram and histogram2d* trace can share the same `bingroup`
+
+ The 'bingroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["bingroup"]
+
+ @bingroup.setter
+ def bingroup(self, val):
+ self["bingroup"] = val
+
+ # cumulative
+ # ----------
+ @property
+ def cumulative(self):
+ """
+ The 'cumulative' property is an instance of Cumulative
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Cumulative`
+ - A dict of string/value properties that will be passed
+ to the Cumulative constructor
+
+ Supported dict properties:
+
+ currentbin
+ Only applies if cumulative is enabled. Sets
+ whether the current bin is included, excluded,
+ or has half of its value included in the
+ current cumulative value. "include" is the
+ default for compatibility with various other
+ tools, however it introduces a half-bin bias to
+ the results. "exclude" makes the opposite half-
+ bin bias, and "half" removes it.
+ direction
+ Only applies if cumulative is enabled. If
+ "increasing" (default) we sum all prior bins,
+ so the result increases from left to right. If
+ "decreasing" we sum later bins so the result
+ decreases from left to right.
+ enabled
+ If true, display the cumulative distribution by
+ summing the binned values. Use the `direction`
+ and `centralbin` attributes to tune the
+ accumulation method. Note: in this mode, the
+ "density" `histnorm` settings behave the same
+ as their equivalents without "density": "" and
+ "density" both rise to the number of data
+ points, and "probability" and *probability
+ density* both rise to the number of sample
+ points.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.Cumulative
+ """
+ return self["cumulative"]
+
+ @cumulative.setter
+ def cumulative(self, val):
+ self["cumulative"] = val
+
+ # customdata
+ # ----------
+ @property
+ def customdata(self):
+ """
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note that,
+ "scatter" traces also appends customdata items in the markers
+ DOM elements
+
+ The 'customdata' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["customdata"]
+
+ @customdata.setter
+ def customdata(self, val):
+ self["customdata"] = val
+
+ # customdatasrc
+ # -------------
+ @property
+ def customdatasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for customdata
+ .
+
+ The 'customdatasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["customdatasrc"]
+
+ @customdatasrc.setter
+ def customdatasrc(self, val):
+ self["customdatasrc"] = val
+
+ # error_x
+ # -------
+ @property
+ def error_x(self):
+ """
+ The 'error_x' property is an instance of ErrorX
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.ErrorX`
+ - A dict of string/value properties that will be passed
+ to the ErrorX constructor
+
+ Supported dict properties:
+
+ array
+ Sets the data corresponding the length of each
+ error bar. Values are plotted relative to the
+ underlying data.
+ arrayminus
+ Sets the data corresponding the length of each
+ error bar in the bottom (left) direction for
+ vertical (horizontal) bars Values are plotted
+ relative to the underlying data.
+ arrayminussrc
+ Sets the source reference on Chart Studio Cloud
+ for arrayminus .
+ arraysrc
+ Sets the source reference on Chart Studio Cloud
+ for array .
+ color
+ Sets the stoke color of the error bars.
+ copy_ystyle
+
+ symmetric
+ Determines whether or not the error bars have
+ the same length in both direction (top/bottom
+ for vertical bars, left/right for horizontal
+ bars.
+ thickness
+ Sets the thickness (in px) of the error bars.
+ traceref
+
+ tracerefminus
+
+ type
+ Determines the rule used to generate the error
+ bars. If *constant`, the bar lengths are of a
+ constant value. Set this constant in `value`.
+ If "percent", the bar lengths correspond to a
+ percentage of underlying data. Set this
+ percentage in `value`. If "sqrt", the bar
+ lengths correspond to the sqaure of the
+ underlying data. If "data", the bar lengths are
+ set with data set `array`.
+ value
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars.
+ valueminus
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars in the bottom
+ (left) direction for vertical (horizontal) bars
+ visible
+ Determines whether or not this set of error
+ bars is visible.
+ width
+ Sets the width (in px) of the cross-bar at both
+ ends of the error bars.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.ErrorX
+ """
+ return self["error_x"]
+
+ @error_x.setter
+ def error_x(self, val):
+ self["error_x"] = val
+
+ # error_y
+ # -------
+ @property
+ def error_y(self):
+ """
+ The 'error_y' property is an instance of ErrorY
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.ErrorY`
+ - A dict of string/value properties that will be passed
+ to the ErrorY constructor
+
+ Supported dict properties:
+
+ array
+ Sets the data corresponding the length of each
+ error bar. Values are plotted relative to the
+ underlying data.
+ arrayminus
+ Sets the data corresponding the length of each
+ error bar in the bottom (left) direction for
+ vertical (horizontal) bars Values are plotted
+ relative to the underlying data.
+ arrayminussrc
+ Sets the source reference on Chart Studio Cloud
+ for arrayminus .
+ arraysrc
+ Sets the source reference on Chart Studio Cloud
+ for array .
+ color
+ Sets the stoke color of the error bars.
+ symmetric
+ Determines whether or not the error bars have
+ the same length in both direction (top/bottom
+ for vertical bars, left/right for horizontal
+ bars.
+ thickness
+ Sets the thickness (in px) of the error bars.
+ traceref
+
+ tracerefminus
+
+ type
+ Determines the rule used to generate the error
+ bars. If *constant`, the bar lengths are of a
+ constant value. Set this constant in `value`.
+ If "percent", the bar lengths correspond to a
+ percentage of underlying data. Set this
+ percentage in `value`. If "sqrt", the bar
+ lengths correspond to the sqaure of the
+ underlying data. If "data", the bar lengths are
+ set with data set `array`.
+ value
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars.
+ valueminus
+ Sets the value of either the percentage (if
+ `type` is set to "percent") or the constant (if
+ `type` is set to "constant") corresponding to
+ the lengths of the error bars in the bottom
+ (left) direction for vertical (horizontal) bars
+ visible
+ Determines whether or not this set of error
+ bars is visible.
+ width
+ Sets the width (in px) of the cross-bar at both
+ ends of the error bars.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.ErrorY
+ """
+ return self["error_y"]
+
+ @error_y.setter
+ def error_y(self, val):
+ self["error_y"] = val
+
+ # histfunc
+ # --------
+ @property
+ def histfunc(self):
+ """
+ Specifies the binning function used for this histogram trace.
+ If "count", the histogram values are computed by counting the
+ number of values lying inside each bin. If "sum", "avg", "min",
+ "max", the histogram values are computed using the sum, the
+ average, the minimum or the maximum of the values lying inside
+ each bin respectively.
+
+ The 'histfunc' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['count', 'sum', 'avg', 'min', 'max']
+
+ Returns
+ -------
+ Any
+ """
+ return self["histfunc"]
+
+ @histfunc.setter
+ def histfunc(self, val):
+ self["histfunc"] = val
+
+ # histnorm
+ # --------
+ @property
+ def histnorm(self):
+ """
+ Specifies the type of normalization used for this histogram
+ trace. If "", the span of each bar corresponds to the number of
+ occurrences (i.e. the number of data points lying inside the
+ bins). If "percent" / "probability", the span of each bar
+ corresponds to the percentage / fraction of occurrences with
+ respect to the total number of sample points (here, the sum of
+ all bin HEIGHTS equals 100% / 1). If "density", the span of
+ each bar corresponds to the number of occurrences in a bin
+ divided by the size of the bin interval (here, the sum of all
+ bin AREAS equals the total number of sample points). If
+ *probability density*, the area of each bar corresponds to the
+ probability that an event will fall into the corresponding bin
+ (here, the sum of all bin AREAS equals 1).
+
+ The 'histnorm' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['', 'percent', 'probability', 'density', 'probability
+ density']
+
+ Returns
+ -------
+ Any
+ """
+ return self["histnorm"]
+
+ @histnorm.setter
+ def histnorm(self, val):
+ self["histnorm"] = val
+
+ # hoverinfo
+ # ---------
+ @property
+ def hoverinfo(self):
+ """
+ Determines which trace information appear on hover. If `none`
+ or `skip` are set, no information is displayed upon hovering.
+ But, if `none` is set, click and hover events are still fired.
+
+ The 'hoverinfo' property is a flaglist and may be specified
+ as a string containing:
+ - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
+ (e.g. 'x+y')
+ OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
+ - A list or array of the above
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["hoverinfo"]
+
+ @hoverinfo.setter
+ def hoverinfo(self, val):
+ self["hoverinfo"] = val
+
+ # hoverinfosrc
+ # ------------
+ @property
+ def hoverinfosrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hoverinfo
+ .
+
+ The 'hoverinfosrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hoverinfosrc"]
+
+ @hoverinfosrc.setter
+ def hoverinfosrc(self, val):
+ self["hoverinfosrc"] = val
+
+ # hoverlabel
+ # ----------
+ @property
+ def hoverlabel(self):
+ """
+ The 'hoverlabel' property is an instance of Hoverlabel
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Hoverlabel`
+ - A dict of string/value properties that will be passed
+ to the Hoverlabel constructor
+
+ Supported dict properties:
+
+ 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
+ alignsrc
+ Sets the source reference on Chart Studio Cloud
+ for align .
+ bgcolor
+ Sets the background color of the hover labels
+ for this trace
+ bgcolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bgcolor .
+ bordercolor
+ Sets the border color of the hover labels for
+ this trace.
+ bordercolorsrc
+ Sets the source reference on Chart Studio Cloud
+ for bordercolor .
+ font
+ Sets the font used in hover labels.
+ 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.
+ namelengthsrc
+ Sets the source reference on Chart Studio Cloud
+ for namelength .
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.Hoverlabel
+ """
+ return self["hoverlabel"]
+
+ @hoverlabel.setter
+ def hoverlabel(self, val):
+ self["hoverlabel"] = val
+
+ # hovertemplate
+ # -------------
+ @property
+ def hovertemplate(self):
+ """
+ Template string used for rendering the information that appear
+ on hover box. Note that this will override `hoverinfo`.
+ Variables are inserted using %{variable}, for example "y:
+ %{y}". Numbers are formatted using d3-format's syntax
+ %{variable:d3-format}, for example "Price: %{y:$.2f}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for details on
+ the formatting syntax. Dates are formatted using d3-time-
+ format's syntax %{variable|d3-time-format}, for example "Day:
+ %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for details on
+ the date formatting syntax. The variables available in
+ `hovertemplate` are the ones emitted as event data described at
+ this link https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be specified per-
+ point (the ones that are `arrayOk: true`) are available.
+ variable `binNumber` Anything contained in tag `` is
+ displayed in the secondary box, for example
+ "{fullData.name}". To hide the secondary box
+ completely, use an empty tag ``.
+
+ The 'hovertemplate' 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["hovertemplate"]
+
+ @hovertemplate.setter
+ def hovertemplate(self, val):
+ self["hovertemplate"] = val
+
+ # hovertemplatesrc
+ # ----------------
+ @property
+ def hovertemplatesrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+
+ The 'hovertemplatesrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertemplatesrc"]
+
+ @hovertemplatesrc.setter
+ def hovertemplatesrc(self, val):
+ self["hovertemplatesrc"] = val
+
+ # hovertext
+ # ---------
+ @property
+ def hovertext(self):
+ """
+ Same as `text`.
+
+ The 'hovertext' 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["hovertext"]
+
+ @hovertext.setter
+ def hovertext(self, val):
+ self["hovertext"] = val
+
+ # hovertextsrc
+ # ------------
+ @property
+ def hovertextsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for hovertext
+ .
+
+ The 'hovertextsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["hovertextsrc"]
+
+ @hovertextsrc.setter
+ def hovertextsrc(self, val):
+ self["hovertextsrc"] = val
+
+ # ids
+ # ---
+ @property
+ def ids(self):
+ """
+ Assigns id labels to each datum. These ids for object constancy
+ of data points during animation. Should be an array of strings,
+ not numbers or any other type.
+
+ The 'ids' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["ids"]
+
+ @ids.setter
+ def ids(self, val):
+ self["ids"] = val
+
+ # idssrc
+ # ------
+ @property
+ def idssrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for ids .
+
+ The 'idssrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["idssrc"]
+
+ @idssrc.setter
+ def idssrc(self, val):
+ self["idssrc"] = val
+
+ # legendgroup
+ # -----------
+ @property
+ def legendgroup(self):
+ """
+ Sets the legend group for this trace. Traces part of the same
+ legend group hide/show at the same time when toggling legend
+ items.
+
+ The 'legendgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["legendgroup"]
+
+ @legendgroup.setter
+ def legendgroup(self, val):
+ self["legendgroup"] = val
+
+ # marker
+ # ------
+ @property
+ def marker(self):
+ """
+ The 'marker' property is an instance of Marker
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Marker`
+ - A dict of string/value properties that will be passed
+ to the Marker constructor
+
+ Supported dict properties:
+
+ autocolorscale
+ Determines whether the colorscale is a default
+ palette (`autocolorscale: true`) or the palette
+ determined by `marker.colorscale`. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. 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
+ in `marker.color`) or the bounds set in
+ `marker.cmin` and `marker.cmax` Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Defaults to `false` when `marker.cmin`
+ and `marker.cmax` are set by the user.
+ cmax
+ Sets the upper bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmin` must be set as well.
+ cmid
+ Sets the mid-point of the color domain by
+ scaling `marker.cmin` and/or `marker.cmax` to
+ be equidistant to this point. Has an effect
+ only if in `marker.color`is set to a numerical
+ array. Value should have the same units as in
+ `marker.color`. Has no effect when
+ `marker.cauto` is `false`.
+ cmin
+ Sets the lower bound of the color domain. Has
+ an effect only if in `marker.color`is set to a
+ numerical array. Value should have the same
+ units as in `marker.color` and if set,
+ `marker.cmax` must be set as well.
+ color
+ Sets themarkercolor. It accepts either a
+ specific color or an array of numbers that are
+ mapped to the colorscale relative to the max
+ and min values of the array or relative to
+ `marker.cmin` and `marker.cmax` if set.
+ coloraxis
+ Sets a reference to a shared color axis.
+ References to these shared color axes are
+ "coloraxis", "coloraxis2", "coloraxis3", etc.
+ Settings for these shared color axes are set in
+ the layout, under `layout.coloraxis`,
+ `layout.coloraxis2`, etc. Note that multiple
+ color scales can be linked to the same color
+ axis.
+ colorbar
+ :class:`plotly.graph_objects.histogram.marker.C
+ olorBar` instance or dict with compatible
+ properties
+ colorscale
+ Sets the colorscale. Has an effect only if in
+ `marker.color`is set to a numerical array. 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`marker.cmin` and
+ `marker.cmax`. Alternatively, `colorscale` may
+ be a palette name string of the following list:
+ Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
+ ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
+ arth,Electric,Viridis,Cividis.
+ colorsrc
+ Sets the source reference on Chart Studio Cloud
+ for color .
+ line
+ :class:`plotly.graph_objects.histogram.marker.L
+ ine` instance or dict with compatible
+ properties
+ opacity
+ Sets the opacity of the bars.
+ opacitysrc
+ Sets the source reference on Chart Studio Cloud
+ for opacity .
+ reversescale
+ Reverses the color mapping if true. Has an
+ effect only if in `marker.color`is set to a
+ numerical array. If true, `marker.cmin` will
+ correspond to the last color in the array and
+ `marker.cmax` will correspond to the first
+ color.
+ showscale
+ Determines whether or not a colorbar is
+ displayed for this trace. Has an effect only if
+ in `marker.color`is set to a numerical array.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.Marker
+ """
+ return self["marker"]
+
+ @marker.setter
+ def marker(self, val):
+ self["marker"] = val
+
+ # meta
+ # ----
+ @property
+ def meta(self):
+ """
+ Assigns extra meta information associated with this trace that
+ can be used in various text attributes. Attributes such as
+ trace `name`, graph, axis and colorbar `title.text`, annotation
+ `text` `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta` values in
+ an attribute in the same trace, simply use `%{meta[i]}` where
+ `i` is the index or key of the `meta` item in question. To
+ access trace `meta` in layout attributes, use
+ `%{data[n[.meta[i]}` where `i` is the index or key of the
+ `meta` and `n` is the trace index.
+
+ The 'meta' property accepts values of any type
+
+ Returns
+ -------
+ Any|numpy.ndarray
+ """
+ return self["meta"]
+
+ @meta.setter
+ def meta(self, val):
+ self["meta"] = val
+
+ # metasrc
+ # -------
+ @property
+ def metasrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for meta .
+
+ The 'metasrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["metasrc"]
+
+ @metasrc.setter
+ def metasrc(self, val):
+ self["metasrc"] = val
+
+ # name
+ # ----
+ @property
+ def name(self):
+ """
+ Sets the trace name. The trace name appear as the legend item
+ and on hover.
+
+ 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
+
+ # nbinsx
+ # ------
+ @property
+ def nbinsx(self):
+ """
+ Specifies the maximum number of desired bins. This value will
+ be used in an algorithm that will decide the optimal bin size
+ such that the histogram best visualizes the distribution of the
+ data. Ignored if `xbins.size` is provided.
+
+ The 'nbinsx' 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["nbinsx"]
+
+ @nbinsx.setter
+ def nbinsx(self, val):
+ self["nbinsx"] = val
+
+ # nbinsy
+ # ------
+ @property
+ def nbinsy(self):
+ """
+ Specifies the maximum number of desired bins. This value will
+ be used in an algorithm that will decide the optimal bin size
+ such that the histogram best visualizes the distribution of the
+ data. Ignored if `ybins.size` is provided.
+
+ The 'nbinsy' 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["nbinsy"]
+
+ @nbinsy.setter
+ def nbinsy(self, val):
+ self["nbinsy"] = val
+
+ # offsetgroup
+ # -----------
+ @property
+ def offsetgroup(self):
+ """
+ Set several traces linked to the same position axis or matching
+ axes to the same offsetgroup where bars of the same position
+ coordinate will line up.
+
+ The 'offsetgroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["offsetgroup"]
+
+ @offsetgroup.setter
+ def offsetgroup(self, val):
+ self["offsetgroup"] = val
+
+ # opacity
+ # -------
+ @property
+ def opacity(self):
+ """
+ Sets the opacity of the trace.
+
+ 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
+
+ # orientation
+ # -----------
+ @property
+ def orientation(self):
+ """
+ Sets the orientation of the bars. With "v" ("h"), the value of
+ the each bar spans along the vertical (horizontal).
+
+ 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
+
+ # selected
+ # --------
+ @property
+ def selected(self):
+ """
+ The 'selected' property is an instance of Selected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Selected`
+ - A dict of string/value properties that will be passed
+ to the Selected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.histogram.selected
+ .Marker` instance or dict with compatible
+ properties
+ textfont
+ :class:`plotly.graph_objects.histogram.selected
+ .Textfont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.Selected
+ """
+ return self["selected"]
+
+ @selected.setter
+ def selected(self, val):
+ self["selected"] = val
+
+ # selectedpoints
+ # --------------
+ @property
+ def selectedpoints(self):
+ """
+ Array containing integer indices of selected points. Has an
+ effect only for traces that support selections. Note that an
+ empty array means an empty selection where the `unselected` are
+ turned on for all points, whereas, any other non-array values
+ means no selection all where the `selected` and `unselected`
+ styles have no effect.
+
+ The 'selectedpoints' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["selectedpoints"]
+
+ @selectedpoints.setter
+ def selectedpoints(self, val):
+ self["selectedpoints"] = val
+
+ # showlegend
+ # ----------
+ @property
+ def showlegend(self):
+ """
+ Determines whether or not an item corresponding to this trace
+ is shown in the legend.
+
+ The 'showlegend' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["showlegend"]
+
+ @showlegend.setter
+ def showlegend(self, val):
+ self["showlegend"] = val
+
+ # stream
+ # ------
+ @property
+ def stream(self):
+ """
+ The 'stream' property is an instance of Stream
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Stream`
+ - A dict of string/value properties that will be passed
+ to the Stream constructor
+
+ Supported dict properties:
+
+ 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
+ -------
+ plotly.graph_objs.histogram.Stream
+ """
+ return self["stream"]
+
+ @stream.setter
+ def stream(self, val):
+ self["stream"] = val
+
+ # text
+ # ----
+ @property
+ def text(self):
+ """
+ Sets hover text elements associated with each bar. If a single
+ string, the same string appears over all bars. If an array of
+ string, the items are mapped in order to the this trace's
+ coordinates.
+
+ The 'text' 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["text"]
+
+ @text.setter
+ def text(self, val):
+ self["text"] = val
+
+ # textsrc
+ # -------
+ @property
+ def textsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for text .
+
+ The 'textsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["textsrc"]
+
+ @textsrc.setter
+ def textsrc(self, val):
+ self["textsrc"] = val
+
+ # uid
+ # ---
+ @property
+ def uid(self):
+ """
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and transitions.
+
+ The 'uid' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["uid"]
+
+ @uid.setter
+ def uid(self, val):
+ self["uid"] = val
+
+ # uirevision
+ # ----------
+ @property
+ def uirevision(self):
+ """
+ Controls persistence of some user-driven changes to the trace:
+ `constraintrange` in `parcoords` traces, as well as some
+ `editable: true` modifications such as `name` and
+ `colorbar.title`. Defaults to `layout.uirevision`. Note that
+ other user-driven trace attribute changes are controlled by
+ `layout` attributes: `trace.visible` is controlled by
+ `layout.legend.uirevision`, `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)` (accessible
+ with `config: {editable: true}`) is controlled by
+ `layout.editrevision`. Trace changes are tracked by `uid`,
+ which only falls back on trace index if no `uid` is provided.
+ So if your app can add/remove traces before the end of the
+ `data` array, such that the same trace has a different index,
+ you can still preserve user-driven changes if you give each
+ trace a `uid` that stays with it as it moves.
+
+ The 'uirevision' property accepts values of any type
+
+ Returns
+ -------
+ Any
+ """
+ return self["uirevision"]
+
+ @uirevision.setter
+ def uirevision(self, val):
+ self["uirevision"] = val
+
+ # unselected
+ # ----------
+ @property
+ def unselected(self):
+ """
+ The 'unselected' property is an instance of Unselected
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.Unselected`
+ - A dict of string/value properties that will be passed
+ to the Unselected constructor
+
+ Supported dict properties:
+
+ marker
+ :class:`plotly.graph_objects.histogram.unselect
+ ed.Marker` instance or dict with compatible
+ properties
+ textfont
+ :class:`plotly.graph_objects.histogram.unselect
+ ed.Textfont` instance or dict with compatible
+ properties
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.Unselected
+ """
+ return self["unselected"]
+
+ @unselected.setter
+ def unselected(self, val):
+ self["unselected"] = val
+
+ # visible
+ # -------
+ @property
+ def visible(self):
+ """
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as a
+ legend item (provided that the legend itself is visible).
+
+ The 'visible' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ [True, False, 'legendonly']
+
+ Returns
+ -------
+ Any
+ """
+ return self["visible"]
+
+ @visible.setter
+ def visible(self, val):
+ self["visible"] = val
+
+ # x
+ # -
+ @property
+ def x(self):
+ """
+ Sets the sample data to be binned on the x axis.
+
+ The 'x' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["x"]
+
+ @x.setter
+ def x(self, val):
+ self["x"] = val
+
+ # xaxis
+ # -----
+ @property
+ def xaxis(self):
+ """
+ Sets a reference between this trace's x coordinates and a 2D
+ cartesian x axis. If "x" (the default value), the x coordinates
+ refer to `layout.xaxis`. If "x2", the x coordinates refer to
+ `layout.xaxis2`, and so on.
+
+ The 'xaxis' property is an identifier of a particular
+ subplot, of type 'x', that may be specified as the string 'x'
+ optionally followed by an integer >= 1
+ (e.g. 'x', 'x1', 'x2', 'x3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["xaxis"]
+
+ @xaxis.setter
+ def xaxis(self, val):
+ self["xaxis"] = val
+
+ # xbins
+ # -----
+ @property
+ def xbins(self):
+ """
+ The 'xbins' property is an instance of XBins
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.XBins`
+ - A dict of string/value properties that will be passed
+ to the XBins constructor
+
+ Supported dict properties:
+
+ end
+ Sets the end value for the x axis bins. The
+ last bin may not end exactly at this value, we
+ increment the bin edge by `size` from `start`
+ until we reach or exceed `end`. Defaults to the
+ maximum data value. Like `start`, for dates use
+ a date string, and for category data `end` is
+ based on the category serial numbers.
+ size
+ Sets the size of each x axis bin. Default
+ behavior: If `nbinsx` is 0 or omitted, we
+ choose a nice round bin size such that the
+ number of bins is about the same as the typical
+ number of samples in each bin. If `nbinsx` is
+ provided, we choose a nice round bin size
+ giving no more than that many bins. For date
+ data, use milliseconds or "M" for months, as
+ in `axis.dtick`. For category data, the number
+ of categories to bin together (always defaults
+ to 1). If multiple non-overlaying histograms
+ share a subplot, the first explicit `size` is
+ used and all others discarded. If no `size` is
+ provided,the sample data from all traces is
+ combined to determine `size` as described
+ above.
+ start
+ Sets the starting value for the x axis bins.
+ Defaults to the minimum data value, shifted
+ down if necessary to make nice round values and
+ to remove ambiguous bin edges. For example, if
+ most of the data is integers we shift the bin
+ edges 0.5 down, so a `size` of 5 would have a
+ default `start` of -0.5, so it is clear that
+ 0-4 are in the first bin, 5-9 in the second,
+ but continuous data gets a start of 0 and bins
+ [0,5), [5,10) etc. Dates behave similarly, and
+ `start` should be a date string. For category
+ data, `start` is based on the category serial
+ numbers, and defaults to -0.5. If multiple non-
+ overlaying histograms share a subplot, the
+ first explicit `start` is used exactly and all
+ others are shifted down (if necessary) to
+ differ from that one by an integer number of
+ bins.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.XBins
+ """
+ return self["xbins"]
+
+ @xbins.setter
+ def xbins(self, val):
+ self["xbins"] = val
+
+ # xcalendar
+ # ---------
+ @property
+ def xcalendar(self):
+ """
+ Sets the calendar system to use with `x` date data.
+
+ The 'xcalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["xcalendar"]
+
+ @xcalendar.setter
+ def xcalendar(self, val):
+ self["xcalendar"] = val
+
+ # xsrc
+ # ----
+ @property
+ def xsrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for x .
+
+ The 'xsrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["xsrc"]
+
+ @xsrc.setter
+ def xsrc(self, val):
+ self["xsrc"] = val
+
+ # y
+ # -
+ @property
+ def y(self):
+ """
+ Sets the sample data to be binned on the y axis.
+
+ The 'y' property is an array that may be specified as a tuple,
+ list, numpy array, or pandas Series
+
+ Returns
+ -------
+ numpy.ndarray
+ """
+ return self["y"]
+
+ @y.setter
+ def y(self, val):
+ self["y"] = val
+
+ # yaxis
+ # -----
+ @property
+ def yaxis(self):
+ """
+ Sets a reference between this trace's y coordinates and a 2D
+ cartesian y axis. If "y" (the default value), the y coordinates
+ refer to `layout.yaxis`. If "y2", the y coordinates refer to
+ `layout.yaxis2`, and so on.
+
+ The 'yaxis' property is an identifier of a particular
+ subplot, of type 'y', that may be specified as the string 'y'
+ optionally followed by an integer >= 1
+ (e.g. 'y', 'y1', 'y2', 'y3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["yaxis"]
+
+ @yaxis.setter
+ def yaxis(self, val):
+ self["yaxis"] = val
+
+ # ybins
+ # -----
+ @property
+ def ybins(self):
+ """
+ The 'ybins' property is an instance of YBins
+ that may be specified as:
+ - An instance of :class:`plotly.graph_objs.histogram.YBins`
+ - A dict of string/value properties that will be passed
+ to the YBins constructor
+
+ Supported dict properties:
+
+ end
+ Sets the end value for the y axis bins. The
+ last bin may not end exactly at this value, we
+ increment the bin edge by `size` from `start`
+ until we reach or exceed `end`. Defaults to the
+ maximum data value. Like `start`, for dates use
+ a date string, and for category data `end` is
+ based on the category serial numbers.
+ size
+ Sets the size of each y axis bin. Default
+ behavior: If `nbinsy` is 0 or omitted, we
+ choose a nice round bin size such that the
+ number of bins is about the same as the typical
+ number of samples in each bin. If `nbinsy` is
+ provided, we choose a nice round bin size
+ giving no more than that many bins. For date
+ data, use milliseconds or "M" for months, as
+ in `axis.dtick`. For category data, the number
+ of categories to bin together (always defaults
+ to 1). If multiple non-overlaying histograms
+ share a subplot, the first explicit `size` is
+ used and all others discarded. If no `size` is
+ provided,the sample data from all traces is
+ combined to determine `size` as described
+ above.
+ start
+ Sets the starting value for the y axis bins.
+ Defaults to the minimum data value, shifted
+ down if necessary to make nice round values and
+ to remove ambiguous bin edges. For example, if
+ most of the data is integers we shift the bin
+ edges 0.5 down, so a `size` of 5 would have a
+ default `start` of -0.5, so it is clear that
+ 0-4 are in the first bin, 5-9 in the second,
+ but continuous data gets a start of 0 and bins
+ [0,5), [5,10) etc. Dates behave similarly, and
+ `start` should be a date string. For category
+ data, `start` is based on the category serial
+ numbers, and defaults to -0.5. If multiple non-
+ overlaying histograms share a subplot, the
+ first explicit `start` is used exactly and all
+ others are shifted down (if necessary) to
+ differ from that one by an integer number of
+ bins.
+
+ Returns
+ -------
+ plotly.graph_objs.histogram.YBins
+ """
+ return self["ybins"]
+
+ @ybins.setter
+ def ybins(self, val):
+ self["ybins"] = val
+
+ # ycalendar
+ # ---------
+ @property
+ def ycalendar(self):
+ """
+ Sets the calendar system to use with `y` date data.
+
+ The 'ycalendar' property is an enumeration that may be specified as:
+ - One of the following enumeration values:
+ ['gregorian', 'chinese', 'coptic', 'discworld',
+ 'ethiopian', 'hebrew', 'islamic', 'julian', 'mayan',
+ 'nanakshahi', 'nepali', 'persian', 'jalali', 'taiwan',
+ 'thai', 'ummalqura']
+
+ Returns
+ -------
+ Any
+ """
+ return self["ycalendar"]
+
+ @ycalendar.setter
+ def ycalendar(self, val):
+ self["ycalendar"] = val
+
+ # ysrc
+ # ----
+ @property
+ def ysrc(self):
+ """
+ Sets the source reference on Chart Studio Cloud for y .
+
+ The 'ysrc' property must be specified as a string or
+ as a plotly.grid_objs.Column object
+
+ Returns
+ -------
+ str
+ """
+ return self["ysrc"]
+
+ @ysrc.setter
+ def ysrc(self, val):
+ self["ysrc"] = val
+
+ # type
+ # ----
+ @property
+ def type(self):
+ return self._props["type"]
+
+ # Self properties description
+ # ---------------------------
+ @property
+ def _prop_descriptions(self):
+ return """\
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ autobinx
+ Obsolete: since v1.42 each bin attribute is auto-
+ determined separately and `autobinx` is not needed.
+ However, we accept `autobinx: true` or `false` and will
+ update `xbins` accordingly before deleting `autobinx`
+ from the trace.
+ autobiny
+ Obsolete: since v1.42 each bin attribute is auto-
+ determined separately and `autobiny` is not needed.
+ However, we accept `autobiny: true` or `false` and will
+ update `ybins` accordingly before deleting `autobiny`
+ from the trace.
+ bingroup
+ Set a group of histogram traces which will have
+ compatible bin settings. Note that traces on the same
+ subplot and with the same "orientation" under `barmode`
+ "stack", "relative" and "group" are forced into the
+ same bingroup, Using `bingroup`, traces under `barmode`
+ "overlay" and on different axes (of the same axis type)
+ can have compatible bin settings. Note that histogram
+ and histogram2d* trace can share the same `bingroup`
+ cumulative
+ :class:`plotly.graph_objects.histogram.Cumulative`
+ instance or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ error_x
+ :class:`plotly.graph_objects.histogram.ErrorX` instance
+ or dict with compatible properties
+ error_y
+ :class:`plotly.graph_objects.histogram.ErrorY` instance
+ or dict with compatible properties
+ histfunc
+ Specifies the binning function used for this histogram
+ trace. If "count", the histogram values are computed by
+ counting the number of values lying inside each bin. If
+ "sum", "avg", "min", "max", the histogram values are
+ computed using the sum, the average, the minimum or the
+ maximum of the values lying inside each bin
+ respectively.
+ histnorm
+ Specifies the type of normalization used for this
+ histogram trace. If "", the span of each bar
+ corresponds to the number of occurrences (i.e. the
+ number of data points lying inside the bins). If
+ "percent" / "probability", the span of each bar
+ corresponds to the percentage / fraction of occurrences
+ with respect to the total number of sample points
+ (here, the sum of all bin HEIGHTS equals 100% / 1). If
+ "density", the span of each bar corresponds to the
+ number of occurrences in a bin divided by the size of
+ the bin interval (here, the sum of all bin AREAS equals
+ the total number of sample points). If *probability
+ density*, the area of each bar corresponds to the
+ probability that an event will fall into the
+ corresponding bin (here, the sum of all bin AREAS
+ equals 1).
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.histogram.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `binNumber` Anything contained
+ in tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.histogram.Marker` instance
+ or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ nbinsx
+ Specifies the maximum number of desired bins. This
+ value will be used in an algorithm that will decide the
+ optimal bin size such that the histogram best
+ visualizes the distribution of the data. Ignored if
+ `xbins.size` is provided.
+ nbinsy
+ Specifies the maximum number of desired bins. This
+ value will be used in an algorithm that will decide the
+ optimal bin size such that the histogram best
+ visualizes the distribution of the data. Ignored if
+ `ybins.size` is provided.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the bars. With "v" ("h"), the
+ value of the each bar spans along the vertical
+ (horizontal).
+ selected
+ :class:`plotly.graph_objects.histogram.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.histogram.Stream` instance
+ or dict with compatible properties
+ text
+ Sets hover text elements associated with each bar. If a
+ single string, the same string appears over all bars.
+ If an array of string, the items are mapped in order to
+ the this trace's coordinates.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.histogram.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the sample data to be binned on the x axis.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xbins
+ :class:`plotly.graph_objects.histogram.XBins` instance
+ or dict with compatible properties
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the sample data to be binned on the y axis.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ybins
+ :class:`plotly.graph_objects.histogram.YBins` instance
+ or dict with compatible properties
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+ """
+
+ def __init__(
+ self,
+ arg=None,
+ alignmentgroup=None,
+ autobinx=None,
+ autobiny=None,
+ bingroup=None,
+ cumulative=None,
+ customdata=None,
+ customdatasrc=None,
+ error_x=None,
+ error_y=None,
+ histfunc=None,
+ histnorm=None,
+ hoverinfo=None,
+ hoverinfosrc=None,
+ hoverlabel=None,
+ hovertemplate=None,
+ hovertemplatesrc=None,
+ hovertext=None,
+ hovertextsrc=None,
+ ids=None,
+ idssrc=None,
+ legendgroup=None,
+ marker=None,
+ meta=None,
+ metasrc=None,
+ name=None,
+ nbinsx=None,
+ nbinsy=None,
+ offsetgroup=None,
+ opacity=None,
+ orientation=None,
+ selected=None,
+ selectedpoints=None,
+ showlegend=None,
+ stream=None,
+ text=None,
+ textsrc=None,
+ uid=None,
+ uirevision=None,
+ unselected=None,
+ visible=None,
+ x=None,
+ xaxis=None,
+ xbins=None,
+ xcalendar=None,
+ xsrc=None,
+ y=None,
+ yaxis=None,
+ ybins=None,
+ ycalendar=None,
+ ysrc=None,
+ **kwargs
+ ):
+ """
+ Construct a new Histogram object
+
+ The sample data from which statistics are computed is set in
+ `x` for vertically spanning histograms and in `y` for
+ horizontally spanning histograms. Binning options are set
+ `xbins` and `ybins` respectively if no aggregation data is
+ provided.
+
+ Parameters
+ ----------
+ arg
+ dict of properties compatible with this constructor or
+ an instance of :class:`plotly.graph_objs.Histogram`
+ alignmentgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same alignmentgroup. This controls
+ whether bars compute their positional range dependently
+ or independently.
+ autobinx
+ Obsolete: since v1.42 each bin attribute is auto-
+ determined separately and `autobinx` is not needed.
+ However, we accept `autobinx: true` or `false` and will
+ update `xbins` accordingly before deleting `autobinx`
+ from the trace.
+ autobiny
+ Obsolete: since v1.42 each bin attribute is auto-
+ determined separately and `autobiny` is not needed.
+ However, we accept `autobiny: true` or `false` and will
+ update `ybins` accordingly before deleting `autobiny`
+ from the trace.
+ bingroup
+ Set a group of histogram traces which will have
+ compatible bin settings. Note that traces on the same
+ subplot and with the same "orientation" under `barmode`
+ "stack", "relative" and "group" are forced into the
+ same bingroup, Using `bingroup`, traces under `barmode`
+ "overlay" and on different axes (of the same axis type)
+ can have compatible bin settings. Note that histogram
+ and histogram2d* trace can share the same `bingroup`
+ cumulative
+ :class:`plotly.graph_objects.histogram.Cumulative`
+ instance or dict with compatible properties
+ customdata
+ Assigns extra data each datum. This may be useful when
+ listening to hover, click and selection events. Note
+ that, "scatter" traces also appends customdata items in
+ the markers DOM elements
+ customdatasrc
+ Sets the source reference on Chart Studio Cloud for
+ customdata .
+ error_x
+ :class:`plotly.graph_objects.histogram.ErrorX` instance
+ or dict with compatible properties
+ error_y
+ :class:`plotly.graph_objects.histogram.ErrorY` instance
+ or dict with compatible properties
+ histfunc
+ Specifies the binning function used for this histogram
+ trace. If "count", the histogram values are computed by
+ counting the number of values lying inside each bin. If
+ "sum", "avg", "min", "max", the histogram values are
+ computed using the sum, the average, the minimum or the
+ maximum of the values lying inside each bin
+ respectively.
+ histnorm
+ Specifies the type of normalization used for this
+ histogram trace. If "", the span of each bar
+ corresponds to the number of occurrences (i.e. the
+ number of data points lying inside the bins). If
+ "percent" / "probability", the span of each bar
+ corresponds to the percentage / fraction of occurrences
+ with respect to the total number of sample points
+ (here, the sum of all bin HEIGHTS equals 100% / 1). If
+ "density", the span of each bar corresponds to the
+ number of occurrences in a bin divided by the size of
+ the bin interval (here, the sum of all bin AREAS equals
+ the total number of sample points). If *probability
+ density*, the area of each bar corresponds to the
+ probability that an event will fall into the
+ corresponding bin (here, the sum of all bin AREAS
+ equals 1).
+ hoverinfo
+ Determines which trace information appear on hover. If
+ `none` or `skip` are set, no information is displayed
+ upon hovering. But, if `none` is set, click and hover
+ events are still fired.
+ hoverinfosrc
+ Sets the source reference on Chart Studio Cloud for
+ hoverinfo .
+ hoverlabel
+ :class:`plotly.graph_objects.histogram.Hoverlabel`
+ instance or dict with compatible properties
+ hovertemplate
+ Template string used for rendering the information that
+ appear on hover box. Note that this will override
+ `hoverinfo`. Variables are inserted using %{variable},
+ for example "y: %{y}". Numbers are formatted using
+ d3-format's syntax %{variable:d3-format}, for example
+ "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Formatting.md#d3_format for
+ details on the formatting syntax. Dates are formatted
+ using d3-time-format's syntax %{variable|d3-time-
+ format}, for example "Day: %{2019-01-01|%A}".
+ https://github.com/d3/d3-3.x-api-
+ reference/blob/master/Time-Formatting.md#format for
+ details on the date formatting syntax. The variables
+ available in `hovertemplate` are the ones emitted as
+ event data described at this link
+ https://plotly.com/javascript/plotlyjs-events/#event-
+ data. Additionally, every attributes that can be
+ specified per-point (the ones that are `arrayOk: true`)
+ are available. variable `binNumber` Anything contained
+ in tag `` is displayed in the secondary box, for
+ example "{fullData.name}". To hide the
+ secondary box completely, use an empty tag
+ ``.
+ hovertemplatesrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertemplate .
+ hovertext
+ Same as `text`.
+ hovertextsrc
+ Sets the source reference on Chart Studio Cloud for
+ hovertext .
+ ids
+ Assigns id labels to each datum. These ids for object
+ constancy of data points during animation. Should be an
+ array of strings, not numbers or any other type.
+ idssrc
+ Sets the source reference on Chart Studio Cloud for
+ ids .
+ legendgroup
+ Sets the legend group for this trace. Traces part of
+ the same legend group hide/show at the same time when
+ toggling legend items.
+ marker
+ :class:`plotly.graph_objects.histogram.Marker` instance
+ or dict with compatible properties
+ meta
+ Assigns extra meta information associated with this
+ trace that can be used in various text attributes.
+ Attributes such as trace `name`, graph, axis and
+ colorbar `title.text`, annotation `text`
+ `rangeselector`, `updatemenues` and `sliders` `label`
+ text all support `meta`. To access the trace `meta`
+ values in an attribute in the same trace, simply use
+ `%{meta[i]}` where `i` is the index or key of the
+ `meta` item in question. To access trace `meta` in
+ layout attributes, use `%{data[n[.meta[i]}` where `i`
+ is the index or key of the `meta` and `n` is the trace
+ index.
+ metasrc
+ Sets the source reference on Chart Studio Cloud for
+ meta .
+ name
+ Sets the trace name. The trace name appear as the
+ legend item and on hover.
+ nbinsx
+ Specifies the maximum number of desired bins. This
+ value will be used in an algorithm that will decide the
+ optimal bin size such that the histogram best
+ visualizes the distribution of the data. Ignored if
+ `xbins.size` is provided.
+ nbinsy
+ Specifies the maximum number of desired bins. This
+ value will be used in an algorithm that will decide the
+ optimal bin size such that the histogram best
+ visualizes the distribution of the data. Ignored if
+ `ybins.size` is provided.
+ offsetgroup
+ Set several traces linked to the same position axis or
+ matching axes to the same offsetgroup where bars of the
+ same position coordinate will line up.
+ opacity
+ Sets the opacity of the trace.
+ orientation
+ Sets the orientation of the bars. With "v" ("h"), the
+ value of the each bar spans along the vertical
+ (horizontal).
+ selected
+ :class:`plotly.graph_objects.histogram.Selected`
+ instance or dict with compatible properties
+ selectedpoints
+ Array containing integer indices of selected points.
+ Has an effect only for traces that support selections.
+ Note that an empty array means an empty selection where
+ the `unselected` are turned on for all points, whereas,
+ any other non-array values means no selection all where
+ the `selected` and `unselected` styles have no effect.
+ showlegend
+ Determines whether or not an item corresponding to this
+ trace is shown in the legend.
+ stream
+ :class:`plotly.graph_objects.histogram.Stream` instance
+ or dict with compatible properties
+ text
+ Sets hover text elements associated with each bar. If a
+ single string, the same string appears over all bars.
+ If an array of string, the items are mapped in order to
+ the this trace's coordinates.
+ textsrc
+ Sets the source reference on Chart Studio Cloud for
+ text .
+ uid
+ Assign an id to this trace, Use this to provide object
+ constancy between traces during animations and
+ transitions.
+ uirevision
+ Controls persistence of some user-driven changes to the
+ trace: `constraintrange` in `parcoords` traces, as well
+ as some `editable: true` modifications such as `name`
+ and `colorbar.title`. Defaults to `layout.uirevision`.
+ Note that other user-driven trace attribute changes are
+ controlled by `layout` attributes: `trace.visible` is
+ controlled by `layout.legend.uirevision`,
+ `selectedpoints` is controlled by
+ `layout.selectionrevision`, and `colorbar.(x|y)`
+ (accessible with `config: {editable: true}`) is
+ controlled by `layout.editrevision`. Trace changes are
+ tracked by `uid`, which only falls back on trace index
+ if no `uid` is provided. So if your app can add/remove
+ traces before the end of the `data` array, such that
+ the same trace has a different index, you can still
+ preserve user-driven changes if you give each trace a
+ `uid` that stays with it as it moves.
+ unselected
+ :class:`plotly.graph_objects.histogram.Unselected`
+ instance or dict with compatible properties
+ visible
+ Determines whether or not this trace is visible. If
+ "legendonly", the trace is not drawn, but can appear as
+ a legend item (provided that the legend itself is
+ visible).
+ x
+ Sets the sample data to be binned on the x axis.
+ xaxis
+ Sets a reference between this trace's x coordinates and
+ a 2D cartesian x axis. If "x" (the default value), the
+ x coordinates refer to `layout.xaxis`. If "x2", the x
+ coordinates refer to `layout.xaxis2`, and so on.
+ xbins
+ :class:`plotly.graph_objects.histogram.XBins` instance
+ or dict with compatible properties
+ xcalendar
+ Sets the calendar system to use with `x` date data.
+ xsrc
+ Sets the source reference on Chart Studio Cloud for x
+ .
+ y
+ Sets the sample data to be binned on the y axis.
+ yaxis
+ Sets a reference between this trace's y coordinates and
+ a 2D cartesian y axis. If "y" (the default value), the
+ y coordinates refer to `layout.yaxis`. If "y2", the y
+ coordinates refer to `layout.yaxis2`, and so on.
+ ybins
+ :class:`plotly.graph_objects.histogram.YBins` instance
+ or dict with compatible properties
+ ycalendar
+ Sets the calendar system to use with `y` date data.
+ ysrc
+ Sets the source reference on Chart Studio Cloud for y
+ .
+
+ Returns
+ -------
+ Histogram
+ """
+ super(Histogram, self).__init__("histogram")
+
+ if "_parent" in kwargs:
+ self._parent = kwargs["_parent"]
+ return
+
+ # Validate arg
+ # ------------
+ if arg is None:
+ arg = {}
+ elif isinstance(arg, self.__class__):
+ arg = arg.to_plotly_json()
+ elif isinstance(arg, dict):
+ arg = _copy.copy(arg)
+ else:
+ raise ValueError(
+ """\
+The first argument to the plotly.graph_objs.Histogram
+constructor must be a dict or
+an instance of :class:`plotly.graph_objs.Histogram`"""
+ )
+
+ # Handle skip_invalid
+ # -------------------
+ self._skip_invalid = kwargs.pop("skip_invalid", False)
+
+ # Populate data dict with properties
+ # ----------------------------------
+ _v = arg.pop("alignmentgroup", None)
+ _v = alignmentgroup if alignmentgroup is not None else _v
+ if _v is not None:
+ self["alignmentgroup"] = _v
+ _v = arg.pop("autobinx", None)
+ _v = autobinx if autobinx is not None else _v
+ if _v is not None:
+ self["autobinx"] = _v
+ _v = arg.pop("autobiny", None)
+ _v = autobiny if autobiny is not None else _v
+ if _v is not None:
+ self["autobiny"] = _v
+ _v = arg.pop("bingroup", None)
+ _v = bingroup if bingroup is not None else _v
+ if _v is not None:
+ self["bingroup"] = _v
+ _v = arg.pop("cumulative", None)
+ _v = cumulative if cumulative is not None else _v
+ if _v is not None:
+ self["cumulative"] = _v
+ _v = arg.pop("customdata", None)
+ _v = customdata if customdata is not None else _v
+ if _v is not None:
+ self["customdata"] = _v
+ _v = arg.pop("customdatasrc", None)
+ _v = customdatasrc if customdatasrc is not None else _v
+ if _v is not None:
+ self["customdatasrc"] = _v
+ _v = arg.pop("error_x", None)
+ _v = error_x if error_x is not None else _v
+ if _v is not None:
+ self["error_x"] = _v
+ _v = arg.pop("error_y", None)
+ _v = error_y if error_y is not None else _v
+ if _v is not None:
+ self["error_y"] = _v
+ _v = arg.pop("histfunc", None)
+ _v = histfunc if histfunc is not None else _v
+ if _v is not None:
+ self["histfunc"] = _v
+ _v = arg.pop("histnorm", None)
+ _v = histnorm if histnorm is not None else _v
+ if _v is not None:
+ self["histnorm"] = _v
+ _v = arg.pop("hoverinfo", None)
+ _v = hoverinfo if hoverinfo is not None else _v
+ if _v is not None:
+ self["hoverinfo"] = _v
+ _v = arg.pop("hoverinfosrc", None)
+ _v = hoverinfosrc if hoverinfosrc is not None else _v
+ if _v is not None:
+ self["hoverinfosrc"] = _v
+ _v = arg.pop("hoverlabel", None)
+ _v = hoverlabel if hoverlabel is not None else _v
+ if _v is not None:
+ self["hoverlabel"] = _v
+ _v = arg.pop("hovertemplate", None)
+ _v = hovertemplate if hovertemplate is not None else _v
+ if _v is not None:
+ self["hovertemplate"] = _v
+ _v = arg.pop("hovertemplatesrc", None)
+ _v = hovertemplatesrc if hovertemplatesrc is not None else _v
+ if _v is not None:
+ self["hovertemplatesrc"] = _v
+ _v = arg.pop("hovertext", None)
+ _v = hovertext if hovertext is not None else _v
+ if _v is not None:
+ self["hovertext"] = _v
+ _v = arg.pop("hovertextsrc", None)
+ _v = hovertextsrc if hovertextsrc is not None else _v
+ if _v is not None:
+ self["hovertextsrc"] = _v
+ _v = arg.pop("ids", None)
+ _v = ids if ids is not None else _v
+ if _v is not None:
+ self["ids"] = _v
+ _v = arg.pop("idssrc", None)
+ _v = idssrc if idssrc is not None else _v
+ if _v is not None:
+ self["idssrc"] = _v
+ _v = arg.pop("legendgroup", None)
+ _v = legendgroup if legendgroup is not None else _v
+ if _v is not None:
+ self["legendgroup"] = _v
+ _v = arg.pop("marker", None)
+ _v = marker if marker is not None else _v
+ if _v is not None:
+ self["marker"] = _v
+ _v = arg.pop("meta", None)
+ _v = meta if meta is not None else _v
+ if _v is not None:
+ self["meta"] = _v
+ _v = arg.pop("metasrc", None)
+ _v = metasrc if metasrc is not None else _v
+ if _v is not None:
+ self["metasrc"] = _v
+ _v = arg.pop("name", None)
+ _v = name if name is not None else _v
+ if _v is not None:
+ self["name"] = _v
+ _v = arg.pop("nbinsx", None)
+ _v = nbinsx if nbinsx is not None else _v
+ if _v is not None:
+ self["nbinsx"] = _v
+ _v = arg.pop("nbinsy", None)
+ _v = nbinsy if nbinsy is not None else _v
+ if _v is not None:
+ self["nbinsy"] = _v
+ _v = arg.pop("offsetgroup", None)
+ _v = offsetgroup if offsetgroup is not None else _v
+ if _v is not None:
+ self["offsetgroup"] = _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("orientation", None)
+ _v = orientation if orientation is not None else _v
+ if _v is not None:
+ self["orientation"] = _v
+ _v = arg.pop("selected", None)
+ _v = selected if selected is not None else _v
+ if _v is not None:
+ self["selected"] = _v
+ _v = arg.pop("selectedpoints", None)
+ _v = selectedpoints if selectedpoints is not None else _v
+ if _v is not None:
+ self["selectedpoints"] = _v
+ _v = arg.pop("showlegend", None)
+ _v = showlegend if showlegend is not None else _v
+ if _v is not None:
+ self["showlegend"] = _v
+ _v = arg.pop("stream", None)
+ _v = stream if stream is not None else _v
+ if _v is not None:
+ self["stream"] = _v
+ _v = arg.pop("text", None)
+ _v = text if text is not None else _v
+ if _v is not None:
+ self["text"] = _v
+ _v = arg.pop("textsrc", None)
+ _v = textsrc if textsrc is not None else _v
+ if _v is not None:
+ self["textsrc"] = _v
+ _v = arg.pop("uid", None)
+ _v = uid if uid is not None else _v
+ if _v is not None:
+ self["uid"] = _v
+ _v = arg.pop("uirevision", None)
+ _v = uirevision if uirevision is not None else _v
+ if _v is not None:
+ self["uirevision"] = _v
+ _v = arg.pop("unselected", None)
+ _v = unselected if unselected is not None else _v
+ if _v is not None:
+ self["unselected"] = _v
+ _v = arg.pop("visible", None)
+ _v = visible if visible is not None else _v
+ if _v is not None:
+ self["visible"] = _v
+ _v = arg.pop("x", None)
+ _v = x if x is not None else _v
+ if _v is not None:
+ self["x"] = _v
+ _v = arg.pop("xaxis", None)
+ _v = xaxis if xaxis is not None else _v
+ if _v is not None:
+ self["xaxis"] = _v
+ _v = arg.pop("xbins", None)
+ _v = xbins if xbins is not None else _v
+ if _v is not None:
+ self["xbins"] = _v
+ _v = arg.pop("xcalendar", None)
+ _v = xcalendar if xcalendar is not None else _v
+ if _v is not None:
+ self["xcalendar"] = _v
+ _v = arg.pop("xsrc", None)
+ _v = xsrc if xsrc is not None else _v
+ if _v is not None:
+ self["xsrc"] = _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("yaxis", None)
+ _v = yaxis if yaxis is not None else _v
+ if _v is not None:
+ self["yaxis"] = _v
+ _v = arg.pop("ybins", None)
+ _v = ybins if ybins is not None else _v
+ if _v is not None:
+ self["ybins"] = _v
+ _v = arg.pop("ycalendar", None)
+ _v = ycalendar if ycalendar is not None else _v
+ if _v is not None:
+ self["ycalendar"] = _v
+ _v = arg.pop("ysrc", None)
+ _v = ysrc if ysrc is not None else _v
+ if _v is not None:
+ self["ysrc"] = _v
+
+ # Read-only literals
+ # ------------------
+
+ self._props["type"] = "histogram"
+ arg.pop("type", None)
+
+ # Process unknown kwargs
+ # ----------------------
+ self._process_kwargs(**dict(arg, **kwargs))
+
+ # Reset skip_invalid
+ # ------------------
+ self._skip_invalid = False
diff --git a/packages/python/plotly/plotly/graph_objs/_histogram2d.py b/packages/python/plotly/plotly/graph_objs/_histogram2d.py
new file mode 100644
index 00000000000..54e9259dd30
--- /dev/null
+++ b/packages/python/plotly/plotly/graph_objs/_histogram2d.py
@@ -0,0 +1,2632 @@
+from plotly.basedatatypes import BaseTraceType as _BaseTraceType
+import copy as _copy
+
+
+class Histogram2d(_BaseTraceType):
+
+ # class properties
+ # --------------------
+ _parent_path_str = ""
+ _path_str = "histogram2d"
+ _valid_props = {
+ "autobinx",
+ "autobiny",
+ "autocolorscale",
+ "bingroup",
+ "coloraxis",
+ "colorbar",
+ "colorscale",
+ "customdata",
+ "customdatasrc",
+ "histfunc",
+ "histnorm",
+ "hoverinfo",
+ "hoverinfosrc",
+ "hoverlabel",
+ "hovertemplate",
+ "hovertemplatesrc",
+ "ids",
+ "idssrc",
+ "legendgroup",
+ "marker",
+ "meta",
+ "metasrc",
+ "name",
+ "nbinsx",
+ "nbinsy",
+ "opacity",
+ "reversescale",
+ "showlegend",
+ "showscale",
+ "stream",
+ "type",
+ "uid",
+ "uirevision",
+ "visible",
+ "x",
+ "xaxis",
+ "xbingroup",
+ "xbins",
+ "xcalendar",
+ "xgap",
+ "xsrc",
+ "y",
+ "yaxis",
+ "ybingroup",
+ "ybins",
+ "ycalendar",
+ "ygap",
+ "ysrc",
+ "z",
+ "zauto",
+ "zhoverformat",
+ "zmax",
+ "zmid",
+ "zmin",
+ "zsmooth",
+ "zsrc",
+ }
+
+ # autobinx
+ # --------
+ @property
+ def autobinx(self):
+ """
+ Obsolete: since v1.42 each bin attribute is auto-determined
+ separately and `autobinx` is not needed. However, we accept
+ `autobinx: true` or `false` and will update `xbins` accordingly
+ before deleting `autobinx` from the trace.
+
+ The 'autobinx' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autobinx"]
+
+ @autobinx.setter
+ def autobinx(self, val):
+ self["autobinx"] = val
+
+ # autobiny
+ # --------
+ @property
+ def autobiny(self):
+ """
+ Obsolete: since v1.42 each bin attribute is auto-determined
+ separately and `autobiny` is not needed. However, we accept
+ `autobiny: true` or `false` and will update `ybins` accordingly
+ before deleting `autobiny` from the trace.
+
+ The 'autobiny' property must be specified as a bool
+ (either True, or False)
+
+ Returns
+ -------
+ bool
+ """
+ return self["autobiny"]
+
+ @autobiny.setter
+ def autobiny(self, val):
+ self["autobiny"] = val
+
+ # 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
+
+ # bingroup
+ # --------
+ @property
+ def bingroup(self):
+ """
+ Set the `xbingroup` and `ybingroup` default prefix For example,
+ setting a `bingroup` of 1 on two histogram2d traces will make
+ them their x-bins and y-bins match separately.
+
+ The 'bingroup' property is a string and must be specified as:
+ - A string
+ - A number that will be converted to a string
+
+ Returns
+ -------
+ str
+ """
+ return self["bingroup"]
+
+ @bingroup.setter
+ def bingroup(self, val):
+ self["bingroup"] = val
+
+ # coloraxis
+ # ---------
+ @property
+ def coloraxis(self):
+ """
+ Sets a reference to a shared color axis. References to these
+ shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
+ etc. Settings for these shared color axes are set in the
+ layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
+ Note that multiple color scales can be linked to the same color
+ axis.
+
+ The 'coloraxis' property is an identifier of a particular
+ subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
+ optionally followed by an integer >= 1
+ (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
+
+ Returns
+ -------
+ str
+ """
+ return self["coloraxis"]
+
+ @coloraxis.setter
+ def coloraxis(self, val):
+ self["coloraxis"] = 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.histogram2d.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", 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" 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.
+ 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".
+ 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