diff --git a/makefile b/makefile
index aa5a9447399..75002f70ecb 100644
--- a/makefile
+++ b/makefile
@@ -43,7 +43,12 @@ sync_chunked : submodules/chunked_requests
sync_refs : submodules/graph_reference
@echo ""
@echo "Syncing graph_reference directories"
- rsync -r submodules/graph_reference plotly/
+ rm -rf plotly/graph_reference
+ mkdir plotly/graph_reference
+ cp submodules/graph_reference/graph_objs/python/graph_objs_meta.json plotly/graph_reference
+ cp submodules/graph_reference/graph_objs/python/KEY_TO_NAME.json plotly/graph_reference
+ cp submodules/graph_reference/graph_objs/python/NAME_TO_KEY.json plotly/graph_reference
+ cp submodules/graph_reference/graph_objs/python/OBJ_MAP.json plotly/graph_reference
pull_refs : submodules/graph_reference
@echo ""
diff --git a/plotly/graph_objs/__init__.py b/plotly/graph_objs/__init__.py
index c154c522334..80d6c90c600 100644
--- a/plotly/graph_objs/__init__.py
+++ b/plotly/graph_objs/__init__.py
@@ -14,5 +14,5 @@
Histogram2d, Histogram2dContour, Scatter, Annotation, AngularAxis,
ColorBar, Contours, ErrorX, ErrorY, Figure, Font, Layout, Legend,
Line, Margin, Marker, RadialAxis, Stream, Trace, XAxis, XBins, YAxis,
- YBins
+ YBins, Scatter3d, Surface, Scene, ZAxis, ErrorZ
)
diff --git a/plotly/graph_objs/graph_objs.py b/plotly/graph_objs/graph_objs.py
index 6f74901a31d..b22984db278 100644
--- a/plotly/graph_objs/graph_objs.py
+++ b/plotly/graph_objs/graph_objs.py
@@ -25,230 +25,23 @@
from __future__ import absolute_import
import warnings
-import textwrap
import six
-import sys
from plotly.graph_objs import graph_objs_tools
+from plotly.graph_objs.graph_objs_tools import (
+ INFO, OBJ_MAP, NAME_TO_KEY, KEY_TO_NAME
+)
import copy
from plotly import exceptions
-from plotly import utils
-
+import sys
if sys.version[:3] == '2.6':
from ordereddict import OrderedDict
- import simplejson as json
else:
from collections import OrderedDict
- import json
__all__ = None
-# TODO: BIG ONE, how should exceptions bubble up in this inheritance scheme?
- # TODO: related, WHAT exceptions should bubble up?
-
-from pkg_resources import resource_string
-s = resource_string('plotly',
- 'graph_reference/graph_objs_meta.json').decode('utf-8')
-INFO = json.loads(s, object_pairs_hook=OrderedDict)
-
-INFO = utils.decode_unicode(INFO)
-
-# define how to map from keys in INFO to a class
-# mapping: (n->m, m < n)
-KEY_TO_NAME = dict(
- plotlylist='PlotlyList',
- data='Data',
- angularaxis='AngularAxis',
- annotations='Annotations',
- area='Area',
- plotlydict='PlotlyDict',
- plotlytrace='PlotlyTrace',
- bar='Bar',
- box='Box',
- contour='Contour',
- heatmap='Heatmap',
- histogram='Histogram',
- histogram2d='Histogram2d',
- histogram2dcontour='Histogram2dContour',
- scatter='Scatter',
- annotation='Annotation',
- colorbar='ColorBar',
- contours='Contours',
- error_x='ErrorX',
- error_y='ErrorY',
- figure='Figure',
- font='Font',
- layout='Layout',
- legend='Legend',
- line='Line',
- margin='Margin',
- marker='Marker',
- radialaxis='RadialAxis',
- stream='Stream',
- trace='Trace',
- textfont='Font',
- tickfont='Font',
- titlefont='Font',
- xaxis='XAxis',
- xbins='XBins',
- yaxis='YAxis',
- ybins='YBins'
-)
-
-# define how to map from a class name to a key name in INFO
-# mapping: (n->n)
-NAME_TO_KEY = dict(
- PlotlyList='plotlylist',
- Data='data',
- AngularAxis='angularaxis',
- Annotations='annotations',
- PlotlyDict='plotlydict',
- PlotlyTrace='plotlytrace',
- Area='area',
- Bar='bar',
- Box='box',
- Contour='contour',
- Heatmap='heatmap',
- Histogram='histogram',
- Histogram2d='histogram2d',
- Histogram2dContour='histogram2dcontour',
- Scatter='scatter',
- Annotation='annotation',
- ColorBar='colorbar',
- Contours='contours',
- ErrorX='error_x',
- ErrorY='error_y',
- Figure='figure',
- Font='font',
- Layout='layout',
- Legend='legend',
- Line='line',
- Margin='margin',
- Marker='marker',
- RadialAxis='radialaxis',
- Stream='stream',
- Trace='trace',
- XAxis='xaxis',
- XBins='xbins',
- YAxis='yaxis',
- YBins='ybins'
-)
-
-
-class ListMeta(type):
- """A meta class for PlotlyList class creation.
-
- The sole purpose of this meta class is to properly create the __doc__
- attribute so that running help(Obj), where Obj is a subclass of PlotlyList,
- will return useful information for that object.
- """
-
- def __new__(mcs, name, bases, attrs):
- doc = attrs['__doc__']
- tab_size = 4
- min_indent = min([len(a) - len(b)
- for a, b in zip(doc.splitlines(),
- [l.lstrip()
- for l in doc.splitlines()])])
- doc = "".join([line[min_indent:] + '\n' for line in doc.splitlines()])
- # Add section header for method list...
- doc += "Quick method reference:\n\n"
- doc += "\t{0}.".format(name) + "\n\t{0}.".format(name).join(
- ["update(changes)", "strip_style()", "get_data()",
- "to_graph_objs()", "validate()", "to_string()",
- "force_clean()"]) + "\n\n"
- attrs['__doc__'] = doc.expandtabs(tab_size)
- return super(ListMeta, mcs).__new__(mcs, name, bases, attrs)
-
-
-class DictMeta(type):
- """A meta class for PlotlyDict class creation.
-
- The sole purpose of this meta class is to properly create the __doc__
- attribute so that running help(Obj), where Obj is a subclass of PlotlyDict,
- will return information about key-value pairs for that object.
-
- """
- def __new__(mcs, name, bases, attrs):
- obj_key = NAME_TO_KEY[name]
- # remove min indentation...
- doc = attrs['__doc__']
- obj_info = INFO[obj_key]
- line_size = 76
- tab_size = 4
- min_indent = min([len(a) - len(b)
- for a, b in zip(doc.splitlines(),
- [l.lstrip()
- for l in doc.splitlines()])])
- doc = "".join([line[min_indent:] + '\n' for line in doc.splitlines()])
- # Add section header for method list...
- doc += "Quick method reference:\n\n"
- doc += "\t{0}.".format(name) + "\n\t{0}.".format(name).join(
- ["update(changes)", "strip_style()", "get_data()",
- "to_graph_objs()", "validate()", "to_string()",
- "force_clean()"]) + "\n\n"
- # Add section header
- if len(obj_info):
- doc += "Valid keys:\n\n"
- # Add each key one-by-one and format
- width1 = line_size-tab_size
- width2 = line_size-2*tab_size
- width3 = line_size-3*tab_size
- undocumented = "Aw, snap! Undocumented!"
- for key in obj_info:
- # main portion of documentation
- try:
- required = str(obj_info[key]['required'])
- except KeyError:
- required = undocumented
-
- try:
- typ = str(obj_info[key]['type'])
- except KeyError:
- typ = undocumented
-
- try:
- val_types = str(obj_info[key]['val_types'])
- if typ == 'object':
- val_types = "{0} object | ".format(KEY_TO_NAME[key])+\
- val_types
- except KeyError:
- val_types = undocumented
- try:
- descr = str(obj_info[key]['description'])
- except KeyError:
- descr = undocumented
- str_1 = "{0} [required={1}] (value={2})".format(
- key, required, val_types)
- if "streamable" in obj_info[key] and obj_info[key]["streamable"]:
- str_1 += " (streamable)"
- str_1 += ":\n"
- str_1 = "\t" + "\n\t".join(textwrap.wrap(str_1,
- width=width1)) + "\n"
- str_2 = "\t\t" + "\n\t\t".join(textwrap.wrap(descr,
- width=width2)) + "\n"
- doc += str_1 + str_2
- # if a user can run help on this value, tell them!
- if typ == "object":
- doc += "\n\t\tFor more, run `help(plotly.graph_objs.{0" \
- "})`\n".format(KEY_TO_NAME[key])
- # if example usage exists, tell them!
- if 'examples' in obj_info[key]:
- ex = "\n\t\tExamples:\n" + "\t\t\t"
- ex += "\n\t\t\t".join(
- textwrap.wrap(str(obj_info[key]['examples']),
- width=width3)) + "\n"
- doc += ex
- if 'code' in obj_info[key]:
- code = "\n\t\tCode snippet:"
- code += "\n\t\t\t>>>".join(
- str(obj_info[key]['code']).split('>>>')) + "\n"
- doc += code
- doc += '\n'
- attrs['__doc__'] = doc.expandtabs(tab_size)
- return super(DictMeta, mcs).__new__(mcs, name, bases, attrs)
-
-@six.add_metaclass(ListMeta)
+# (1) Make primitive graph objects
class PlotlyList(list):
"""A container for PlotlyDicts, inherits from standard list.
@@ -305,7 +98,7 @@ def to_graph_objs(self, caller=True):
if isinstance(entry, PlotlyDict):
try:
entry.to_graph_objs(caller=False)
- except (exceptions.PlotlyGraphObjectError) as err:
+ except exceptions.PlotlyGraphObjectError as err:
err.add_to_error_path(index)
err.prepare()
raise # re-raise current exception
@@ -314,7 +107,6 @@ def to_graph_objs(self, caller=True):
index=index,
entry=entry)
-
def update(self, changes, make_copies=False):
"""Update current list with changed_list, which must be iterable.
The 'changes' should be a list of dictionaries, however,
@@ -324,7 +116,7 @@ def update(self, changes, make_copies=False):
multiple items in a list will cause the items to all reference the same
original set of objects. To change this behavior add
`make_copies=True` which makes deep copies of the update items and
- therefore break references.
+ therefore break references.
"""
if isinstance(changes, dict):
@@ -341,7 +133,6 @@ def update(self, changes, make_copies=False):
else:
self[index].update(update)
-
def strip_style(self):
"""Strip style from the current representation.
@@ -349,7 +140,7 @@ def strip_style(self):
stripping process, though they made be left empty. This is allowable.
Keys that will be stripped in this process are tagged with
- `'type': 'style'` in the INFO dictionary listed in graph_objs_meta.py.
+ `'type': 'style'` in graph_objs_meta.json.
This process first attempts to convert nested collections from dicts
or lists to subclasses of PlotlyList/PlotlyDict. This process forces
@@ -406,12 +197,17 @@ def validate(self, caller=True):
raise
else:
raise exceptions.PlotlyGraphObjectError( # TODO!!!
- message="uh-oh, this error shouldn't have happenend.",
- plain_message="uh-oh, this error shouldn't have happenend.",
+ message=(
+ "uh-oh, this error shouldn't have happenend."
+ ),
+ plain_message=(
+ "uh-oh, this error shouldn't have happenend."
+ ),
path=[index],
)
- def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
+ def to_string(self, level=0, indent=4, eol='\n',
+ pretty=True, max_chars=80):
"""Returns a formatted string showing graph_obj constructors.
Example:
@@ -421,7 +217,7 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
Keyword arguments:
level (default = 0) -- set number of indentations to start with
indent (default = 4) -- set indentation amount
- eol (default = '\n') -- set end of line character(s)
+ eol (default = '\\n') -- set end of line character(s)
pretty (default = True) -- curtail long list output with a '...'
max_chars (default = 80) -- set max characters per line
@@ -443,7 +239,8 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
string += ",{eol}{indent}".format(
eol=eol,
indent=' ' * indent * (level + 1))
- string += "{eol}{indent}])".format(eol=eol, indent=' ' * indent * level)
+ string += (
+ "{eol}{indent}])").format(eol=eol, indent=' ' * indent * level)
return string
def get_ordered(self, caller=True):
@@ -460,7 +257,6 @@ def get_ordered(self, caller=True):
ordered_list += [entry.get_ordered()]
return ordered_list
-
def force_clean(self, caller=True):
"""Attempts to convert to graph_objs and calls force_clean() on entries.
@@ -484,7 +280,7 @@ def force_clean(self, caller=True):
del self[index - del_ct]
del_ct += 1
-@six.add_metaclass(DictMeta)
+
class PlotlyDict(dict):
"""A base dict class for all objects that style a figure in plotly.
@@ -570,7 +366,7 @@ def strip_style(self):
stripping process, though they made be left empty. This is allowable.
Keys that will be stripped in this process are tagged with
- `'type': 'style'` in the INFO dictionary listed in graph_objs_meta.py.
+ `'type': 'style'` in graph_objs_meta.json.
This process first attempts to convert nested collections from dicts
or lists to subclasses of PlotlyList/PlotlyDict. This process forces
@@ -589,7 +385,7 @@ def strip_style(self):
self[key].strip_style()
else:
try:
- if INFO[obj_key][key]['type'] == 'style':
+ if INFO[obj_key]['keymeta'][key]['key_type'] == 'style':
if isinstance(self[key], six.string_types):
del self[key]
elif not hasattr(self[key], '__iter__'):
@@ -609,7 +405,8 @@ def get_data(self):
d[key] = val.get_data()
else:
try:
- if INFO[obj_key][key]['type'] == 'data': # TODO: Update the JSON
+ # TODO: Update the JSON
+ if INFO[obj_key]['keymeta'][key]['key_type'] == 'data':
d[key] = val
except KeyError:
pass
@@ -652,14 +449,17 @@ def to_graph_objs(self, caller=True):
err.add_to_error_path(key)
err.prepare()
raise
- elif key in INFO[info_key] and 'type' in INFO[info_key][key]:
- if INFO[info_key][key]['type'] == 'object':
+ elif (key in INFO[info_key]['keymeta'].keys() and
+ 'key_type' in INFO[info_key]['keymeta'][key].keys()):
+ if INFO[info_key]['keymeta'][key]['key_type'] == 'object':
class_name = KEY_TO_NAME[key]
- obj = NAME_TO_CLASS[class_name]() # gets constructor
+ obj = get_class_instance_by_name(class_name)
if isinstance(obj, PlotlyDict):
if not isinstance(self[key], dict):
try:
- val_types = INFO[info_key][key]['val_types']
+ val_types = (
+ INFO[info_key]['keymeta'][key]['val_types']
+ )
except KeyError:
val_types = 'undocumented'
raise exceptions.PlotlyDictValueError(
@@ -674,7 +474,9 @@ def to_graph_objs(self, caller=True):
else: # if not PlotlyDict, it MUST be a PlotlyList
if not isinstance(self[key], list):
try:
- val_types = INFO[info_key][key]['val_types']
+ val_types = (
+ INFO[info_key]['keymeta'][key]['val_types']
+ )
except KeyError:
val_types = 'undocumented'
raise exceptions.PlotlyDictValueError( # TODO!!!
@@ -697,7 +499,7 @@ def validate(self, caller=True): # TODO: validate values too?
"""Recursively check the validity of the keys in a PlotlyDict.
The valid keys constitute the entries in each object
- dictionary in INFO stored in graph_objs_meta.py.
+ dictionary in graph_objs_meta.json
The validation process first requires that all nested collections be
converted to the appropriate subclass of PlotlyDict/PlotlyList. Then,
@@ -721,12 +523,13 @@ def validate(self, caller=True): # TODO: validate values too?
err.prepare()
raise
else:
- if key in INFO[obj_key]:
- if 'type' not in INFO[obj_key][key]:
+ if key in INFO[obj_key]['keymeta'].keys():
+ if 'key_type' not in INFO[obj_key]['keymeta'][key].keys():
continue # TODO: 'type' may not be documented yet!
- if INFO[obj_key][key]['type'] == 'object':
+ if INFO[obj_key]['keymeta'][key]['key_type'] == 'object':
try:
- val_types = INFO[obj_key][key]['val_types']
+ val_types = (
+ INFO[obj_key]['keymeta'][key]['val_types'])
except KeyError:
val_types = 'undocumented'
raise exceptions.PlotlyDictValueError(
@@ -736,7 +539,8 @@ def validate(self, caller=True): # TODO: validate values too?
val_types=val_types
)
else:
- matching_objects = [obj for obj in INFO if key in INFO[obj]]
+ matching_objects = [obj for obj in
+ INFO if key in INFO[obj]['keymeta']]
notes = ''
if len(matching_objects):
notes += "That key is valid only in these objects:\n\n"
@@ -744,7 +548,8 @@ def validate(self, caller=True): # TODO: validate values too?
notes += "\t{0}".format(KEY_TO_NAME[obj])
try:
notes += '({0}="{1}")\n'.format(
- repr(key), INFO[obj][key]['val_types'])
+ repr(key),
+ INFO[obj]['keymeta'][key]['val_types'])
except KeyError:
notes += '({0}="..")\n'.format(repr(key))
notes.expandtabs()
@@ -755,7 +560,8 @@ def validate(self, caller=True): # TODO: validate values too?
key=key,
notes=notes)
- def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
+ def to_string(self, level=0, indent=4, eol='\n',
+ pretty=True, max_chars=80):
"""Returns a formatted string showing graph_obj constructors.
Example:
@@ -765,7 +571,7 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
Keyword arguments:
level (default = 0) -- set number of indentations to start with
indent (default = 4) -- set indentation amount
- eol (default = '\n') -- set end of line character(s)
+ eol (default = '\\n') -- set end of line character(s)
pretty (default = True) -- curtail long list output with a '...'
max_chars (default = 80) -- set max characters per line
@@ -776,7 +582,8 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
string = "{name}(".format(name=self.__class__.__name__)
index = 0
obj_key = NAME_TO_KEY[self.__class__.__name__]
- for key in INFO[obj_key]: # this sets the order of the keys! nice.
+ # This sets the order of the keys! nice.
+ for key in INFO[obj_key]['keymeta']:
if key in self:
index += 1
string += "{eol}{indent}{key}=".format(
@@ -841,8 +648,9 @@ def get_ordered(self, caller=True):
obj_type = NAME_TO_KEY[self.__class__.__name__]
ordered_dict = OrderedDict()
# grab keys like xaxis1, xaxis2, etc...
- unordered_keys = [key for key in self if key not in INFO[obj_type]]
- for key in INFO[obj_type]:
+ unordered_keys = [key for key in self
+ if key not in INFO[obj_type]['keymeta']]
+ for key in INFO[obj_type]['keymeta']:
if key in self:
if isinstance(self[key], (PlotlyDict, PlotlyList)):
ordered_dict[key] = self[key].get_ordered(caller=False)
@@ -855,7 +663,6 @@ def get_ordered(self, caller=True):
ordered_dict[key] = self[key]
return ordered_dict
-
def force_clean(self, caller=True):
"""Attempts to convert to graph_objs and call force_clean() on values.
@@ -869,7 +676,8 @@ def force_clean(self, caller=True):
obj_key = NAME_TO_KEY[self.__class__.__name__]
if caller:
self.to_graph_objs(caller=False)
- del_keys = [key for key in self if str(key) not in INFO[obj_key]]
+ del_keys = [key for key in self
+ if str(key) not in INFO[obj_key]['keymeta']]
for key in del_keys:
del self[key]
keys = list(self.keys())
@@ -885,102 +693,6 @@ def force_clean(self, caller=True):
del self[key]
-class Data(PlotlyList):
- """A list of traces to be shown on a plot/graph.
-
- Any operation that can be done with a standard list may be used with Data.
- Instantiation requires an iterable (just like list does), for example:
-
- Data([Scatter(), Heatmap(), Box()])
-
- Valid entry types: (dict or any subclass of Trace, i.e., Scatter, Box, etc.)
-
- """
- def to_graph_objs(self, caller=True): # TODO TODO TODO! check logic!
- """Change any nested collections to subclasses of PlotlyDict/List.
-
- Procedure:
- 1. Attempt to convert all entries to a subclass of PlotlyTrace.
- 2. Call `to_graph_objects` on each of these entries.
-
- """
- for index, entry in enumerate(self):
- if isinstance(entry, PlotlyDict):
- self[index] = NAME_TO_CLASS[entry.__class__.__name__](entry)
- elif isinstance(entry, dict):
- if 'type' not in entry: # assume 'scatter' if not given
- entry['type'] = 'scatter'
- try:
- obj_name = KEY_TO_NAME[entry['type']]
- except KeyError:
- raise exceptions.PlotlyDataTypeError(
- obj=self,
- index=index
- )
- obj = NAME_TO_CLASS[obj_name]() # don't hide if KeyError!
- for k, v in list(entry.items()):
- obj[k] = v
- self[index] = obj
- if not isinstance(self[index], PlotlyTrace): # Trace ONLY!!!
- raise exceptions.PlotlyListEntryError(
- obj=self,
- index=index,
- notes="The entry could not be converted into a PlotlyTrace "
- "object (e.g., Scatter, Heatmap, Bar, etc).",
- )
- super(Data, self).to_graph_objs(caller=caller)
-
-
-class Annotations(PlotlyList):
- """A list-like object to contain all figure notes.
-
- Any operation that can be done with a standard list may be used with
- Annotations. Instantiation requires an iterable (just like list does),
- for example:
-
- Annotations([Annotation(), Annotation(), Annotation()])
-
- This Annotations list is validated upon instantiation, meaning exceptions
- will be thrown if any invalid entries are found.
-
- Valid entry types: (dict or Annotation)
-
- For help on Annotation, run `help(plotly.graph_objs.Annotation)`
-
- """
- def to_graph_objs(self, caller=True):
- """Change any nested collections to subclasses of PlotlyDict/List.
-
- Procedure:
- 1. Attempt to convert all entries to a subclass of PlotlyDict.
- 2. Call `to_graph_objects` on each of these entries.
-
- """
- for index, entry in enumerate(self):
- if isinstance(entry, (PlotlyDict, PlotlyList)):
- if not isinstance(entry, Annotation):
- raise exceptions.PlotlyListEntryError(
- obj=self,
- index=index,
- notes="The entry could not be converted into an "
- "Annotation object because it was already a "
- "different kind of graph object.",
- )
- elif isinstance(entry, dict):
- obj = Annotation()
- for k, v in list(entry.items()):
- obj[k] = v
- self[index] = obj
- else:
- raise exceptions.PlotlyListEntryError(
- obj=self,
- index=index,
- notes="The entry could not be converted into an Annotation "
- "object because it was not a dictionary.",
- )
- super(Annotations, self).to_graph_objs(caller=caller)
-
-
class PlotlyTrace(PlotlyDict):
"""A general data class for plotly.
@@ -1002,7 +714,8 @@ def __init__(self, *args, **kwargs):
"dictionary-like plot types.\nIt is not meant to be "
"a user interface.")
- def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
+ def to_string(self, level=0, indent=4, eol='\n',
+ pretty=True, max_chars=80):
"""Returns a formatted string showing graph_obj constructors.
Example:
@@ -1012,7 +725,7 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
Keyword arguments:
level (default = 0) -- set number of indentations to start with
indent (default = 4) -- set indentation amount
- eol (default = '\n') -- set end of line character(s)
+ eol (default = '\\n') -- set end of line character(s)
pretty (default = True) -- curtail long list output with a '...'
max_chars (default = 80) -- set max characters per line
@@ -1054,197 +767,106 @@ class Trace(PlotlyTrace):
pass
-class Area(PlotlyTrace):
- """A dictionary-like object for representing an area chart in plotly.
-
- """
- pass
-
-
-class Bar(PlotlyTrace):
- """A dictionary-like object for representing a bar chart in plotly.
-
- Example:
-
- py.plot([Bar(x=['yesterday', 'today', 'tomorrow'], y=[5, 4, 10])])
-
- """
- pass
-
-
-class Box(PlotlyTrace):
- """A dictionary-like object for representing a box plot in plotly.
-
- Example:
-
- py.plot([Box(name='boxy', y=[1,3,9,2,4,2,3,5,2])])
-
- """
- pass
-
-
-class Contour(PlotlyTrace):
- """A dictionary-like object for representing a contour plot in plotly.
-
- Example:
-
- z = [[0, 1, 0, 1, 0],
- [1, 0, 1, 0, 1],
- [0, 1, 0, 1, 0],]
- y = ['a', 'b', 'c']
- x = [1, 2, 3, 4, 5]
- py.plot([Contour(z=z, x=x, y=y)])
-
- """
- pass
-
-
-class Heatmap(PlotlyTrace):
- """A dictionary-like object for representing a heatmap in plotly.
-
- Example:
-
- z = [[0, 1, 0, 1, 0],
- [1, 0, 1, 0, 1],
- [0, 1, 0, 1, 0],]
- y = ['a', 'b', 'c']
- x = [1, 2, 3, 4, 5]
- py.plot([Heatmap(z=z, x=x, y=y)])
-
- """
- pass
-
-
-class Histogram(PlotlyTrace):
- """A dictionary-like object for representing a histogram plot in plotly.
-
- Example:
- # make a histogram along xaxis...
- py.plot([Histogram(x=[1,1,2,3,2,3,3])])
+# (2) Generate graph objects using OBJ_MAP
+# With type(name, bases, dict) :
+# - name will be the new class name
+# - bases are the base classes that the new class inherits from
+# - dict holds attributes for the new class, e.g., __doc__
+for obj in OBJ_MAP:
+ base_name = graph_objs_tools.OBJ_MAP[obj]['base_name']
+ if base_name == 'PlotlyList':
+ doc = graph_objs_tools.make_list_doc(obj)
+ else:
+ doc = graph_objs_tools.make_dict_doc(obj)
+ base = globals()[base_name]
+ globals()[obj] = type(obj, (base,), {'__doc__': doc, '__name__': obj})
- # make a histogram along yaxis...
- py.plot([Histogram(y=[1,1,2,3,2,3,3], orientation='h')])
-
- """
-
-
-class Histogram2d(PlotlyTrace):
- """A dictionary-like object for representing a histogram2d plot in plotly.
-
- Example:
-
- import numpy as np
- x = np.random.randn(500)
- y = np.random.randn(500)+1
- py.iplot([Histogram2d(x=x, y=y)])
-
- """
- pass
+# (3) Patch 'custom' methods into some graph objects
+def get_patched_data_class(Data):
+ def to_graph_objs(self, caller=True): # TODO TODO TODO! check logic!
+ """Change any nested collections to subclasses of PlotlyDict/List.
-class Histogram2dContour(PlotlyTrace):
- """A dict-like object for representing a histogram2d-contour plot in plotly.
-
- Example:
-
- import numpy as np
- x = np.random.randn(500)
- y = np.random.randn(500)+1
- py.iplot([Histogram2dcountour(x=x, y=y)])
-
- """
- pass
-
-
-class Scatter(PlotlyTrace):
- """A dictionary-like object for representing a scatter plot in plotly.
-
- Example:
-
- py.plot([Scatter(name='tacters', x=[1,4,2,3], y=[1,6,2,1])])
-
- """
- pass
-
-
-class AngularAxis(PlotlyDict):
- """A dictionary-like object for representing an angular axis in plotly.
-
- """
- pass
-
-
-class RadialAxis(PlotlyDict):
- """A dictionary-like object for representing an angular axis in plotly.
-
- """
- pass
-
-
-class Annotation(PlotlyDict):
- """A dictionary-like object for representing an annotation in plotly.
-
- Annotations appear as notes on the final figure. You can set all the
- features of the annotation text, background color, and location.
- Additionally, these notes can be anchored to actual data or the page for
- help with location after pan-and-zoom actions.
-
- This object is validated upon instantiation, therefore, you may see
- exceptions getting thrown. These are intended to help users find the
- origin of errors faster. The errors will usually contain information that
- can be used to remedy the problem.
-
- Example:
-
- note = Annotation(text='what i want this to say is:
THIS!',
- x=0,
- y=0,
- xref='paper',
- yref='paper,
- yanchor='bottom',
- xanchor='left')
-
- """
- pass
-
-
-class ColorBar(PlotlyDict): # TODO: ?
- """A dictionary-like object for representing a color bar in plotly.
-
- """
- pass
-
-
-class Contours(PlotlyDict): # TODO: ?
- """A dictionary-like object for representing a contours object in plotly.
-
- This object exists inside definitions for a contour plot.
-
- """
-
-class ErrorX(PlotlyDict):
- """A dictionary-like object for representing a set of errorx bars in plotly.
+ Procedure:
+ 1. Attempt to convert all entries to a subclass of PlotlyTrace.
+ 2. Call `to_graph_objects` on each of these entries.
- """
- pass
+ """
+ for index, entry in enumerate(self):
+ if isinstance(entry, PlotlyDict):
+ self[index] = get_class_instance_by_name(
+ entry.__class__.__name__, entry)
+ elif isinstance(entry, dict):
+ if 'type' not in entry: # assume 'scatter' if not given
+ entry['type'] = 'scatter'
+ try:
+ obj_name = KEY_TO_NAME[entry['type']]
+ except KeyError:
+ raise exceptions.PlotlyDataTypeError(
+ obj=self,
+ index=index
+ )
+ obj = get_class_instance_by_name(obj_name)
+ for k, v in list(entry.items()):
+ obj[k] = v
+ self[index] = obj
+ if not isinstance(self[index], PlotlyTrace): # Trace ONLY!!!
+ raise exceptions.PlotlyListEntryError(
+ obj=self,
+ index=index,
+ notes=(
+ "The entry could not be converted into a PlotlyTrace "
+ "object (e.g., Scatter, Heatmap, Bar, etc)."
+ ),
+ )
+ super(Data, self).to_graph_objs(caller=caller)
+ Data.to_graph_objs = to_graph_objs # override method!
+ return Data
+Data = get_patched_data_class(Data)
-class ErrorY(PlotlyDict):
- """A dictionary-like object for representing a set of errory bars in plotly.
- """
- pass
+def get_patched_annotations_class(Annotations):
+ def to_graph_objs(self, caller=True):
+ """Change any nested collections to subclasses of PlotlyDict/List.
+ Procedure:
+ 1. Attempt to convert all entries to a subclass of PlotlyDict.
+ 2. Call `to_graph_objects` on each of these entries.
-class Figure(PlotlyDict):
- """A dictionary-like object representing a figure to be rendered in plotly.
+ """
+ for index, entry in enumerate(self):
+ if isinstance(entry, (PlotlyDict, PlotlyList)):
+ if not isinstance(entry, NAME_TO_CLASS['Annotation']):
+ raise exceptions.PlotlyListEntryError(
+ obj=self,
+ index=index,
+ notes="The entry could not be converted into an "
+ "Annotation object because it was already a "
+ "different kind of graph object.",
+ )
+ elif isinstance(entry, dict):
+ obj = get_class_instance_by_name('Annotation')
+ for k, v in list(entry.items()):
+ obj[k] = v
+ self[index] = obj
+ else:
+ raise exceptions.PlotlyListEntryError(
+ obj=self,
+ index=index,
+ notes=(
+ "The entry could not be converted into an Annotation "
+ "object because it was not a dictionary."
+ ),
+ )
+ super(Annotations, self).to_graph_objs(caller=caller)
+ Annotations.to_graph_objs = to_graph_objs # override method!
+ return Annotations
- This is the container for all things to be rendered in a figure.
+Annotations = get_patched_annotations_class(Annotations)
- For help with setting up subplots, run:
- `help(plotly.tools.get_subplots)`
- """
+def get_patched_figure_class(Figure):
def __init__(self, *args, **kwargs):
if len(args):
if ('data' not in kwargs) and ('data' not in args[0]):
@@ -1257,19 +879,13 @@ def __init__(self, *args, **kwargs):
if 'layout' not in kwargs:
kwargs['layout'] = Layout()
super(Figure, self).__init__(*args, **kwargs)
+ Figure.__init__ = __init__ # override method!
+ return Figure
+Figure = get_patched_figure_class(Figure)
-class Font(PlotlyDict):
- """A dictionary-like object representing details about font style.
- """
- pass
-
-
-class Layout(PlotlyDict):
- """A dictionary-like object holding plot settings for plotly figures.
-
- """
+def get_patched_layout_class(Layout):
def __init__(self, *args, **kwargs):
super(Layout, self).__init__(*args, **kwargs)
@@ -1293,15 +909,16 @@ def to_graph_objs(self, caller=True):
continue # not an XAxis or YAxis object after all
if isinstance(self[key], dict):
if key[:5] == 'xaxis':
- obj = XAxis()
+ obj = get_class_instance_by_name('XAxis')
else:
- obj = YAxis()
+ obj = get_class_instance_by_name('YAxis')
for k, v in list(self.pop(key).items()):
obj[k] = v
self[key] = obj # call to super will call 'to_graph_objs'
super(Layout, self).to_graph_objs(caller=caller)
- def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
+ def to_string(self, level=0, indent=4, eol='\n',
+ pretty=True, max_chars=80):
"""Returns a formatted string showing graph_obj constructors.
Example:
@@ -1311,7 +928,7 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
Keyword arguments:
level (default = 0) -- set number of indentations to start with
indent (default = 4) -- set indentation amount
- eol (default = '\n') -- set end of line character(s)
+ eol (default = '\\n') -- set end of line character(s)
pretty (default = True) -- curtail long list output with a '...'
max_chars (default = 80) -- set max characters per line
@@ -1323,7 +940,7 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
string = "{name}(".format(name=self.__class__.__name__)
index = 0
obj_key = NAME_TO_KEY[self.__class__.__name__]
- for key in INFO[obj_key]:
+ for key in INFO[obj_key]['keymeta']:
if key in self:
string += "{eol}{indent}{key}=".format(
eol=eol,
@@ -1372,7 +989,8 @@ def to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80):
index += 1
if index == len(self): # TODO: extraneous...
break
- left_over_keys = [key for key in self if key not in INFO[obj_key]]
+ left_over_keys = [key for key in self
+ if key not in INFO[obj_key]['keymeta']]
left_over_keys.sort()
for key in left_over_keys:
string += "{eol}{indent}{key}=".format(
@@ -1411,7 +1029,8 @@ def force_clean(self, caller=True): # TODO: can't make call to super...
obj_key = NAME_TO_KEY[self.__class__.__name__]
if caller:
self.to_graph_objs(caller=False)
- del_keys = [key for key in self if str(key) not in INFO[obj_key]]
+ del_keys = [key for key in self
+ if str(key) not in INFO[obj_key]['keymeta']]
for key in del_keys:
if (key[:5] == 'xaxis') or (key[:5] == 'yaxis'):
try:
@@ -1431,105 +1050,33 @@ def force_clean(self, caller=True): # TODO: can't make call to super...
del self[key] # clears empty collections!
elif self[key] is None:
del self[key]
+ Layout.__init__ = __init__
+ Layout.to_graph_objs = to_graph_objs
+ Layout.to_string = to_string
+ Layout.force_clean = force_clean # override methods!
+ return Layout
+Layout = get_patched_layout_class(Layout)
-class Legend(PlotlyDict):
- """A dictionary-like object representing the legend options for a figure.
-
- """
- pass
-
-
-class Line(PlotlyDict):
- """A dictionary-like object representing the style of a line in plotly.
-
- """
- pass
-
-
-class Marker(PlotlyDict):
- """A dictionary-like object representing marker(s) style in plotly.
-
- """
- pass
-
-
-class Margin(PlotlyDict):
- """A dictionary-like object holding plot margin information.
-
- """
- pass
-
-
-class Stream(PlotlyDict):
- """A dictionary-like object representing a data stream.
-
- """
- pass
-
-
-class XAxis(PlotlyDict):
- """A dictionary-like object representing an xaxis in plotly.
-
- """
- pass
-
-
-class XBins(PlotlyDict):
- """A dictionary-like object representing bin information for a histogram.
-
- """
- pass
+# (4) NAME_TO_CLASS dict and class-generating function
+NAME_TO_CLASS = {name: getattr(sys.modules[__name__], name)
+ for name in NAME_TO_KEY.keys()}
-class YAxis(PlotlyDict):
- """A dictionary-like object representing a yaxis in plotly.
- """
- pass
+def get_class_instance_by_name(name, *args, **kwargs):
+ """All class creation goes through here.
-
-class YBins(PlotlyDict):
- """A dictionary-like object representing bin information for a histogram.
+ Because call signatures for the different classes are different, we have
+ anticipate that args, kwargs, or both may be specified. Note, this still
+ allows instantiation errors to occur naturally.
"""
- pass
-
-# finally... define how to map from a class name to an actual class
-# mapping: (n->n)
-NAME_TO_CLASS = dict(
- PlotlyList=PlotlyList,
- Data=Data,
- Annotations=Annotations,
- PlotlyDict=PlotlyDict,
- PlotlyTrace=PlotlyTrace,
- Area=Area,
- Bar=Bar,
- Box=Box,
- Contour=Contour,
- Heatmap=Heatmap,
- Histogram=Histogram,
- Histogram2d=Histogram2d,
- Histogram2dContour=Histogram2dContour,
- Scatter=Scatter,
- AngularAxis=AngularAxis,
- Annotation=Annotation,
- ColorBar=ColorBar,
- Contours=Contours,
- ErrorX=ErrorX,
- ErrorY=ErrorY,
- Figure=Figure,
- Font=Font,
- Layout=Layout,
- Legend=Legend,
- Line=Line,
- Margin=Margin,
- Marker=Marker,
- RadialAxis=RadialAxis,
- Stream=Stream,
- Trace=Trace,
- XAxis=XAxis,
- XBins=XBins,
- YAxis=YAxis,
- YBins=YBins
-)
+ if args and kwargs:
+ return NAME_TO_CLASS[name](*args, **kwargs)
+ elif args:
+ return NAME_TO_CLASS[name](*args)
+ elif kwargs:
+ return NAME_TO_CLASS[name](**kwargs)
+ else:
+ return NAME_TO_CLASS[name]()
diff --git a/plotly/graph_objs/graph_objs_tools.py b/plotly/graph_objs/graph_objs_tools.py
index 02444e12b3a..5c4bd959aa6 100644
--- a/plotly/graph_objs/graph_objs_tools.py
+++ b/plotly/graph_objs/graph_objs_tools.py
@@ -1,5 +1,179 @@
+from __future__ import absolute_import
+from plotly import utils
+import textwrap
+import os
+import sys
+if sys.version[:3] == '2.6':
+ from ordereddict import OrderedDict
+ import simplejson as json
+else:
+ from collections import OrderedDict
+ import json
import six
+from pkg_resources import resource_string
+
+
+# Define graph reference loader
+def _load_graph_ref():
+ graph_reference_dir = 'graph_reference'
+ json_files = [
+ 'graph_objs_meta.json',
+ 'OBJ_MAP.json',
+ 'NAME_TO_KEY.json',
+ 'KEY_TO_NAME.json'
+ ]
+ out = []
+ for json_file in json_files:
+ relative_path = os.path.join(graph_reference_dir, json_file)
+ s = resource_string('plotly', relative_path).decode('utf-8')
+ tmp = json.loads(s, object_pairs_hook=OrderedDict)
+ tmp = utils.decode_unicode(tmp)
+ out += [tmp]
+ return tuple(out)
+
+# Load graph reference
+INFO, OBJ_MAP, NAME_TO_KEY, KEY_TO_NAME = _load_graph_ref()
+
+# Add mentions to Python-specific graph obj
+# to NAME_TO_KEY, KEY_TO_NAME, INFO
+NAME_TO_KEY['PlotlyList'] = 'plotlylist'
+NAME_TO_KEY['PlotlyDict'] = 'plotlydict'
+NAME_TO_KEY['PlotlyTrace'] = 'plotlytrace'
+NAME_TO_KEY['Trace'] = 'trace'
+KEY_TO_NAME['plotlylist'] = 'PlotlyList'
+KEY_TO_NAME['plotlydict'] = 'PlotlyDict'
+KEY_TO_NAME['plotlytrace'] = 'PlotlyTrace'
+KEY_TO_NAME['trace'] = 'Trace'
+INFO['plotlylist'] = dict(keymeta=dict())
+INFO['plotlydict'] = dict(keymeta=dict())
+INFO['plotlytrace'] = dict(keymeta=dict())
+INFO['trace'] = dict(keymeta=dict())
+
+# Define line and tab size for help text!
+LINE_SIZE = 76
+TAB_SIZE = 4
+
+
+# Doc make function for list-like objects
+def make_list_doc(name):
+ # get info for this graph obj
+ info = INFO[NAME_TO_KEY[name]]
+ # add docstring to doc
+ doc = info['docstring']
+ doc = "\t" + "\n\t".join(textwrap.wrap(doc, width=LINE_SIZE)) + "\n"
+ # Add examples to doc
+ examples = info['examples']
+ if len(examples):
+ doc += "\nExample:\n\n >>> " + "\n >>> ".join(examples) + "\n"
+ # Add links to online examples to doc
+ links = info['links']
+ if len(links) == 1:
+ doc += "\nOnline example:\n\n " + "\n ".join(links) + "\n"
+ elif len(links) > 1:
+ doc += "\nOnline examples:\n\n " + "\n ".join(links) + "\n"
+ # Add parents keys to doc
+ parent_keys = info['parent_keys']
+ if len(parent_keys) == 1:
+ doc += "\nParent key:\n\n " + "\n ".join(parent_keys) + "\n"
+ elif len(parent_keys) > 1:
+ doc += "\nParent keys:\n\n " + "\n ".join(parent_keys) + "\n"
+ # Add method list to doc
+ doc += "\nQuick method reference:\n\n"
+ doc += "\t{0}.".format(name) + "\n\t{0}.".format(name).join(
+ ["update(changes)", "strip_style()", "get_data()",
+ "to_graph_objs()", "validate()", "to_string()",
+ "force_clean()"]) + "\n\n"
+ return doc.expandtabs(TAB_SIZE)
+
+
+# Doc make function for dict-like objects
+def make_dict_doc(name):
+ # get info for this graph obj
+ info = INFO[NAME_TO_KEY[name]]
+ # add docstring to doc
+ doc = info['docstring']
+ doc = "\t" + "\n\t".join(textwrap.wrap(doc, width=LINE_SIZE)) + "\n"
+ # Add examples to doc
+ examples = info['examples']
+ if len(examples):
+ doc += "\nExample:\n\n >>> " + "\n >>> ".join(examples) + "\n"
+ # Add links to online examples to doc
+ links = info['links']
+ if len(links) == 1:
+ doc += "\nOnline example:\n\n " + "\n ".join(links) + "\n"
+ elif len(links) > 1:
+ doc += "\nOnline examples:\n\n " + "\n ".join(links) + "\n"
+ # Add parents keys to doc
+ parent_keys = info['parent_keys']
+ if len(parent_keys) == 1:
+ doc += "\nParent key:\n\n " + "\n ".join(parent_keys) + "\n"
+ elif len(parent_keys) > 1:
+ doc += "\nParent keys:\n\n " + "\n ".join(parent_keys) + "\n"
+ # Add method list to doc
+ doc += "\nQuick method reference:\n\n"
+ doc += "\t{0}.".format(name) + "\n\t{0}.".format(name).join(
+ ["update(changes)", "strip_style()", "get_data()",
+ "to_graph_objs()", "validate()", "to_string()",
+ "force_clean()"]) + "\n\n"
+ # Add key meta to doc
+ keymeta = info['keymeta']
+ if len(keymeta):
+ doc += "Valid keys:\n\n"
+ # Add each key one-by-one and format
+ width1 = LINE_SIZE-TAB_SIZE
+ width2 = LINE_SIZE-2*TAB_SIZE
+ width3 = LINE_SIZE-3*TAB_SIZE
+ undocumented = "Aw, snap! Undocumented!"
+ for key in keymeta:
+ # main portion of documentation
+ try:
+ required = str(keymeta[key]['required'])
+ except KeyError:
+ required = undocumented
+ try:
+ typ = str(keymeta[key]['key_type'])
+ except KeyError:
+ typ = undocumented
+ try:
+ val_types = str(keymeta[key]['val_types'])
+ if typ == 'object':
+ val_types = ("{0} object | ".format(KEY_TO_NAME[key]) +
+ val_types)
+ except KeyError:
+ val_types = undocumented
+ try:
+ descr = str(keymeta[key]['description'])
+ except KeyError:
+ descr = undocumented
+ str_1 = "{0} [required={1}] (value={2})".format(
+ key, required, val_types)
+ if "streamable" in keymeta[key] and keymeta[key]["streamable"]:
+ str_1 += " (streamable)"
+ str_1 += ":\n"
+ str_1 = "\t" + "\n\t".join(textwrap.wrap(str_1,
+ width=width1)) + "\n"
+ str_2 = "\t\t" + "\n\t\t".join(textwrap.wrap(descr,
+ width=width2)) + "\n"
+ doc += str_1 + str_2
+ # if a user can run help on this value, tell them!
+ if typ == "object":
+ doc += "\n\t\tFor more, run `help(plotly.graph_objs.{0" \
+ "})`\n".format(KEY_TO_NAME[key])
+ # if example usage exists, tell them!
+ try:
+ if len(keymeta[key]['examples']):
+ ex = "\n\t\tExamples:\n" + "\t\t\t"
+ ex += "\n\t\t\t".join(
+ textwrap.wrap(' | '.join(keymeta[key]['examples']),
+ width=width3)) + "\n"
+ doc += ex
+ except:
+ pass
+ doc += '\n'
+ return doc.expandtabs(TAB_SIZE)
+
+
def update_keys(keys):
"""Change keys we used to support to their new equivalent."""
updated_keys = list()
@@ -36,7 +210,8 @@ def curtail_val_repr(val, max_chars, add_delim=False):
if isinstance(val, six.string_types):
# TODO: can we assume this ends in "'"
r = r[:max_chars - len(end + "'")] + end + "'"
- elif isinstance(val, list) and max_chars >= len("[{end}]".format(end)):
+ elif (isinstance(val, list) and
+ max_chars >= len("[{end}]".format(end))):
r = r[:max_chars - len(end + ']')] + end + ']'
else:
r = r[:max_chars - len(end)] + end
diff --git a/plotly/graph_reference/.gitignore b/plotly/graph_reference/.gitignore
deleted file mode 100644
index 7e80cc551b0..00000000000
--- a/plotly/graph_reference/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.pyc
-*.ipynb
diff --git a/plotly/graph_reference/CONTRIBUTING.md b/plotly/graph_reference/CONTRIBUTING.md
deleted file mode 100644
index 64bb8a91773..00000000000
--- a/plotly/graph_reference/CONTRIBUTING.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# How to contribute?
-
-
-## To add and/or modify keys in graph reference
-
-Clone and/or pull the latest master version:
-```
-$ git pull origin master
-```
-
-Make a new branch (for testing purposes) and checkout:
-```
-$ git branch your_branch_name
-$ git checkout your_branch_name
-```
-
-Add and modified keys in `graph_objs_meta.py`:
-
-1. with special attention to existing shortcuts (search for key shortcuts with
- `@key@`),
-1. if you are making a new shortcut function use `output` (see `@output@` to
- format the meta dictionary,
-1. (more step-by-step info coming soon ...),
-1. update the table content in `graph_objs_mets-toc.md` if keys were added or if
- the order was modified.
-
-Generate the JSON files:
-```
-$ python graph_objs_meta.py
-```
-
-Add, commit and push to online repo:
-```
-$ git add .
-$ git commit
-$ git push origin your_branch_name
-```
-
-
-## Testing
-
-When you push any branch to the online repo, Nose is going to test the
-`test_graph_references.py` file.
-
-To see if your push passed, go
-[here](https://circleci.com/gh/plotly/graph_reference).
-
-
-## To see the changes in the APIs' help function and online documentation
-
-1. The `graph_reference` submodule in the
- [Python-API](https://github.com/plotly/python-api) needs to be updated and
- tests need to pass,
-1. the [Python-API](https://github.com/plotly/python-api) needs to be pushed to
- pip,
-1. our backend's `requirements.txt` needs to be updated with the new version of
- the Python-API.
-
-
diff --git a/plotly/graph_reference/KEY_TO_NAME.json b/plotly/graph_reference/KEY_TO_NAME.json
new file mode 100644
index 00000000000..7357851eec2
--- /dev/null
+++ b/plotly/graph_reference/KEY_TO_NAME.json
@@ -0,0 +1,40 @@
+{
+ "stream": "Stream",
+ "scene": "Scene",
+ "surface": "Surface",
+ "radialaxis": "RadialAxis",
+ "titlefont": "Font",
+ "marker": "Marker",
+ "font": "Font",
+ "angularaxis": "AngularAxis",
+ "contour": "Contour",
+ "error_x": "ErrorX",
+ "error_y": "ErrorY",
+ "error_z": "ErrorZ",
+ "area": "Area",
+ "annotation": "Annotation",
+ "heatmap": "Heatmap",
+ "zaxis": "ZAxis",
+ "contours": "Contours",
+ "xaxis": "XAxis",
+ "figure": "Figure",
+ "scatter3d": "Scatter3d",
+ "annotations": "Annotations",
+ "tickfont": "Font",
+ "textfont": "Font",
+ "histogram2d": "Histogram2d",
+ "xbins": "XBins",
+ "layout": "Layout",
+ "line": "Line",
+ "histogram": "Histogram",
+ "data": "Data",
+ "legend": "Legend",
+ "ybins": "YBins",
+ "box": "Box",
+ "bar": "Bar",
+ "yaxis": "YAxis",
+ "margin": "Margin",
+ "colorbar": "ColorBar",
+ "histogram2dcontour": "Histogram2dContour",
+ "scatter": "Scatter"
+}
\ No newline at end of file
diff --git a/plotly/graph_reference/NAME_TO_KEY.json b/plotly/graph_reference/NAME_TO_KEY.json
new file mode 100644
index 00000000000..6eeb56b46c3
--- /dev/null
+++ b/plotly/graph_reference/NAME_TO_KEY.json
@@ -0,0 +1,37 @@
+{
+ "Layout": "layout",
+ "Area": "area",
+ "RadialAxis": "radialaxis",
+ "Heatmap": "heatmap",
+ "Contours": "contours",
+ "XBins": "xbins",
+ "Scatter3d": "scatter3d",
+ "Histogram": "histogram",
+ "Annotations": "annotations",
+ "YBins": "ybins",
+ "YAxis": "yaxis",
+ "ErrorX": "error_x",
+ "ErrorY": "error_y",
+ "ErrorZ": "error_z",
+ "Histogram2d": "histogram2d",
+ "ColorBar": "colorbar",
+ "Line": "line",
+ "Data": "data",
+ "Legend": "legend",
+ "Box": "box",
+ "Bar": "bar",
+ "AngularAxis": "angularaxis",
+ "Margin": "margin",
+ "Scatter": "scatter",
+ "Figure": "figure",
+ "Stream": "stream",
+ "Scene": "scene",
+ "Surface": "surface",
+ "Annotation": "annotation",
+ "ZAxis": "zaxis",
+ "XAxis": "xaxis",
+ "Marker": "marker",
+ "Font": "font",
+ "Histogram2dContour": "histogram2dcontour",
+ "Contour": "contour"
+}
\ No newline at end of file
diff --git a/plotly/graph_reference/OBJ_MAP.json b/plotly/graph_reference/OBJ_MAP.json
new file mode 100644
index 00000000000..936148a0d88
--- /dev/null
+++ b/plotly/graph_reference/OBJ_MAP.json
@@ -0,0 +1,142 @@
+{
+ "Layout": {
+ "info_key": "layout",
+ "base_name": "PlotlyDict"
+ },
+ "Area": {
+ "info_key": "area",
+ "base_name": "PlotlyTrace"
+ },
+ "RadialAxis": {
+ "info_key": "radialaxis",
+ "base_name": "PlotlyDict"
+ },
+ "Heatmap": {
+ "info_key": "heatmap",
+ "base_name": "PlotlyTrace"
+ },
+ "Contours": {
+ "info_key": "contours",
+ "base_name": "PlotlyDict"
+ },
+ "XBins": {
+ "info_key": "xbins",
+ "base_name": "PlotlyDict"
+ },
+ "Scatter3d": {
+ "info_key": "scatter3d",
+ "base_name": "PlotlyTrace"
+ },
+ "Histogram": {
+ "info_key": "histogram",
+ "base_name": "PlotlyTrace"
+ },
+ "Annotations": {
+ "info_key": "annotations",
+ "base_name": "PlotlyList"
+ },
+ "YBins": {
+ "info_key": "ybins",
+ "base_name": "PlotlyDict"
+ },
+ "YAxis": {
+ "info_key": "yaxis",
+ "base_name": "PlotlyDict"
+ },
+ "ErrorX": {
+ "info_key": "error_x",
+ "base_name": "PlotlyDict"
+ },
+ "ErrorY": {
+ "info_key": "error_y",
+ "base_name": "PlotlyDict"
+ },
+ "ErrorZ": {
+ "info_key": "error_z",
+ "base_name": "PlotlyDict"
+ },
+ "Histogram2d": {
+ "info_key": "histogram2d",
+ "base_name": "PlotlyTrace"
+ },
+ "ColorBar": {
+ "info_key": "colorbar",
+ "base_name": "PlotlyDict"
+ },
+ "Line": {
+ "info_key": "line",
+ "base_name": "PlotlyDict"
+ },
+ "Data": {
+ "info_key": "data",
+ "base_name": "PlotlyList"
+ },
+ "Legend": {
+ "info_key": "legend",
+ "base_name": "PlotlyDict"
+ },
+ "Box": {
+ "info_key": "box",
+ "base_name": "PlotlyTrace"
+ },
+ "Bar": {
+ "info_key": "bar",
+ "base_name": "PlotlyTrace"
+ },
+ "AngularAxis": {
+ "info_key": "angularaxis",
+ "base_name": "PlotlyDict"
+ },
+ "Margin": {
+ "info_key": "margin",
+ "base_name": "PlotlyDict"
+ },
+ "Scatter": {
+ "info_key": "scatter",
+ "base_name": "PlotlyTrace"
+ },
+ "Figure": {
+ "info_key": "figure",
+ "base_name": "PlotlyDict"
+ },
+ "Stream": {
+ "info_key": "stream",
+ "base_name": "PlotlyDict"
+ },
+ "Scene": {
+ "info_key": "scene",
+ "base_name": "PlotlyDict"
+ },
+ "Surface": {
+ "info_key": "surface",
+ "base_name": "PlotlyTrace"
+ },
+ "Annotation": {
+ "info_key": "annotation",
+ "base_name": "PlotlyDict"
+ },
+ "ZAxis": {
+ "info_key": "zaxis",
+ "base_name": "PlotlyDict"
+ },
+ "XAxis": {
+ "info_key": "xaxis",
+ "base_name": "PlotlyDict"
+ },
+ "Marker": {
+ "info_key": "marker",
+ "base_name": "PlotlyDict"
+ },
+ "Font": {
+ "info_key": "font",
+ "base_name": "PlotlyDict"
+ },
+ "Histogram2dContour": {
+ "info_key": "histogram2dcontour",
+ "base_name": "PlotlyTrace"
+ },
+ "Contour": {
+ "info_key": "contour",
+ "base_name": "PlotlyTrace"
+ }
+}
\ No newline at end of file
diff --git a/plotly/graph_reference/README.md b/plotly/graph_reference/README.md
deleted file mode 100644
index 6b91c8653cf..00000000000
--- a/plotly/graph_reference/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# Plotly Graph Reference
-
-*Welcome to the ultimate reference of Plotly's JSON graph format!*
-
-Or just graph reference for short.
-
-Graph reference is used:
-
-- in Plotly's API online documentation:
- [Python](https://plot.ly/python/reference/),
- [MATLAB](https://plot.ly/matlab/reference/),
- [R](https://plot.ly/r/reference/),
- [node.js](https://plot.ly/nodejs/reference/) and
- [Julia](https://plot.ly/julia/reference/),
-
-- in the output of our APIs' help functions.
-
-
-### Files in this repo:
-
-- `CONTRIBUTING.md` : info on how to contribute to this repo
-
-- `graph_objs_meta.py` : Meta-generating script
-
-- `graph_objs_meta-toc.md` : Table of content for meta-generating file
-
-- `graph_objs_keys.py` : JSON of all Plotly keys
-
-- `graph_objs_meta.json` : JSON of (all) META of all Plotly keys
-
-- `graph_objs_checklist.json` : List of undocumented keys
-
-- `test_graph_reference.py` : Test script
-
-- `circle.yml` : Tells Circle to run test
-
-- `__init__.py` : to support relative imports
-
-
-### Philosophy
-
-* All Plotly meta should be generated using a single (Python) file (this is
- `graph_objs_meta.py`). This meta-generating script should be clean and
- well-organized (see `graph_objs_meta-toc.md`).
-
-+ All Plotly keys should be contained in a single JSON file (this is
- `graph_objs_keys.json`).
-
-+ Every Plotly API should have its own meta JSON file, with meta consistent with
- each language's terminology (coming soon).
-
-* A fully described key is an object with the keys:
- 1. `'required'`: whether the key is required or not to create the chart type,
- 1. `'type'`: **IMPORTANT**
`'data'` the only keys that remain
- after`.get_data()`
`'style'` keys that are stripped by `.strip_style()`,
-
`'plot_info'` keys that not affected by `.strip_style()`, i.e.
- *information specific to a given figure or, in other words, information that
- cannot be transplanted to other figures*
`'object'` keys that are to be
- linked to another object
- 1. `'val_types'`: valid types (e.g. array-like of strings, number: in [0, 1]),
- 1. `'description'`: making help helpful!
-
-* Additionally, there are two optional keys:
-
- 1. `'streamable'`: whether not this key can be streamed using the Streaming
- API,
- 1. `'examples'`: list of examples of accepted values for this key.
-
-* Repetition in the meta-generating file should be kept to a minimum. More
- precisely, meta for keys that are contained in more than 1 object and that
- show significant similarities, is generated using shortcuts. In
- `graph_objs_meta.py`, the meta-generating shortcuts come in two flavors:
- 1. functions, named `make_` e.g. `make_x`, used when small discrepancies
- occur from object to object.
- 1. dictionaries, named `drop_` e.g. `drop_ visisble`, used when the exact
- same meta is used for all objects containing a particular key.
-
- Regardless of flavor, all shortcuts are labelled as `@key@` in
- `graph_objs_meta.py` making navigation between objects, keys and shortcuts a
- breeze.
-
-### Glossary
-
-* `#Q`: in `graph_objs_meta.py` these comments refer to questions about Plotly's
- functionality.
-* `#TODO!`: in `graph_objs_meta.py` these comments refer to tasks that remain
- to be completed.
-* Artifact (or `#ARTIFACT`): Artifact keys are keys that not intended for API
- use (i.e. meant for GUI use), but that must remain part of graph reference to
- ensure reproducibility. Artifact keys should be placed last in each graph
- objects.
-* Obsolete: Obsolete keys are keys no longer relevant in both from the APIs and
- the GUI. Obsolete keys must be dropped from graph reference.
-
-### How to contribute?
-
-See `CONTRIBUTING.md`.
diff --git a/plotly/graph_reference/__init__.py b/plotly/graph_reference/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/plotly/graph_reference/circle.yml b/plotly/graph_reference/circle.yml
deleted file mode 100644
index 4c64871ccb9..00000000000
--- a/plotly/graph_reference/circle.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-## Customize test commands
-test:
- post:
- - nosetests test_graph_references.py
\ No newline at end of file
diff --git a/plotly/graph_reference/graph_objs_checklist.json b/plotly/graph_reference/graph_objs_checklist.json
deleted file mode 100644
index e5c97fefe7a..00000000000
--- a/plotly/graph_reference/graph_objs_checklist.json
+++ /dev/null
@@ -1,246 +0,0 @@
-{
- "trace": {
- "scl": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "jitter": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "orientation": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "text": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "zmin": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "dy": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "radialaxis": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "y0": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "marker": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "zmax": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "pointpos": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "angularaxis": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "fill": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "showlegend": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "error_x": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "error_y": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "boxmean": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "zauto": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "xaxis": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "type": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "mode": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "opacity": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "textfont": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "nbinsx": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "nbinsy": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "fillcolor": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "dx": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "xbins": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "showscale": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "line": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "autobiny": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "ybins": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "whiskerwidth": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "autobinx": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "name": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "yaxis": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "x0": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "histnorm": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "colorbar": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "reversescl": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "r": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "t": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "y": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "x": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "hm_id": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "type": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "z": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- },
- "boxpoints": {
- "val_types": "UNDOCUMENTED",
- "required": "UNDOCUMENTED",
- "description": "UNDOCUMENTED"
- }
- }
-}
\ No newline at end of file
diff --git a/plotly/graph_reference/graph_objs_keys.json b/plotly/graph_reference/graph_objs_keys.json
deleted file mode 100644
index bf6b8250c2a..00000000000
--- a/plotly/graph_reference/graph_objs_keys.json
+++ /dev/null
@@ -1,557 +0,0 @@
-{
- "angularaxis": [
- "domain",
- "endpadding",
- "range",
- "showline",
- "showticklabels",
- "tickcolor",
- "tickorientation",
- "ticksuffix",
- "visible"
- ],
- "annotation": [
- "align",
- "arrowcolor",
- "arrowhead",
- "arrowsize",
- "arrowwidth",
- "ax",
- "ay",
- "bgcolor",
- "bordercolor",
- "borderpad",
- "borderwidth",
- "font",
- "opacity",
- "showarrow",
- "text",
- "textangle",
- "x",
- "xanchor",
- "xref",
- "y",
- "yanchor",
- "yref"
- ],
- "annotations": [],
- "area": [
- "angularaxis",
- "marker",
- "name",
- "r",
- "radialaxis",
- "showlegend",
- "stream",
- "t",
- "type",
- "visible"
- ],
- "bar": [
- "error_x",
- "error_y",
- "line",
- "marker",
- "name",
- "opacity",
- "orientation",
- "r",
- "showlegend",
- "stream",
- "t",
- "text",
- "textfont",
- "type",
- "visible",
- "x",
- "xaxis",
- "y",
- "yaxis"
- ],
- "box": [
- "boxmean",
- "boxpoints",
- "fillcolor",
- "jitter",
- "line",
- "marker",
- "name",
- "opacity",
- "pointpos",
- "showlegend",
- "stream",
- "type",
- "visible",
- "whiskerwidth",
- "x",
- "x0",
- "xaxis",
- "y",
- "yaxis"
- ],
- "colorbar": [
- "autotick",
- "bgcolor",
- "borderwidth",
- "dtick",
- "exponentformat",
- "len",
- "lenmode",
- "nticks",
- "outlinecolor",
- "outlinewidth",
- "showexponent",
- "showticklabels",
- "thickness",
- "thicknessmode",
- "tick0",
- "tickangle",
- "tickcolor",
- "tickfont",
- "ticklen",
- "ticks",
- "tickwidth",
- "title",
- "titlefont",
- "titleside",
- "x",
- "xanchor",
- "xpad",
- "y",
- "ypad"
- ],
- "contour": [
- "autocontour",
- "colorbar",
- "colorscale",
- "contours",
- "dx",
- "dy",
- "line",
- "name",
- "ncontours",
- "opacity",
- "reversescale",
- "showlegend",
- "showscale",
- "stream",
- "type",
- "visible",
- "x",
- "x0",
- "xaxis",
- "xtype",
- "y",
- "y0",
- "yaxis",
- "ytype",
- "z",
- "zauto",
- "zmax",
- "zmin"
- ],
- "contours": [
- "coloring",
- "end",
- "showlines",
- "size",
- "start"
- ],
- "data": [],
- "error_x": [
- "array",
- "arrayminus",
- "color",
- "copy_ystyle",
- "opacity",
- "symmetric",
- "thickness",
- "type",
- "value",
- "valueminus",
- "visible",
- "width"
- ],
- "error_y": [
- "array",
- "arrayminus",
- "color",
- "opacity",
- "symmetric",
- "thickness",
- "type",
- "value",
- "valueminus",
- "visible",
- "width"
- ],
- "figure": [
- "data",
- "layout"
- ],
- "font": [
- "color",
- "family",
- "outlinecolor",
- "size"
- ],
- "heatmap": [
- "colorbar",
- "colorscale",
- "dx",
- "dy",
- "name",
- "opacity",
- "reversescale",
- "showlegend",
- "showscale",
- "stream",
- "type",
- "visible",
- "x",
- "x0",
- "xaxis",
- "xtype",
- "y",
- "y0",
- "yaxis",
- "ytype",
- "z",
- "zauto",
- "zmax",
- "zmin",
- "zsmooth"
- ],
- "histogram": [
- "autobinx",
- "autobiny",
- "error_x",
- "error_y",
- "histnorm",
- "line",
- "marker",
- "name",
- "nbinsx",
- "nbinsy",
- "opacity",
- "orientation",
- "showlegend",
- "stream",
- "text",
- "type",
- "visible",
- "x",
- "xaxis",
- "xbins",
- "y",
- "yaxis",
- "ybins"
- ],
- "histogram2d": [
- "autobinx",
- "autobiny",
- "colorbar",
- "colorscale",
- "histnorm",
- "name",
- "nbinsx",
- "nbinsy",
- "opacity",
- "reversescale",
- "showlegend",
- "showscale",
- "stream",
- "type",
- "visible",
- "x",
- "xaxis",
- "xbins",
- "y",
- "yaxis",
- "ybins",
- "zauto",
- "zmax",
- "zmin",
- "zsmooth"
- ],
- "histogram2dcontour": [
- "autobinx",
- "autobiny",
- "autocontour",
- "colorbar",
- "colorscale",
- "contours",
- "histnorm",
- "line",
- "name",
- "nbinsx",
- "nbinsy",
- "ncontours",
- "opacity",
- "reversescale",
- "showlegend",
- "showscale",
- "stream",
- "type",
- "visible",
- "x",
- "xaxis",
- "xbins",
- "y",
- "yaxis",
- "ybins",
- "zauto",
- "zmax",
- "zmin"
- ],
- "layout": [
- "angularaxis",
- "annotations",
- "autosize",
- "bargap",
- "bargroupgap",
- "barmode",
- "boxmode",
- "direction",
- "dragmode",
- "font",
- "height",
- "hidesources",
- "hovermode",
- "legend",
- "margin",
- "orientation",
- "paper_bgcolor",
- "plot_bgcolor",
- "radialaxis",
- "separators",
- "showlegend",
- "title",
- "titlefont",
- "width",
- "xaxis",
- "yaxis"
- ],
- "legend": [
- "bgcolor",
- "bordercolor",
- "borderwidth",
- "font",
- "traceorder",
- "x",
- "xanchor",
- "xref",
- "y",
- "yanchor",
- "yref"
- ],
- "line": [
- "color",
- "dash",
- "opacity",
- "outliercolor",
- "outlierwidth",
- "shape",
- "smoothing",
- "width"
- ],
- "margin": [
- "autoexpand",
- "b",
- "l",
- "pad",
- "r",
- "t"
- ],
- "marker": [
- "cauto",
- "cmax",
- "cmin",
- "color",
- "colorscale",
- "line",
- "maxdisplayed",
- "opacity",
- "outliercolor",
- "size",
- "sizemode",
- "sizeref",
- "symbol"
- ],
- "plotlydict": [],
- "plotlylist": [],
- "plotlytrace": [],
- "radialaxis": [
- "domain",
- "endpadding",
- "orientation",
- "range",
- "showline",
- "showticklabels",
- "tickcolor",
- "ticklen",
- "tickorientation",
- "ticksuffix",
- "visible"
- ],
- "scatter": [
- "connectgaps",
- "error_x",
- "error_y",
- "fill",
- "fillcolor",
- "line",
- "marker",
- "mode",
- "name",
- "opacity",
- "r",
- "showlegend",
- "stream",
- "t",
- "text",
- "textfont",
- "textposition",
- "type",
- "visible",
- "x",
- "xaxis",
- "y",
- "yaxis"
- ],
- "stream": [
- "maxpoints",
- "token"
- ],
- "trace": [
- "angularaxis",
- "autobinx",
- "autobiny",
- "boxmean",
- "boxpoints",
- "colorbar",
- "dx",
- "dy",
- "error_x",
- "error_y",
- "fill",
- "fillcolor",
- "histnorm",
- "hm_id",
- "jitter",
- "line",
- "marker",
- "mode",
- "name",
- "nbinsx",
- "nbinsy",
- "opacity",
- "orientation",
- "pointpos",
- "r",
- "radialaxis",
- "reversescl",
- "scl",
- "showlegend",
- "showscale",
- "t",
- "text",
- "textfont",
- "type",
- "whiskerwidth",
- "x",
- "x0",
- "xaxis",
- "xbins",
- "y",
- "y0",
- "yaxis",
- "ybins",
- "z",
- "zauto",
- "zmax",
- "zmin"
- ],
- "xaxis": [
- "anchor",
- "autorange",
- "autotick",
- "domain",
- "dtick",
- "exponentformat",
- "gridcolor",
- "gridwidth",
- "linecolor",
- "linewidth",
- "mirror",
- "nticks",
- "overlaying",
- "position",
- "range",
- "rangemode",
- "showexponent",
- "showgrid",
- "showline",
- "showticklabels",
- "side",
- "tick0",
- "tickangle",
- "tickcolor",
- "tickfont",
- "ticklen",
- "ticks",
- "tickwidth",
- "title",
- "titlefont",
- "type",
- "zeroline",
- "zerolinecolor",
- "zerolinewidth"
- ],
- "xbins": [
- "end",
- "size",
- "start"
- ],
- "yaxis": [
- "anchor",
- "autorange",
- "autotick",
- "domain",
- "dtick",
- "exponentformat",
- "gridcolor",
- "gridwidth",
- "linecolor",
- "linewidth",
- "mirror",
- "nticks",
- "overlaying",
- "position",
- "range",
- "rangemode",
- "showexponent",
- "showgrid",
- "showline",
- "showticklabels",
- "side",
- "tick0",
- "tickangle",
- "tickcolor",
- "tickfont",
- "ticklen",
- "ticks",
- "tickwidth",
- "title",
- "titlefont",
- "type",
- "zeroline",
- "zerolinecolor",
- "zerolinewidth"
- ],
- "ybins": [
- "end",
- "size",
- "start"
- ]
-}
\ No newline at end of file
diff --git a/plotly/graph_reference/graph_objs_meta-toc.md b/plotly/graph_reference/graph_objs_meta-toc.md
deleted file mode 100644
index a8d4670ebbf..00000000000
--- a/plotly/graph_reference/graph_objs_meta-toc.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Table of Content for `graph_objs_meta.py`
-
-## Section -- Required module(s)
-
-## Section -- Shortcuts definitions and inventories:
-
-### Meta generation shortcuts
-
-Label of top of subsection: `@meta-shortcut@`
-
-+ Function that formats the keys' values into a dictionary (`@output@`)
-+ (long string shortcut coming soon)
-
-### Inventory of value types
-
-Label of top of subsection: `@val_types@`
-
-+ Formatting function for 'number' type (`@val_types-number@`)
-+ Value type dictionary (`@val_types-dict@`)
-
-### Shortcut to described conditionally required keys
-
-Label of top subsection: `@required_cond@`
-
-+ Formatting function for condition involving keys (`@required_cond-keys@`)
-+ Formatting function for condition involving plot type (`@required_cond-plottype@`)
-+ Conditionally required dictionary (`@required_cond-dict@`)
-
-### Inventory of meta generators for repeated keys
-
-Label of top of subsection: `@shortcuts@`
-
-Label of specific key shortcut: `@@` e.g. `@x@` for the `'x'` key
-
-#### (fill in shortcut 'categories' e.g. @shortcuts-coordinates@)
-
-## Section -- Graph Objects Meta:
-
-### 'Trace' graph objects
-
-Label of top of subsection: `@graph-objs-meta-trace@`
-
-+ Scatter (`@Scatter@`)
-+ Bar (`@Bar@`)
-+ Histogram (`@Histogram@`)
-+ Bar (`@Box@`)
-+ Heatmap (`@Heatmap@`)
-+ Contour (`@Contour@`)
-+ Histogram2d (`@Histogram2d@`)
-+ Histogram2dContour (`@Histogram2dContour@`)
-+ Area (`@Area@`)
-
-### 'Auxiliary trace' graph objects
-
-Label of top of section: `@graph-objs-meta-trace-aux@`
-
-#### Error (`@Error@`)
-
-+ ErrorY (`@ErrorY@`)
-+ ErrorX (`@ErrorX@`)
-
-#### Bins (`@Bins`)
-
-+ XBins (`@XBins@`)
-+ YBins (`@YBins@`)
-
-####
-
-+ Contours (`@Contours@`)
-+ Stream (`@Stream@`)
-
-### 'Style' graph objects
-
-Label of top of section: `@graph-objs-meta-style @`
-
-+ Marker (`@Marker@`)
-+ Line (`@Line@`)
-+ Font (`@Font@`)
-
-### 'Axis' graph objects
-
-Label of top of section: `@graph-objs-meta-layout-axis@`
-
-#### TICKS (`@TICKS@`)
-
-#### AXIS (`@Axis@`)
-
-####
-
-+ XAxis (`@XAxis@`)
-+ YAxis (`@YAxis@`)
-+ RadialAxis (`@RadialAxis`)
-+ AngularAxis (`@AngularAxis`)
-
-### Other 'auxiliary layout' graph objects
-
-Label of top of section: `@graph-objs-meta-layout-aux@`
-
-+ Legend (`@Legend`)
-+ ColorBar (`@ColorBar`)
-+ Margin (`@Margin`)
-+ Annotation (`@Annotation`)
-
-* Layout (`@Layout`)
-
-* Figure (`@Figure`)
-
-### Other graph objects
-
-Label of top of section: `@graph-objs-meta-others`
-
-+ Data (`@PlotlyData`)
-+ Annotations (`@Annotations`)
-+ Trace (`@Trace`)
-+ PlotlyList (`@PlotlyList`)
-+ PlotlyDict (`@PlotlyDict`)
-+ PlotlyTrace (`@PlotlyTrace`)
-
-## Section -- Write to JSON
diff --git a/plotly/graph_reference/graph_objs_meta.json b/plotly/graph_reference/graph_objs_meta.json
index cdb3d6620ce..8ec5f5c60ed 100644
--- a/plotly/graph_reference/graph_objs_meta.json
+++ b/plotly/graph_reference/graph_objs_meta.json
@@ -1,3294 +1,4141 @@
{
"scatter": {
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'y','r' and 't' are unset",
- "type": "data",
- "description": "The x coordinates of the points of this scatter trace. If 'x' is linked to an list or array of strings, then the x coordinates are integers [0,1,2,3, ...] labeled on the x-axis by the list or array of strings linked to 'x'.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'x','r' and 't' are unset",
- "type": "data",
- "description": "The y coordinates of the points of this scatter trace. If 'y' is linked to an list or array of strings, then the y coordinates are integers [0,1,2,3, ...] labeled on the y-axis by the list or array of strings linked to 'y'.",
- "streamable": true
- },
- "r": {
- "val_types": "array-like of numbers",
- "required": " when making a Polar Chart",
- "type": "data",
- "description": "For Polar charts only. The radial coordinates of the points in this polar scatter trace about the origin.",
- "streamable": true
- },
- "t": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when making a Polar Chart",
- "type": "data",
- "description": "For Polar charts only. The angular coordinates of the points in this polar scatter trace. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in AngularAxis or/and 'direction' in Layout. If 't' is linked to an array-like of strings, then the angular coordinates are [0, 360\\N, 2*360/N, ...] where N is the number of coordinates given labeled by the array-like of strings linked to 't'.",
- "streamable": true
- },
- "mode": {
- "val_types": "'lines' | 'markers' | 'text' | 'lines+markers' | 'lines+text' | 'markers+text' | 'lines+markers+text'",
- "required": false,
- "type": "style",
- "description": "Plotting mode (or style) for the scatter plot. If the mode includes 'text' then the 'text' will appear at the (x,y) points, otherwise it will appear on hover."
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "text": {
- "val_types": "array-like of strings",
- "required": false,
- "type": "data",
- "description": "The text elements associated with each (x,y) pair in this scatter trace. If the scatter 'mode' does not include 'text' then text elements will appear on hover only. In contrast, if 'text' is included in 'mode', the entries in 'text' will be rendered on the plot at the locations specified in part by their corresponding (x,y) coordinate pair and the 'textposition' key.",
- "streamable": true
- },
- "error_y": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the vetical error bars (i.e. along the y-axis) that can be drawn from the (x, y) coordinates.",
- "streamable": true
- },
- "error_x": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from the (x, y) coordinates.",
- "streamable": true
- },
- "marker": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing marker style parameters for this scatter trace. Has an effect only if 'mode' contains 'markers'.",
- "streamable": true
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing line style parameters for this scatter trace. Has an effect only if 'mode' contains 'lines'.",
- "streamable": true
- },
- "textposition": {
- "val_types": "'top left' | 'top' (or 'top center')| 'top right' | 'left' (or 'middle left') | '' (or 'middle center') |'right' (or 'middle right') |'bottom left' | 'bottom' (or 'bottom center') |'bottom right'",
- "required": false,
- "type": "style",
- "description": "Sets the position of the text elements in the 'text' key with respect to the data points. By default, the text elements are plotted directly at the (x,y) coordinates."
- },
- "textfont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font style of this scatter trace's text elements. Has only an effect if 'mode' is set and includes 'text'."
- },
- "connectgaps": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggle whether or not missing data points (i.e. '' or NaNs) linked to 'x' and/or 'y', are added in by Plotly using linear interpolation."
- },
- "fill": {
- "val_types": "'none' | 'tozeroy' | 'tonexty' | 'tozerox' | 'tonextx",
- "required": false,
- "type": "style",
- "description": "Use to make area-style charts. Determines which area to fill with a solid color.By default, the area will appear in a more-transparent shape of the line color (or of the marker color if 'mode' does not contains 'lines')."
- },
- "fillcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the color that will appear in the specified fill area (set in 'fill'). Has no effect if 'fill' is set to 'none'.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "scatter",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ "name": "Scatter",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a scatter trace in plotly.",
+ "examples": [
+ "py.plot([Scatter(name='tacters', x=[1,4,2,3], y=[1,6,2,1])])"
+ ],
+ "links": [
+ "https://plot.ly/python/line-and-scatter/",
+ "https://plot.ly/python/bubble-charts/",
+ "https://plot.ly/python/filled-area-plots/",
+ "https://plot.ly/python/time-series/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'y','r' and 't' are unset",
+ "description": "Sets the x coordinates of the points of this scatter trace. If 'x' is linked to a list or 1d numpy array of strings, then the x coordinates are integers, 0, 1, 2, 3, ..., labeled on the x-axis by the list or 1d numpy array of strings linked to 'x'.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'x','r' and 't' are unset",
+ "description": "Sets the y coordinates of the points of this scatter trace. If 'y' is linked to a list or 1d numpy array of strings, then the y coordinates are integers, 0, 1, 2, 3, ..., labeled on the y-axis by the list or 1d numpy array of strings linked to 'y'.",
+ "streamable": true
+ },
+ "r": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers",
+ "required": " when making a Polar Chart",
+ "description": "For Polar charts only. Sets the radial coordinates of the points in this polar scatter trace about the origin.",
+ "streamable": true
+ },
+ "t": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when making a Polar Chart",
+ "description": "For Polar charts only. Sets the angular coordinates of the points in this polar scatter trace. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in 'angularaxis' or/and 'direction' in 'layout'. If 't' is linked to a list or 1d numpy array of strings, then the angular coordinates are 0, 360\\N, 2*360/N, ... where N is the number of coordinates given labeled by the list or 1d numpy array of strings linked to 't'.",
+ "streamable": true
+ },
+ "mode": {
+ "key_type": "plot_info",
+ "val_types": "'lines' | 'markers' | 'text' | 'lines+markers' | 'lines+text' | 'markers+text' | 'lines+markers+text'",
+ "required": false,
+ "description": "Plotting mode for this scatter trace. If the mode includes 'text' then the 'text' will appear at the (x,y) points, otherwise it will appear on hover."
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "text": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of strings",
+ "required": false,
+ "description": "The text elements associated with each (x,y) pair in this scatter trace. If the scatter 'mode' does not include 'text' then elements linked to 'text' will appear on hover only. In contrast, if 'text' is included in 'mode', the elements in 'text' will be rendered on the plot at the locations specified in part by their corresponding (x,y) coordinate pair and the 'textposition' key.",
+ "streamable": true
+ },
+ "error_y": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the vertical error bars (i.e. along the y-axis) that can be drawn from the (x,y) coordinates of this scatter trace.",
+ "streamable": true
+ },
+ "error_x": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from the (x,y) coordinates of this scatter trace.",
+ "streamable": true
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style parameters for this scatter trace. Has an effect only if 'mode' contains 'markers'.",
+ "streamable": true
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for this scatter trace. Has an effect only if 'mode' contains 'lines'.",
+ "streamable": true
+ },
+ "textposition": {
+ "key_type": "style",
+ "val_types": "'top left' | 'top' (or 'top center')| 'top right' | 'left' (or 'middle left') | '' (or 'middle center') | 'right' (or 'middle right') | 'bottom left' | 'bottom' (or 'bottom center') | 'bottom right'",
+ "required": false,
+ "description": "Sets the position of the text elements in the 'text' key with respect to the data points. By default, the text elements are plotted directly at the (x,y) coordinates."
+ },
+ "textfont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font style of this scatter trace's text elements. Has only an effect if 'mode' is set and includes 'text'."
+ },
+ "connectgaps": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not missing data points (i.e. '' or numpy.nan) linked to 'x' and/or 'y', are added in by Plotly using linear interpolation."
+ },
+ "fill": {
+ "key_type": "plot_info",
+ "val_types": "'none' | 'tozeroy' | 'tonexty' | 'tozerox' | 'tonextx",
+ "required": false,
+ "description": "Use to make area-style charts. Determines which area to fill with a solid color.By default, the area will appear in a more-transparent shape of the line color (or of the marker color if 'mode' does not contains 'lines')."
+ },
+ "fillcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the color that will appear in the specified fill area (set in 'fill'). Has no effect if 'fill' is set to 'none'.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'scatter'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"bar": {
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'y' is unset",
- "type": "data",
- "description": "The x coordinates of the bars. If 'x' is linked to an list or array of strings, then the x coordinates are integers [0,1,2,3, ...] labeled on the x-axis by the list or array of strings linked to 'x'. If 'y' is not set, the bars are plotted horizontally, with their length determined by the list or array linked to 'x'.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'x' is unset",
- "type": "data",
- "description": "The y coordinates of the bars. If 'y' is linked to an list or array of strings, then the y coordinates are integers [0,1,2,3, ...] labeled on the y-axis by the list or array of strings linked to 'y'. If 'x' is not set, the bars are plotted vertically, with their length determined by the list or array linked to 'y'.",
- "streamable": true
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "orientation": {
- "val_types": "'v' | 'h'",
- "required": false,
- "type": "plot_info",
- "description": "This defines the direction of the bars. If set to 'v', the length of each bar will run vertically. If set to 'h', the length of each bar will run horizontally"
- },
- "text": {
- "val_types": "array-like of strings",
- "required": false,
- "type": "data",
- "description": "The text elements associated with each bar in this trace. The entries in 'text' will appear on hover only, in a text box located at the top of each bar.",
- "streamable": true
- },
- "error_y": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the vetical error bars (i.e. along the y-axis) that can be drawn from bar tops.",
- "streamable": true
- },
- "error_x": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from bar tops.",
- "streamable": true
- },
- "marker": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing marker style parameters for this bar trace, for example, the bars' fill color, border width and border color.",
- "streamable": true
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "bar",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
- },
- "r": {
- "val_types": "array-like of numbers",
- "required": " when making a Polar Chart",
- "type": "data",
- "description": "For Polar charts only. The radial coordinates of the bars in this polar bar trace about the original; that is, the radial extent of each bar.",
- "streamable": true
- },
- "t": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when making a Polar Chart",
- "type": "data",
- "description": "For Polar charts only. The angular coordinates of the bars in this polar bar trace. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in AngularAxis or/and 'direction' in Layout. If 't' is linked to an array-like of strings, then the angular coordinates are [0, 360\\N, 2*360/N, ...] where N is the number of coordinates given labeled by the array-like of strings linked to 't'.",
- "streamable": true
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "Artifact. Has no effect.",
- "streamable": true
- },
- "textfont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "Not currently supported, has no effect."
+ "name": "Bar",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a bar trace in plotly.",
+ "examples": [
+ "py.plot([Bar(x=['yesterday', 'today', 'tomorrow'], y=[5, 4, 10])])"
+ ],
+ "links": [
+ "https://plot.ly/python/bar-charts/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'y' is unset",
+ "description": "Sets the x coordinates of the bars. If 'x' is linked to a list or 1d numpy array of strings, then the x coordinates are integers, 0, 1, 2, 3, ..., labeled on the x-axis by the list or 1d numpy array of strings linked to 'x'. If 'y' is not set, the bars are plotted horizontally, with their length determined by the list or 1d numpy array linked to 'x'.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'x' is unset",
+ "description": "Sets the y coordinates of the bars. If 'y' is linked to a list or 1d numpy array of strings, then the y coordinates are integers, 0, 1, 2, 3, ..., labeled on the y-axis by the list or 1d numpy array of strings linked to 'y'. If 'x' is not set, the bars are plotted vertically, with their length determined by the list or 1d numpy array linked to 'y'.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "orientation": {
+ "key_type": "plot_info",
+ "val_types": "'v' | 'h'",
+ "required": false,
+ "description": "Sets the direction of the bars. If set to 'v', the length of each bar will run vertically. If set to 'h', the length of each bar will run horizontally"
+ },
+ "text": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of strings",
+ "required": false,
+ "description": "The text elements associated with each bar in this trace. The entries in 'text' will appear on hover only, in a text box located at the top of each bar.",
+ "streamable": true
+ },
+ "error_y": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the vertical error bars (i.e. along the y-axis) that can be drawn from bar tops.",
+ "streamable": true
+ },
+ "error_x": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from bar tops.",
+ "streamable": true
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style parameters for this bar trace, for example, the bars' fill color, border width and border color.",
+ "streamable": true
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "r": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers",
+ "required": " when making a Polar Chart",
+ "description": "For Polar charts only. Sets the radial coordinates of the bars in this polar bar trace about the original; that is, the radial extent of each bar.",
+ "streamable": true
+ },
+ "t": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when making a Polar Chart",
+ "description": "For Polar charts only. Sets the angular coordinates of the bars in this polar bar trace. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in 'angularaxis' or/and 'direction' in 'layout'. If 't' is linked to a list or 1d numpy array of strings, then the angular coordinates are 0, 360\\N, 2*360/N, ... where N is the number of coordinates given labeled by the list or 1d numpy array of strings linked to 't'.",
+ "streamable": true
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'bar'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"histogram": {
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'y' is unset",
- "type": "data",
- "description": "The data sample to be binned (done by Plotly) on the x-axis and plotted as vertical bars.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": " when 'x' is unset",
- "type": "data",
- "description": "The data sample to be binned (done by Plotly) on the y-axis and plotted as horizontal bars.",
- "streamable": true
- },
- "histnorm": {
- "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
- "required": false,
- "type": "style",
- "description": "If histnorm is not specified, or histnorm='' (empty string), the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If histnorm='percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If histnorm='probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If histnorm='density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If histnorm='probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1, i.e. an event must fall into one of the bins."
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "autobinx": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in the XBins object."
- },
- "nbinsx": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
- },
- "xbins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx'=False."
- },
- "autobiny": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in the YBins object."
- },
- "nbinsy": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
- },
- "ybins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny'=False."
- },
- "text": {
- "val_types": "array-like of strings",
- "required": false,
- "type": "data",
- "description": "The text elements associated with each bar in this trace. The entries in 'text' will appear on hover only, in a text box located at the top of each bar.",
- "streamable": true
- },
- "error_y": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the vetical error bars (i.e. along the y-axis) that can be drawn from bar tops.",
- "streamable": true
- },
- "error_x": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from bar tops.",
- "streamable": true
- },
- "marker": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing marker style parameters for this bar trace, for example, the bars' fill color, border width and border color.",
- "streamable": true
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "histogram",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "Artifact. Has no effect.",
- "streamable": true
- },
- "orientation": {
- "val_types": "'v' | 'h'",
- "required": false,
- "type": "plot_info",
- "description": "Web GUI Artifact. Histogram orientation is determined by which of 'x' or 'y' the data sample is linked to."
+ "name": "Histogram",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a histogram trace in plotly.",
+ "examples": [
+ "py.plot([Histogram(x=[1,1,2,3,2,3,3])]) # bins along x-axis",
+ "py.plot([Histogram(y=[1,1,2,3,2,3,3])]) # bins along y-axis"
+ ],
+ "links": [
+ "https://plot.ly/python/histograms/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'y' is unset",
+ "description": "Sets the data sample to be binned (done by Plotly) on the x-axis and plotted as vertical bars.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": " when 'x' is unset",
+ "description": "Sets the data sample to be binned (done by Plotly) on the y-axis and plotted as horizontal bars.",
+ "streamable": true
+ },
+ "histnorm": {
+ "key_type": "style",
+ "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
+ "required": false,
+ "description": "Sets the type of normalization for this histogram trace. If 'histnorm' is not specified, or set to '' (empty string) or set to 'count', the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If set to 'percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If set to 'probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If set to 'density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If set to 'probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1."
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "autobinx": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in 'xbins' object."
+ },
+ "nbinsx": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
+ },
+ "xbins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx' is set to False."
+ },
+ "autobiny": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in 'ybins' object."
+ },
+ "nbinsy": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
+ },
+ "ybins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny' is set to False."
+ },
+ "text": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of strings",
+ "required": false,
+ "description": "The text elements associated with each bar in this trace. The entries in 'text' will appear on hover only, in a text box located at the top of each bar.",
+ "streamable": true
+ },
+ "error_y": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the vertical error bars (i.e. along the y-axis) that can be drawn from bar tops.",
+ "streamable": true
+ },
+ "error_x": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the horizontal error bars (i.e. along the x-axis) that can be drawn from bar tops.",
+ "streamable": true
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style parameters for this bar trace, for example, the bars' fill color, border width and border color.",
+ "streamable": true
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'histogram'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"box": {
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "This array is used to define an individual box plot, or, a concatenation of multiple box plots. Statistics from these numbers define the bounds of the box, the length of the whiskers, etc. For details on defining multiple boxes with locations see 'x'. Each box spans from the first quartile to the third. The second quartile is marked by a line inside the box. By default, the whiskers are correspond to box' edges +/- 1.5 times the interquartile range. See also 'boxpoints' for more info",
- "streamable": true
- },
- "x0": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "The location of this box. When 'y' defines a single box, 'x0' can be used to set where this box is centered on the x-axis. If many boxes are set to appear at the same 'x0' location, they will form a box group."
- },
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "code": ">>> y0 = [1,2,3,1,1]>>> y1 = [3,2,1,2,3]>>> y = y0+y1 # N.B. list not numpy arrays here>>> x = [0,0,0,0,0,1,1,1,1,1] # len(x) == len(y)>>> Box(y=y, x=x, name='two boxes SHARE this name.')",
- "description": "Usually, you do not need to set this value as plotly will handle box locations for you. However this allows you to have fine control over the location data for the box. Unlike making a bar, a box plot is made of many y values. Therefore, to give location data to the values you place in 'y', the length of 'x' must equal the length of 'y'. when making multiple box plots, you can concatenate the data sets for each box into a single 'y' array. then, the entries in 'x' define which box plot each entry in 'y' belongs to. When making a single box plot, you must set each entry in 'x' to the same value, see 'x0' for a more practical way to handle this case. If you don't include 'x', the box will simply be assigned a location.",
- "required": false,
- "streamable": true,
- "type": "data"
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "boxmean": {
- "val_types": "False | True | 'sd'",
- "required": false,
- "type": "style",
- "description": "Choose between add-on features for this box trace. If True then the mean of the data linked to 'y' is shown as a dashed line in the box. If 'sd', then the standard deviation is also shown. If False (the default), then no line shown."
- },
- "boxpoints": {
- "val_types": "'outliers' | 'all' | 'suspectedoutliers' | False",
- "required": false,
- "type": "style",
- "description": "Choose between boxpoints options for this box trace. If 'outliers' (the default), then only the points lying outside the box' whiskers (more info in 'y') are shown. If 'all', then all data points linked 'y' are shown. If 'suspectedoutliers', then outliers points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (with 'outliercolor' in Marker). If False, then only the boxes are shown and the whiskers correspond to the minimum and maximum value linked to 'y'."
- },
- "jitter": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the width of the jitter in the boxpoints scatter in this trace. Has an no effect if 'boxpoints' is set to False. If 0, then the boxpoints are aligned vertically. If 1 then the boxpoints are placed in a random horizontal jitter of width equal to the width of the boxes."
- },
- "pointpos": {
- "val_types": "number: x in [-2, 2]",
- "required": false,
- "type": "style",
- "description": "Sets the horizontal position of the boxpoints in relation to the boxes in this trace. Has an no effect if 'boxpoints' is set to False. If 0, then the boxpoints are placed over the center of each box. If 1 (-1), then the boxpoints are placed on the right (left) each box border. If 2 (-2), then the boxpoints are placed 1 one box width to right (left) of each box. "
- },
- "whiskerwidth": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the width of the whisker of the box relative to the box' width (in normalized coordinates, e.g. if 'whiskerwidth' set 1, then the whiskers are as wide as the box."
- },
- "fillcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the color of the box interior.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "marker": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing marker style parameters for this the boxpoints of box trace. Has an effect only 'boxpoints' is set to 'outliers', 'suspectedoutliers' or 'all'.",
- "streamable": true
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing line style parameters for the border of this box trace (including the whiskers).",
- "streamable": true
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "box",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ "name": "Box",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a box trace in plotly.",
+ "examples": [
+ "py.plot([Box(name='boxy', y=[1,3,9,2,4,2,3,5,2])])"
+ ],
+ "links": [
+ "https://plot.ly/python/box-plots/"
+ ],
+ "keymeta": {
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "This array is used to define an individual box plot, or, a concatenation of multiple box plots. Statistics from these numbers define the bounds of the box, the length of the whiskers, etc. For details on defining multiple boxes with locations see 'x'. Each box spans from the first quartile to the third. The second quartile is marked by a line inside the box. By default, the whiskers are correspond to box' edges +/- 1.5 times the interquartile range. See also 'boxpoints' for more info",
+ "streamable": true
+ },
+ "x0": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "The location of this box. When 'y' defines a single box, 'x0' can be used to set where this box is centered on the x-axis. If many boxes are set to appear at the same 'x0' location, they will form a box group."
+ },
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Usually, you do not need to set this value as plotly will handle box locations for you. However this allows you to have fine control over the location data for the box. Unlike making a bar, a box plot is made of many y values. Therefore, to give location data to the values you place in 'y', the length of 'x' must equal the length of 'y'. when making multiple box plots, you can concatenate the data sets for each box into a single 'y' array. then, the entries in 'x' define which box plot each entry in 'y' belongs to. When making a single box plot, you must set each entry in 'x' to the same value, see 'x0' for a more practical way to handle this case. If you don't include 'x', the box will simply be assigned a location.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "boxmean": {
+ "key_type": "style",
+ "val_types": "False | True | 'sd'",
+ "required": false,
+ "description": "Choose between add-on features for this box trace. If True then the mean of the data linked to 'y' is shown as a dashed line in the box. If 'sd', then the standard deviation is also shown. If False (the default), then no line are shown."
+ },
+ "boxpoints": {
+ "key_type": "style",
+ "val_types": "'outliers' | 'all' | 'suspectedoutliers' | False",
+ "required": false,
+ "description": "Choose between boxpoints options for this box trace. If 'outliers' (the default), then only the points lying outside the box' whiskers (more info in 'y') are shown. If 'all', then all data points linked 'y' are shown. If 'suspectedoutliers', then outliers points are shown and points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted (with 'outliercolor' in Marker). If False, then only the boxes are shown and the whiskers correspond to the minimum and maximum value linked to 'y'."
+ },
+ "jitter": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the width of the jitter in the boxpoints scatter in this trace. Has an no effect if 'boxpoints' is set to False. If 0, then the boxpoints are aligned vertically. If 1 then the boxpoints are placed in a random horizontal jitter of width equal to the width of the boxes."
+ },
+ "pointpos": {
+ "key_type": "style",
+ "val_types": "number: x in [-2, 2]",
+ "required": false,
+ "description": "Sets the horizontal position of the boxpoints in relation to the boxes in this trace. Has an no effect if 'boxpoints' is set to False. If 0, then the boxpoints are placed over the center of each box. If 1 (-1), then the boxpoints are placed on the right (left) each box border. If 2 (-2), then the boxpoints are placed 1 one box width to right (left) of each box. "
+ },
+ "whiskerwidth": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the width of the whisker of the box relative to the box' width (in normalized coordinates, e.g. if 'whiskerwidth' set 1, then the whiskers are as wide as the box."
+ },
+ "fillcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the color of the box interior.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style parameters for this the boxpoints of box trace. Has an effect only 'boxpoints' is set to 'outliers', 'suspectedoutliers' or 'all'.",
+ "streamable": true
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for the border of this box trace (including the whiskers).",
+ "streamable": true
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'box'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"heatmap": {
- "z": {
- "val_types": "matrix-like: list of lists, numpy.matrix",
- "required": true,
- "type": "data",
- "description": "The data that describes the mapping. The dimensions of the 'z' matrix are (n x m) where there are 'n' ROWS defining the number of partitions along the y-axis; this is equal to the length of the 'y' array. There are 'm' COLUMNS defining the number of partitions along the x-axis; this is equal to the length of the 'x' array. Therefore, the color of the cell z[i][j] is mapped to the ith partition of the y-axis (starting from the bottom of the plot) and the jth partition of the x-axis (starting from the left of the plot). In Python, a (non-numpy) matrix is best thought of as a list of lists (of lists, of lists, etc.). Therefore, running len(z) will give you the number of ROWS and running len(z[0]) will give you the number of COLUMNS. If you ARE using numpy, then running z.shape will give you the tuple, (n, m), e.g., (3, 5).",
- "streamable": true
- },
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "This array-like value contains the horizontal coordinates referring to the columns of the 'z' matrix. if strings, the x-labels are spaced evenly. If the dimensions of z are (n x m), the length of the 'x' array should be 'm'.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "This array-like value contains the vertical coordinates referring to the rows of the 'z' matrix. If strings, the y-labels are spaced evenly. If the dimensions of z are (n x m), the length of the 'y' array should be 'n'.",
- "streamable": true
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "zauto": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
- },
- "zmin": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
- },
- "zmax": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
- },
- "colorscale": {
- "val_types": "array_like of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
- "required": false,
- "type": "style",
- "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list of color-value pairs where, by default, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
- "examples": [
- "'Greys'",
- [
- [
- 0,
- "rgb(0,0,0)"
- ],
- [
- 0.5,
- "rgb(65, 182, 196)"
- ],
- [
- 1,
- "rgb(255,255,255)"
- ]
+ "name": "Heatmap",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a heatmap trace in plotly.",
+ "examples": [
+ "z = [[0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0]]",
+ "y = ['a', 'b', 'c']",
+ "x = [1, 2, 3, 4, 5]py.plot([Contour(z=z, x=x, y=y)])"
+ ],
+ "links": [
+ "https://plot.ly/python/heatmaps/"
+ ],
+ "keymeta": {
+ "z": {
+ "key_type": "data",
+ "val_types": "list of lists or 2d numpy array of numbers",
+ "required": true,
+ "description": "Sets the data that describes the heatmap mapping. Say the dimensions of the list of lists or 2d numpy array linked to 'z' has n rows and m columns then the resulting heatmap will show n partitions along the y-axis and m partitions along the x-axis. Therefore, the i-th row/ j-th column cell in the list of lists or 2d numpy array linked to '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). ",
+ "streamable": true
+ },
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the horizontal coordinates referring to the columns of the list of lists or 2d numpy array linked to 'z'. If the 'z' is a list or 1d numpy array of strings, then the x-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'x' array should equal m.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the vertical coordinates referring to the rows of the list of lists or 2d numpy array linked to 'z'. If strings, the y-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'y' array should equal n.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "zauto": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
+ },
+ "zmin": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "zmax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
]
- ]
- },
- "reversescale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale will be reversed."
- },
- "showscale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
- },
- "colorbar": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
- },
- "zsmooth": {
- "val_types": " False | 'best' | 'fast' ",
- "required": false,
- "type": "style",
- "description": "Choose between algorithms ('best' or 'fast') to smooth data linked to 'z'. The default value is False corresponding to no smoothing."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "x0": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "The location of the first coordinate of the x-axis. Use with 'dx' an alternative to an 'x' list/array. Has no effect if 'x' is set."
- },
- "dx": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Spacing between x-axis coordinates. Use with 'x0' an alternative to an 'x' list/array. Has no effect if 'x' is set."
- },
- "y0": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "The location of the first coordinate of the y-axis. Use with 'dy' an alternative to an 'y' list/array. Has no effect if 'y' is set."
- },
- "dy": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Spacing between y-axis coordinates. Use with 'y0' an alternative to an 'y' list/array. Has no effect if 'y' is set."
- },
- "xtype": {
- "val_types": [
- "'array' | 'scaled'"
- ],
- "required": false,
- "type": "plot_info",
- "description": "If set to 'scaled' and 'x' is linked to a list/array, then the horizontal labels are scaled to a list of integers of unit step starting from 0."
- },
- "ytype": {
- "val_types": [
- "'array' | 'scaled'"
- ],
- "required": false,
- "type": "plot_info",
- "description": "If set to 'scaled' and 'y' is linked to a list/array, then the vertical labels are scaled to a list of integers of unit step starting from 0."
- },
- "type": {
- "val_types": "heatmap",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ },
+ "reversescale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale will be reversed."
+ },
+ "showscale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
+ },
+ "colorbar": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
+ },
+ "zsmooth": {
+ "key_type": "style",
+ "val_types": "False | 'best' | 'fast'",
+ "required": false,
+ "description": "Choose between algorithms ('best' or 'fast') to smooth data linked to 'z'. The default value is False corresponding to no smoothing."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "x0": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "The location of the first coordinate of the x-axis. Use with 'dx' an alternative to an 'x' list or 1d numpy array. Has no effect if 'x' is set."
+ },
+ "dx": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Spacing between x-axis coordinates. Use with 'x0' an alternative to an 'x' list or 1d numpy array. Has no effect if 'x' is set."
+ },
+ "y0": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "The location of the first coordinate of the y-axis. Use with 'dy' an alternative to an 'y' list or 1d numpy array. Has no effect if 'y' is set."
+ },
+ "dy": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Spacing between y-axis coordinates. Use with 'y0' an alternative to an 'y' list or 1d numpy array. Has no effect if 'y' is set."
+ },
+ "xtype": {
+ "key_type": "plot_info",
+ "val_types": "'array' | 'scaled'",
+ "required": false,
+ "description": "If set to 'scaled' and 'x' is linked to a list or 1d numpy array, then the horizontal labels are scaled to a list or 1d numpy array of integers of unit step starting from 0."
+ },
+ "ytype": {
+ "key_type": "plot_info",
+ "val_types": "'array' | 'scaled'",
+ "required": false,
+ "description": "If set to 'scaled' and 'y' is linked to a list or 1d numpy array, then the vertical labels are scaled to a list or 1d numpy array of integers of unit step starting from 0."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'heatmap'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"contour": {
- "z": {
- "val_types": "matrix-like: list of lists, numpy.matrix",
- "required": true,
- "type": "data",
- "description": "The data that describes the mapping. The dimensions of the 'z' matrix are (n x m) where there are 'n' ROWS defining the number of partitions along the y-axis; this is equal to the length of the 'y' array. There are 'm' COLUMNS defining the number of partitions along the x-axis; this is equal to the length of the 'x' array. Therefore, the color of the cell z[i][j] is mapped to the ith partition of the y-axis (starting from the bottom of the plot) and the jth partition of the x-axis (starting from the left of the plot). In Python, a (non-numpy) matrix is best thought of as a list of lists (of lists, of lists, etc.). Therefore, running len(z) will give you the number of ROWS and running len(z[0]) will give you the number of COLUMNS. If you ARE using numpy, then running z.shape will give you the tuple, (n, m), e.g., (3, 5).",
- "streamable": true
- },
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "This array-like value contains the horizontal coordinates referring to the columns of the 'z' matrix. if strings, the x-labels are spaced evenly. If the dimensions of z are (n x m), the length of the 'x' array should be 'm'.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "This array-like value contains the vertical coordinates referring to the rows of the 'z' matrix. If strings, the y-labels are spaced evenly. If the dimensions of z are (n x m), the length of the 'y' array should be 'n'.",
- "streamable": true
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "zauto": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
- },
- "zmin": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
- },
- "zmax": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
- },
- "autocontour": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the contour parameters are picked automatically by Plotly. If False, declare the contours parameters in the Contours object."
- },
- "ncontours": {
- "val_types": "number: x > 1",
- "required": false,
- "type": "style",
- "description": "Specifies the number of contours lines in the contour plot. No need to set 'autocontour' to False for 'ncontours' to apply."
- },
- "contours": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the contours of this trace."
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing line style parameters for contour lines of this contour trace (including line width, dash, color and smoothing level). Has no an effect if 'showlines' is set to False in Contours.",
- "streamable": true
- },
- "colorscale": {
- "val_types": "array_like of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
- "required": false,
- "type": "style",
- "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list of color-value pairs where, by default, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
- "examples": [
- "'Greys'",
- [
- [
- 0,
- "rgb(0,0,0)"
- ],
- [
- 0.5,
- "rgb(65, 182, 196)"
- ],
- [
- 1,
- "rgb(255,255,255)"
- ]
+ "name": "Contour",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a contour trace in plotly.",
+ "examples": [
+ "z = [[0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0]]",
+ "y = ['a', 'b', 'c']",
+ "x = [1, 2, 3, 4, 5]py.plot([Contour(z=z, x=x, y=y)])"
+ ],
+ "links": [
+ "https://plot.ly/python/contour-plots/"
+ ],
+ "keymeta": {
+ "z": {
+ "key_type": "data",
+ "val_types": "list of lists or 2d numpy array of numbers",
+ "required": true,
+ "description": "Sets the data that describes the contour map mapping. Say the dimensions of the list of lists or 2d numpy array linked to 'z' has n rows and m columns then the resulting contour map will show n partitions along the y-axis and m partitions along the x-axis. Therefore, the i-th row/ j-th column cell in the list of lists or 2d numpy array linked to '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). ",
+ "streamable": true
+ },
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the horizontal coordinates referring to the columns of the list of lists or 2d numpy array linked to 'z'. If the 'z' is a list or 1d numpy array of strings, then the x-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'x' array should equal m.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the vertical coordinates referring to the rows of the list of lists or 2d numpy array linked to 'z'. If strings, the y-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'y' array should equal n.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "zauto": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
+ },
+ "zmin": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "zmax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "autocontour": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the contour parameters are picked automatically by Plotly. If False, declare the contours parameters in 'contours'."
+ },
+ "ncontours": {
+ "key_type": "style",
+ "val_types": "number: x > 1",
+ "required": false,
+ "description": "Specifies the number of contours lines in the contour plot. No need to set 'autocontour' to False for 'ncontours' to apply."
+ },
+ "contours": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the contours of this trace."
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for contour lines of this contour trace (including line width, dash, color and smoothing level). Has no an effect if 'showlines' is set to False in 'contours'.",
+ "streamable": true
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
]
- ]
- },
- "reversescale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale will be reversed."
- },
- "showscale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
- },
- "colorbar": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "x0": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "The location of the first coordinate of the x-axis. Use with 'dx' an alternative to an 'x' list/array. Has no effect if 'x' is set."
- },
- "dx": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Spacing between x-axis coordinates. Use with 'x0' an alternative to an 'x' list/array. Has no effect if 'x' is set."
- },
- "y0": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "The location of the first coordinate of the y-axis. Use with 'dy' an alternative to an 'y' list/array. Has no effect if 'y' is set."
- },
- "dy": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Spacing between y-axis coordinates. Use with 'y0' an alternative to an 'y' list/array. Has no effect if 'y' is set."
- },
- "xtype": {
- "val_types": [
- "'array' | 'scaled'"
- ],
- "required": false,
- "type": "plot_info",
- "description": "If set to 'scaled' and 'x' is linked to a list/array, then the horizontal labels are scaled to a list of integers of unit step starting from 0."
- },
- "ytype": {
- "val_types": [
- "'array' | 'scaled'"
- ],
- "required": false,
- "type": "plot_info",
- "description": "If set to 'scaled' and 'y' is linked to a list/array, then the vertical labels are scaled to a list of integers of unit step starting from 0."
- },
- "type": {
- "val_types": "contour",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ },
+ "reversescale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale will be reversed."
+ },
+ "showscale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
+ },
+ "colorbar": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "x0": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "The location of the first coordinate of the x-axis. Use with 'dx' an alternative to an 'x' list or 1d numpy array. Has no effect if 'x' is set."
+ },
+ "dx": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Spacing between x-axis coordinates. Use with 'x0' an alternative to an 'x' list or 1d numpy array. Has no effect if 'x' is set."
+ },
+ "y0": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "The location of the first coordinate of the y-axis. Use with 'dy' an alternative to an 'y' list or 1d numpy array. Has no effect if 'y' is set."
+ },
+ "dy": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Spacing between y-axis coordinates. Use with 'y0' an alternative to an 'y' list or 1d numpy array. Has no effect if 'y' is set."
+ },
+ "xtype": {
+ "key_type": "plot_info",
+ "val_types": "'array' | 'scaled'",
+ "required": false,
+ "description": "If set to 'scaled' and 'x' is linked to a list or 1d numpy array, then the horizontal labels are scaled to a list or 1d numpy array of integers of unit step starting from 0."
+ },
+ "ytype": {
+ "key_type": "plot_info",
+ "val_types": "'array' | 'scaled'",
+ "required": false,
+ "description": "If set to 'scaled' and 'y' is linked to a list or 1d numpy array, then the vertical labels are scaled to a list or 1d numpy array of integers of unit step starting from 0."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'contour'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"histogram2d": {
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "The data sample to be binned on the x-axis and whose distribution (computed by Plotly) will correspond to the x-coordinates of this 2D histogram trace.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "The data sample to be binned on the y-axis and whose distribution (computed by Plotly) will correspond to the y-coordinates of this 2D histogram trace.",
- "streamable": true
- },
- "histnorm": {
- "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
- "required": false,
- "type": "style",
- "description": "If histnorm is not specified, or histnorm='' (empty string), the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If histnorm='percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If histnorm='probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If histnorm='density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If histnorm='probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1, i.e. an event must fall into one of the bins."
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "autobinx": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in the XBins object."
- },
- "nbinsx": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
- },
- "xbins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx'=False."
- },
- "autobiny": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in the YBins object."
- },
- "nbinsy": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
- },
- "ybins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny'=False."
- },
- "colorscale": {
- "val_types": "array_like of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
- "required": false,
- "type": "style",
- "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list of color-value pairs where, by default, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
- "examples": [
- "'Greys'",
- [
- [
- 0,
- "rgb(0,0,0)"
- ],
- [
- 0.5,
- "rgb(65, 182, 196)"
- ],
- [
- 1,
- "rgb(255,255,255)"
- ]
+ "name": "Histogram2d",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a 2D histogram trace in plotly.",
+ "examples": [
+ "import numpy as np",
+ "x = np.random.randn(500)",
+ "y = np.random.randn(500)+1",
+ "py.iplot([Histogram2d(x=x, y=y)])"
+ ],
+ "links": [
+ "https://plot.ly/python/2D-Histograms/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the data sample to be binned on the x-axis and whose distribution (computed by Plotly) will correspond to the x-coordinates of this 2D histogram trace.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the data sample to be binned on the y-axis and whose distribution (computed by Plotly) will correspond to the y-coordinates of this 2D histogram trace.",
+ "streamable": true
+ },
+ "histnorm": {
+ "key_type": "style",
+ "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
+ "required": false,
+ "description": "Sets the type of normalization for this histogram trace. If 'histnorm' is not specified, or set to '' (empty string) or set to 'count', the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If set to 'percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If set to 'probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If set to 'density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If set to 'probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1."
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "autobinx": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in 'xbins' object."
+ },
+ "nbinsx": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
+ },
+ "xbins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx' is set to False."
+ },
+ "autobiny": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in 'ybins' object."
+ },
+ "nbinsy": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
+ },
+ "ybins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny' is set to False."
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
]
- ]
- },
- "reversescale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale will be reversed."
- },
- "showscale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
- },
- "colorbar": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
- },
- "zauto": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
- },
- "zmin": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
- },
- "zmax": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
- },
- "zsmooth": {
- "val_types": " False | 'best' | 'fast' ",
- "required": false,
- "type": "style",
- "description": "Choose between algorithms ('best' or 'fast') to smooth data linked to 'z'. The default value is False corresponding to no smoothing."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "histogram2d",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ },
+ "reversescale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale will be reversed."
+ },
+ "showscale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
+ },
+ "colorbar": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
+ },
+ "zauto": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
+ },
+ "zmin": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "zmax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "zsmooth": {
+ "key_type": "style",
+ "val_types": "False | 'best' | 'fast'",
+ "required": false,
+ "description": "Choose between algorithms ('best' or 'fast') to smooth data linked to 'z'. The default value is False corresponding to no smoothing."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'histogram2d'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"histogram2dcontour": {
- "x": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "The data sample to be binned on the x-axis and whose distribution (computed by Plotly) will correspond to the x-coordinates of this 2D histogram trace.",
- "streamable": true
- },
- "y": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "The data sample to be binned on the y-axis and whose distribution (computed by Plotly) will correspond to the y-coordinates of this 2D histogram trace.",
- "streamable": true
- },
- "histnorm": {
- "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
- "required": false,
- "type": "style",
- "description": "If histnorm is not specified, or histnorm='' (empty string), the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If histnorm='percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If histnorm='probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If histnorm='density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If histnorm='probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1, i.e. an event must fall into one of the bins."
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "autobinx": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in the XBins object."
- },
- "nbinsx": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
- },
- "xbins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx'=False."
- },
- "autobiny": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in the YBins object."
- },
- "nbinsy": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
- },
- "ybins": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny'=False."
- },
- "autocontour": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the contour parameters are picked automatically by Plotly. If False, declare the contours parameters in the Contours object."
- },
- "ncontours": {
- "val_types": "number: x > 1",
- "required": false,
- "type": "style",
- "description": "Specifies the number of contours lines in the contour plot. No need to set 'autocontour' to False for 'ncontours' to apply."
- },
- "contours": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the contours of this trace."
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing line style parameters for contour lines of this contour trace (including line width, dash, color and smoothing level). Has no an effect if 'showlines' is set to False in Contours.",
- "streamable": true
- },
- "colorscale": {
- "val_types": "array_like of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
- "required": false,
- "type": "style",
- "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list of color-value pairs where, by default, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
- "examples": [
- "'Greys'",
- [
- [
- 0,
- "rgb(0,0,0)"
- ],
- [
- 0.5,
- "rgb(65, 182, 196)"
- ],
- [
- 1,
- "rgb(255,255,255)"
- ]
+ "name": "Histogram2dContour",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a 2D histogram contour trace in plotly.",
+ "examples": [
+ "import numpy as np",
+ "x = np.random.randn(500)",
+ "y = np.random.randn(500)+1",
+ "py.iplot([Histogram2dContour(x=x, y=y)])"
+ ],
+ "links": [
+ "https://plot.ly/python/2D-Histograms/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the data sample to be binned on the x-axis and whose distribution (computed by Plotly) will correspond to the x-coordinates of this 2D histogram trace.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the data sample to be binned on the y-axis and whose distribution (computed by Plotly) will correspond to the y-coordinates of this 2D histogram trace.",
+ "streamable": true
+ },
+ "histnorm": {
+ "key_type": "style",
+ "val_types": "'' (or 'count') | 'percent' | 'probability' | 'density' | 'probability density'",
+ "required": false,
+ "description": "Sets the type of normalization for this histogram trace. If 'histnorm' is not specified, or set to '' (empty string) or set to 'count', the height of each bar displays the frequency of occurrence, i.e., the number of times this value was found in the corresponding bin. If set to 'percent', the height of each bar displays the percentage of total occurrences found within the corresponding bin. If set to 'probability', the height of each bar displays the probability that an event will fall into the corresponding bin. If set to 'density', the height of each bar is equal to the number of occurrences in a bin divided by the size of the bin interval such that summing the area of all bins will yield the total number of occurrences. If set to 'probability density', the height of each bar is equal to the number of probability that an event will fall into the corresponding bin divided by the size of the bin interval such that summing the area of all bins will yield 1."
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "autobinx": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the x-axis bin parameters are picked automatically by Plotly. Once 'autobinx' is set to False, the x-axis bins parameters can be declared in 'xbins' object."
+ },
+ "nbinsx": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of x-axis bins. No need to set 'autobinx' to False for 'nbinsx' to apply."
+ },
+ "xbins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of x-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobinx' is set to False."
+ },
+ "autobiny": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the y-axis bin parameters are picked automatically by Plotly. Once 'autobiny' is set to False, the y-axis bins parameters can be declared in 'ybins' object."
+ },
+ "nbinsy": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Specifies the number of y-axis bins. No need to set 'autobiny' to False for 'nbinsy' to apply."
+ },
+ "ybins": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of y-axis bins of this trace, for example, the bin width and the bins' starting and ending value. Has an effect only if 'autobiny' is set to False."
+ },
+ "autocontour": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the contour parameters are picked automatically by Plotly. If False, declare the contours parameters in 'contours'."
+ },
+ "ncontours": {
+ "key_type": "style",
+ "val_types": "number: x > 1",
+ "required": false,
+ "description": "Specifies the number of contours lines in the contour plot. No need to set 'autocontour' to False for 'ncontours' to apply."
+ },
+ "contours": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the contours of this trace."
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for contour lines of this contour trace (including line width, dash, color and smoothing level). Has no an effect if 'showlines' is set to False in 'contours'.",
+ "streamable": true
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
]
- ]
- },
- "reversescale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale will be reversed."
- },
- "showscale": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
- },
- "colorbar": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
- },
- "zauto": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
- },
- "zmin": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
- },
- "zmax": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "xaxis": {
- "val_types": "'x1' | 'x2' | 'x3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to layout['xaxis'], 'x2' references layout['xaxis2'], and so on. Note that 'x1' will always refer to layout['xaxis'] or layout['xaxis1'], they are the same."
- },
- "yaxis": {
- "val_types": "'y1' | 'y2' | 'y3' | etc.",
- "required": false,
- "type": "plot_info",
- "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to layout['yaxis'], 'y2' references layout['yaxis2'], and so on. Note that 'y1' will always refer to layout['yaxis'] or layout['yaxis1'], they are the same."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "type": {
- "val_types": "histogram2dcontour",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ },
+ "reversescale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale will be reversed."
+ },
+ "showscale": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the color scale associated with this mapping will be shown alongside the figure."
+ },
+ "colorbar": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the color bar associated with this trace (including its title, length and width)."
+ },
+ "zauto": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the default values of 'zmax' and 'zmax' can be overwritten."
+ },
+ "zmin": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the minimum 'z' data value to be resolved by the color scale. Its default value is the minimum of the 'z' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "zmax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the maximum 'z' data value to be resolved by the color scale. Its default value is the maximum of the 'z' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "xaxis": {
+ "key_type": "plot_info",
+ "val_types": "'x1' | 'x2' | 'x3' | etc.",
+ "required": false,
+ "description": "This key determines which x-axis the x-coordinates of this trace will reference in the figure. Values 'x1' and 'x' reference to 'xaxis' in 'layout', 'x2' references to 'xaxis2' in 'layout', and so on. Note that 'x1' will always refer to 'xaxis' or 'xaxis1' in 'layout', they are the same."
+ },
+ "yaxis": {
+ "key_type": "plot_info",
+ "val_types": "'y1' | 'y2' | 'y3' | etc.",
+ "required": false,
+ "description": "This key determines which y-axis the y-coordinates of this trace will reference in the figure. Values 'y1' and 'y' reference to 'yaxis' in 'layout', 'y2' references to 'yaxis2' in 'layout', and so on. Note that 'y1' will always refer to 'yaxis' or 'yaxis1' in 'layout', they are the same."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'histogram2dcontour'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"area": {
- "r": {
- "val_types": "array-like of numbers",
- "required": true,
- "type": "data",
- "description": "The radial coordinates of the circle sectors in this polar area trace about the origin; that is, the radial extent of each circle sector.",
- "streamable": true
- },
- "t": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": true,
- "type": "data",
- "description": "The angular coordinates of the circle sectors in this polar area trace. There are as many sectors as coordinates linked to 't' and 'r'. Each sector is drawn about the coordinates linked to 't', where they spanned symmetrically in both the positive and negative angular directions. The angular extent of each sector is equal to the angular range (360 degree by default) divided by the number of sectors. Note that the sectors are drawn in order; coordinates at the end of the array may overlay the coordinates at the start. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in AngularAxis or/and 'direction' in Layout. If 't' is linked to an array-like of strings, then the angular coordinates are [0, 360\\N, 2*360/N, ...] where N is the number of coordinates given labeled by the array-like of strings linked to 't'.",
- "streamable": true
- },
- "name": {
- "val_types": "string",
- "required": false,
- "type": "data",
- "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
- },
- "marker": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing marker style of the area sectors of this trace, for example the sector fill color and sector boundary line width and sector boundary color.",
- "streamable": true
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this trace will be labeled in the legend."
- },
- "stream": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "The stream dictionary-like object that initializes traces as writable-streams, for use with the real-time streaming API. Learn more here:\nhttps://plot.ly/python/streaming/"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
- },
- "angularaxis": {
- "val_types": "",
- "required": false,
- "type": "plot_info",
- "description": "Polar chart subplots are not supported yet. Info coming soon"
- },
- "radialaxis": {
- "val_types": "",
- "required": false,
- "type": "plot_info",
- "description": "Polar chart subplots are not supported yet. Info coming soon"
- },
- "type": {
- "val_types": "area",
- "required": false,
- "type": "plot_info",
- "description": "Plotly identifier for this data's trace type. This defines how this data dictionary will be handled. For example, 'scatter' type expects x and y data-arrays corresponding to (x, y) coordinates whereas a 'histogram' only requires a single x or y array and a 'heatmap' type requires a z matrix."
+ "name": "Area",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing an area trace in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/polar-chart/"
+ ],
+ "keymeta": {
+ "r": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers",
+ "required": true,
+ "description": "Sets the radial coordinates of the circle sectors in this polar area trace about the origin; that is, the radial extent of each circle sector.",
+ "streamable": true
+ },
+ "t": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the angular coordinates of the circle sectors in this polar area trace. There are as many sectors as coordinates linked to 't' and 'r'. Each sector is drawn about the coordinates linked to 't', where they spanned symmetrically in both the positive and negative angular directions. The angular extent of each sector is equal to the angular range (360 degree by default) divided by the number of sectors. Note that the sectors are drawn in order; coordinates at the end of the array may overlay the coordinates at the start. By default, the angular coordinates are in degrees (0 to 360) where the angles are measured clockwise about the right-hand side of the origin. To change this behavior, modify 'range' in 'angularaxis' or/and 'direction' in 'layout'. If 't' is linked to a list or 1d numpy array of strings, then the angular coordinates are 0, 360\\N, 2*360/N, ... where N is the number of coordinates given labeled by the list or 1d numpy array of strings linked to 't'.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the legend, on hover and in the column header in the online spreadsheet."
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style of the area sectors of this trace, for example the sector fill color and sector boundary line width and sector boundary color.",
+ "streamable": true
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this trace will be labeled in the legend."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "angularaxis": {
+ "key_type": "plot_info",
+ "val_types": "",
+ "required": false,
+ "description": "Polar chart subplots are not supported yet. Info coming soon"
+ },
+ "radialaxis": {
+ "key_type": "plot_info",
+ "val_types": "",
+ "required": false,
+ "description": "Polar chart subplots are not supported yet. Info coming soon"
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'area'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
+ }
+ },
+ "scatter3d": {
+ "name": "Scatter3d",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a 3D scatter trace in plotly.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the x coordinates of the points of this 3D scatter trace. If 'x' is linked to a list or 1d numpy array of strings, then the x coordinates are integers, 0, 1, 2, 3, ..., labeled on the x-axis by the list or 1d numpy array of strings linked to 'x'.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the y coordinates of the points of this 3D scatter trace. If 'y' is linked to a list or 1d numpy array of strings, then the y coordinates are integers, 0, 1, 2, 3, ..., labeled on the y-axis by the list or 1d numpy array of strings linked to 'y'.",
+ "streamable": true
+ },
+ "z": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": true,
+ "description": "Sets the z coordinates of the points of this scatter trace. If 'z' is linked to a list or 1d numpy array of strings, then the z coordinates are integers, 0, 1, 2, 3, ..., labeled on the z-axis by the list or 1d numpy array of strings linked to 'z'.",
+ "streamable": true
+ },
+ "mode": {
+ "key_type": "plot_info",
+ "val_types": "'lines' | 'markers' | 'text' | 'lines+markers' | 'lines+text' | 'markers+text' | 'lines+markers+text'",
+ "required": false,
+ "description": "Plotting mode for this 3D scatter trace. If the mode includes 'text' then the 'text' will appear at the (x,y) points, otherwise it will appear on hover."
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the column header in the online spreadsheet."
+ },
+ "text": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of strings",
+ "required": false,
+ "description": "The text elements associated with each (x,y,z) pair in this 3D scatter trace. If the scatter 'mode' does not include 'text' then elements linked to 'text' will appear on hover only. In contrast, if 'text' is included in 'mode', the elements in 'text' will be rendered on the plot at the locations specified in part by their corresponding (x,y,z) coordinate pair and the 'textposition' key.",
+ "streamable": true
+ },
+ "error_z": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the z-axis error bars that can be drawn from the (x,y,z) coordinates of this 3D scatter trace.",
+ "streamable": true
+ },
+ "error_y": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the y-axis error bars that can be drawn from the (x,y,z) coordinates of this 3D scatter trace.",
+ "streamable": true
+ },
+ "error_x": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the x-axis error bars that can be drawn from the (x,y,z) coordinates of this 3D scatter trace.",
+ "streamable": true
+ },
+ "marker": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing marker style parameters for this 3D scatter trace. Has an effect only if 'mode' contains 'markers'.",
+ "streamable": true
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for this 3D scatter trace. Has an effect only if 'mode' contains 'lines'.",
+ "streamable": true
+ },
+ "textposition": {
+ "key_type": "style",
+ "val_types": "'top left' | 'top' (or 'top center')| 'top right' | 'left' (or 'middle left') | '' (or 'middle center') | 'right' (or 'middle right') | 'bottom left' | 'bottom' (or 'bottom center') | 'bottom right'",
+ "required": false,
+ "description": "Sets the position of the text elements in the 'text' key with respect to the data points. By default, the text elements are plotted directly at the (x,y,z) coordinates."
+ },
+ "scene": {
+ "key_type": "plot_info",
+ "val_types": "'s1' | 's2' | 's3' | etc.",
+ "required": false,
+ "description": "This key determines the scene on which this trace will be plotted in. More info coming soon."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'scatter3d'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
+ }
+ },
+ "surface": {
+ "name": "Surface",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing a 3D surface trace in plotly.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "z": {
+ "key_type": "data",
+ "val_types": "list of lists or 2d numpy array of numbers",
+ "required": true,
+ "description": "Sets the surface coordinates. Say the dimensions of the list of lists or 2d numpy array linked to 'z' has n rows and m columns then the resulting contour will have n coordinates along the y-axis and m coordinates along the x-axis. Therefore, the i-th row/ j-th column cell in the list of lists or 2d numpy array linked to 'z' is mapped to the i-th partition of the y-axis and the j-th partition of the x-axis ",
+ "streamable": true
+ },
+ "x": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the horizontal coordinates referring to the columns of the list of lists or 2d numpy array linked to 'z'. If the 'z' is a list or 1d numpy array of strings, then the x-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'x' array should equal m.",
+ "streamable": true
+ },
+ "y": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "Sets the vertical coordinates referring to the rows of the list of lists or 2d numpy array linked to 'z'. If strings, the y-labels are spaced evenly. If the dimensions of the list of lists or 2d numpy array linked to 'z' are (n x m), the length of the 'y' array should equal n.",
+ "streamable": true
+ },
+ "name": {
+ "key_type": "data",
+ "val_types": "a string",
+ "required": false,
+ "description": "The label associated with this trace. This name will appear in the column header in the online spreadsheet."
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of z from 0-1, i.e. (z-zmin)/ (zmax-zmin), and the second element of pair corresponds to a color. Use with 'zauto', 'zmin' and 'zmax to fine-tune the map from 'z' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
+ ]
+ },
+ "scene": {
+ "key_type": "plot_info",
+ "val_types": "'s1' | 's2' | 's3' | etc.",
+ "required": false,
+ "description": "This key determines the scene on which this trace will be plotted in. More info coming soon."
+ },
+ "stream": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object that initializes this trace as a writable-stream, for use with the streaming API."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'surface'",
+ "required": false,
+ "description": "Plotly identifier for this data's trace type. "
+ }
}
},
"error_y": {
- "type": {
- "val_types": "'data' | 'percent' | 'constant' | 'sqrt'",
- "required": false,
- "type": "plot_info",
- "description": "Specify how the 'value' or 'array' key in this error bar will be used to render the bars. Using 'data' will set error bar lengths to the actual numbers specified in 'array'. Using 'percent' will set bar lengths to the percent of error associated with 'value'. Using 'constant' will set each error bar length to the single value specified in 'value'. Using 'sqrt' will set each error bar length to the square root of the x data at each point ('value' and 'array' do not apply)."
- },
- "symmetric": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggle whether or not error bars are the same length in both directions (up and down). If not specified, the error bars will be symmetric."
- },
- "array": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "The array of corresponding to error bars' span to be drawn. Has only an effect if 'type' is set to 'data'. Values in the array are plotted relative to the 'y' coordinates. For example, with 'y'=[1,2] and 'array'=[1,2], the error bars will span vertically from y= 0 to 2 and y= 0 to 4 if 'symmetric'=True; and from y= 1 to 2 and y= 2 to 4 if 'symmetric' is set to False and 'arrayminus' is empty."
- },
- "value": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "plot_info",
- "description": "The value or percentage determining the error bars' span, at all trace coordinates. Has an effect if 'type' is set to 'value' or 'percent'. If 'symmetric' is set to False, this value corresponds to the span above the trace of coordinates. To specify multiple error bar lengths, you should set 'type' to 'data' and use the 'array' key instead."
- },
- "arrayminus": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "data",
- "description": "Only functional when 'symmetric' is set to False. Same as 'array' but corresponding to the span of the error bars below the trace coordinates"
- },
- "valueminus": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "plot_info",
- "description": "Only functional when 'symmetric' is set to False. Same as 'value' but corresponding to the span of the error bars below the trace coordinates"
- },
- "color": {
- "val_types": "string describing color",
- "description": "Sets the color of the error bars.",
- "required": false,
- "streamable": true,
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "type": "style"
- },
- "thickness": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the line thickness of the y error bars."
- },
- "width": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width (in pixels) of the cross-bar at both ends of the error bars."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
+ "name": "ErrorY",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "error_y"
+ ],
+ "docstring": "A dictionary-like object object representing a set of error bar spanning along the y-axis.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/error-bars/"
+ ],
+ "keymeta": {
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'data' | 'percent' | 'constant' | 'sqrt'",
+ "required": false,
+ "description": "Specify how the 'value' or 'array' key in this error bar will be used to render the bars. Using 'data' will set error bar lengths to the actual numbers specified in 'array'. Using 'percent' will set bar lengths to the percent of error associated with 'value'. Using 'constant' will set each error bar length to the single value specified in 'value'. Using 'sqrt' will set each error bar length to the square root of the x data at each point ('value' and 'array' do not apply)."
+ },
+ "symmetric": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not error bars are the same length in both directions (up and down). If not specified, the error bars will be symmetric."
+ },
+ "array": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "The array corresponding to the span of the error bars. Has only an effect if 'type' is set to 'data'. Values in the array are plotted relative to the 'y' coordinates. For example, with 'y'=[1,2] and 'array'=[1,2], the error bars will span from y= 0 to 2 and y= 0 to 4 if 'symmetric' is set to True; and from y= 1 to 2 and y= 2 to 4 if 'symmetric' is set to False and 'arrayminus' is empty."
+ },
+ "value": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "The value or percentage determining the error bars' span, at all trace coordinates. Has an effect if 'type' is set to 'value' or 'percent'. If 'symmetric' is set to False, this value corresponds to the span above the trace of coordinates. To specify multiple error bar lengths, you should set 'type' to 'data' and use the 'array' key instead."
+ },
+ "arrayminus": {
+ "key_type": "data",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'array' but corresponding to the span of the error bars below the trace coordinates"
+ },
+ "valueminus": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'value' but corresponding to the span of the error bars below the trace coordinates"
+ },
+ "color": {
+ "val_types": "a string describing color",
+ "description": "Sets the color of the error bars.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "thickness": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the line thickness of the y error bars."
+ },
+ "width": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width (in pixels) of the cross-bar at both ends of the error bars."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ }
}
},
"error_x": {
- "type": {
- "val_types": "'data' | 'percent' | 'constant' | 'sqrt'",
- "required": false,
- "type": "plot_info",
- "description": "Specify how the 'value' or 'array' key in this error bar will be used to render the bars. Using 'data' will set error bar lengths to the actual numbers specified in 'array'. Using 'percent' will set bar lengths to the percent of error associated with 'value'. Using 'constant' will set each error bar length to the single value specified in 'value'. Using 'sqrt' will set each error bar length to the square root of the x data at each point ('value' and 'array' do not apply)."
- },
- "symmetric": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggle whether or not error bars are the same length in both directions (right and left). If not specified, the error bars will be symmetric."
- },
- "array": {
- "val_types": "array-like of numbers, strings, datetimes",
- "required": false,
- "type": "data",
- "description": "The array of corresponding to error bars' span to be drawn. Has only an effect if 'type' is set to 'data'. Values in the array are plotted relative to the 'x' coordinates. For example, with 'x'=[1,2] and 'array'=[1,2], the error bars will span horizontally from x= 0 to 2 and x= 0 to 4 if 'symmetric'=True; and from x= 1 to 2 and x= 2 to 4 if 'symmetric' is set to False and 'arrayminus' is empty."
- },
- "value": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "plot_info",
- "description": "The value or percentage determining the error bars' span, at all trace coordinates. Has an effect if 'type' is set to 'value' or 'percent'. If 'symmetric' is set to False, this value corresponds to the span right of the trace of coordinates. To specify multiple error bar lengths, you should set 'type' to 'data' and use the 'array' key instead."
- },
- "arrayminus": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "data",
- "description": "Only functional when 'symmetric' is set to False. Same as 'array' but corresponding to the span of the error bars left of the trace coordinates"
- },
- "valueminus": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "plot_info",
- "description": "Only functional when 'symmetric' is set to False. Same as 'value' but corresponding to the span of the error bars left of the trace coordinates"
- },
- "color": {
- "val_types": "string describing color",
- "description": "Sets the color of the error bars.",
- "required": false,
- "streamable": true,
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "type": "style"
- },
- "thickness": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the line thickness of the x error bars."
- },
- "width": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width (in pixels) of the cross-bar at both ends of the error bars."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "copy_ystyle": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether to set x error bar style to the same style (color, thickness, width, opacity) as y error bars set in YAxis."
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
+ "name": "ErrorX",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "error_x"
+ ],
+ "docstring": "A dictionary-like object representing a set of error bars spanning along the x-axis.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/error-bars/"
+ ],
+ "keymeta": {
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'data' | 'percent' | 'constant' | 'sqrt'",
+ "required": false,
+ "description": "Specify how the 'value' or 'array' key in this error bar will be used to render the bars. Using 'data' will set error bar lengths to the actual numbers specified in 'array'. Using 'percent' will set bar lengths to the percent of error associated with 'value'. Using 'constant' will set each error bar length to the single value specified in 'value'. Using 'sqrt' will set each error bar length to the square root of the x data at each point ('value' and 'array' do not apply)."
+ },
+ "symmetric": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not error bars are the same length in both directions (right and left). If not specified, the error bars will be symmetric."
+ },
+ "array": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "The array corresponding to the span of the error bars. Has only an effect if 'type' is set to 'data'. Values in the array are plotted relative to the 'x' coordinates. For example, with 'x'=[1,2] and 'array'=[1,2], the error bars will span from x= 0 to 2 and x= 0 to 4 if 'symmetric' is set to True; and from x= 1 to 2 and x= 2 to 4 if 'symmetric' is set to False and 'arrayminus' is empty."
+ },
+ "value": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "The value or percentage determining the error bars' span, at all trace coordinates. Has an effect if 'type' is set to 'value' or 'percent'. If 'symmetric' is set to False, this value corresponds to the span right of the trace of coordinates. To specify multiple error bar lengths, you should set 'type' to 'data' and use the 'array' key instead."
+ },
+ "arrayminus": {
+ "key_type": "data",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'array' but corresponding to the span of the error bars left of the trace coordinates"
+ },
+ "valueminus": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'value' but corresponding to the span of the error bars left of the trace coordinates"
+ },
+ "color": {
+ "val_types": "a string describing color",
+ "description": "Sets the color of the error bars.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "thickness": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the line thickness of the x error bars."
+ },
+ "width": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width (in pixels) of the cross-bar at both ends of the error bars."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "copy_ystyle": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether to set x error bar style to the same style (color, thickness, width, opacity) as y error bars set in 'yaxis'."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ }
}
},
"xbins": {
- "start": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the starting point on the x-axis for the first bin."
- },
- "end": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the end point on the x-axis for the last bin."
- },
- "size": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the size (i.e. their width) of each x-axis bin.",
- "streamable": true
+ "name": "XBins",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "xbins"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the bins lying along the x-axis.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/histograms/",
+ "https://plot.ly/python/2D-Histograms/"
+ ],
+ "keymeta": {
+ "start": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the starting point on the x-axis for the first bin."
+ },
+ "end": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the end point on the x-axis for the last bin."
+ },
+ "size": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the size (i.e. their width) of each x-axis bin.",
+ "streamable": true
+ }
}
},
"ybins": {
- "start": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the starting point on the y-axis for the first bin."
- },
- "end": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the end point on the y-axis for the last bin."
- },
- "size": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the size (i.e. their width) of each y-axis bin.",
- "streamable": true
+ "name": "YBins",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "ybins"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the bins lying along the y-axis.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/histograms/",
+ "https://plot.ly/python/2D-Histograms/"
+ ],
+ "keymeta": {
+ "start": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the starting point on the y-axis for the first bin."
+ },
+ "end": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the end point on the y-axis for the last bin."
+ },
+ "size": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the size (i.e. their width) of each y-axis bin.",
+ "streamable": true
+ }
}
},
- "contours": {
- "showlines": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the contour lines appear on the plot."
- },
- "start": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the value of the first contour level."
- },
- "end": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the value of the last contour level."
- },
- "size": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the size of each contour level.",
- "streamable": true
- },
- "coloring": {
- "val_types": " 'fill' | 'heatmap' | 'lines' | 'none' ",
- "required": false,
- "type": "style",
- "description": "Choose the coloring method for this contour trace. The default value is 'fill' where coloring is done evenly between each contour line. 'heatmap' colors on a grid point-by-grid point basis. 'lines' colors only the contour lines, each with respect to the color scale. 'none' prints all contour lines with the same color; choose their color in a Line object at the trace level if desired."
+ "marker": {
+ "name": "Marker",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "marker"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the marker points.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/line-and-scatter/",
+ "https://plot.ly/python/bubble-charts/"
+ ],
+ "keymeta": {
+ "color": {
+ "val_types": "list or 1d numpy array of string describing color",
+ "description": "Sets the color of the face of the marker object. If 'color' is linked to a list or 1d numpy array of color strings, color values are mapped to individual marker points in the same order as in the data lists or arrays. To set the color of the marker's bordering line, use 'line' in 'marker'. The 'color' key can also accept list or 1d numpy array of numbers, where each number is then mapped to a color using the color scale set in 'colorscale'.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "size": {
+ "key_type": "style",
+ "val_types": "number: x > 0, or list of these numbers",
+ "required": false,
+ "description": "Sets the size of the markers (in pixels). If 'size' is linked to a list or 1d numpy array of numbers, size values are mapped to individual marker points in the same order as in the 'x', 'y (or 'z') list or 1d numpy array. In this case, use 'size' in conjunction with 'sizeref' and 'sizemode' to fine-tune the map from the numbers linked to 'size' and the marker points' rendered sizes.",
+ "streamable": true
+ },
+ "symbol": {
+ "key_type": "plot_info",
+ "val_types": "'dot' | 'cross' | 'diamond' | 'square' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'x' OR list of these string values",
+ "required": false,
+ "description": "The symbol that is drawn on the plot for each marker. Supported only in scatter traces. If 'symbol' is linked to a list or 1d numpy array, the symbol values are mapped to individual marker points in the same order as in the list or 1d numpy array linked to 'x', 'y' (or 'z')."
+ },
+ "line": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing line parameters for the line segments associated with this marker. For example, the line segments around each marker point in a scatter trace or the line segments around each bar in a bar trace.",
+ "streamable": true
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1], or list of these numbers",
+ "required": false,
+ "description": "Sets the opacity, or transparency also known as the alpha channel of colors) of the marker points. If the marker points' color is given in terms of 'rgba' color model, this does not need to be defined. If 'opacity' is linked to a list or an array of numbers, opacity values are mapped to individual marker points in the same order as in the 'x', 'y' (or 'z') list or 1d numpy array."
+ },
+ "sizeref": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the scale factor used to determine the rendered size of each marker point in this trace. Applies only to scatter traces that have their 'size' key in 'marker' linked to a list or 1d numpy array. If set, the value linked to 'sizeref' is used to divide each entry linked to 'size'. Specifically, setting 'sizeref' to less (greater) than 1, increases (decreases) the rendered marker sizes."
+ },
+ "sizemode": {
+ "key_type": "style",
+ "val_types": "'diameter'| 'area'",
+ "required": false,
+ "description": "Choose between marker size scaling options for the marker points in this trace. Applies only to scatter traces that have their 'size' key in 'marker' linked to a list or 1d numpy array. If 'diameter' ('area'), then the diameter (area) of the rendered marker points (in pixels) are proportional to the numbers linked to 'size'.For example, set 'sizemode' to 'area' for a more a smaller range of rendered marker sizes."
+ },
+ "colorscale": {
+ "key_type": "plot_info",
+ "val_types": "list or 1d numpy array of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
+ "required": false,
+ "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list or 1d numpy array of value-color pairs where, the first element of the pair corresponds to a normalized value of color from 0-1, i.e. (c-cmin)/ (cmax-cmin), and the second element of pair corresponds to a color. Use with 'cauto', 'cmin' and 'cmax to fine-tune the map from 'color' to rendered colors.",
+ "examples": [
+ "'Greys'",
+ "[[0, 'rgb(0,0,0)'], [0.5, 'rgb(65, 182, 196)'], [1, 'rgb(255,255,255)']]"
+ ]
+ },
+ "cauto": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the default values of 'cmax' and 'cmax' can be overwritten."
+ },
+ "cmin": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the minimum 'color' data value to be resolved by the color scale. Its default value is the minimum of the 'color' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'. Has only an effect if 'color' is linked to a list or 1d numpy array nd 'colorscale' is set."
+ },
+ "cmax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the maximum 'color' data value to be resolved by the color scale. Its default value is the maximum of the 'color' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'. Has only an effect if 'color' is linked to a list or 1d numpy array nd 'colorscale' is set."
+ },
+ "outliercolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the face color of the outlier points."
+ },
+ "maxdisplayed": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets maximum number of displayed points for this trace. Applies only to scatter traces."
+ }
}
},
- "stream": {
- "token": {
- "val_types": "A stream id number, see https://plot.ly/settings",
- "required": true,
- "type": "plot_info",
- "description": "This number links a data object on a plot with a stream. In other words, any data object you create can reference a 'stream'. If you stream data to Plotly with the same stream id (token), Plotly knows update this data object with the incoming data stream."
- },
- "maxpoints": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the maximum number of points to keep on the plots from an incoming stream. For example, if 'maxpoints' is set to 50, only the newest 50 points will be displayed on the plot."
+ "line": {
+ "name": "Line",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "line"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the line segments.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/line-and-scatter/",
+ "https://plot.ly/python/filled-area-plots/",
+ "https://plot.ly/python/contour-plots/"
+ ],
+ "keymeta": {
+ "color": {
+ "val_types": "a string describing color",
+ "description": "Sets the color of the line object. If linked within 'marker', sets the color of the marker's bordering line. If linked within, 'contours', sets the color of the contour lines.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "width": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width (in pixels) of the line segments in question."
+ },
+ "dash": {
+ "key_type": "style",
+ "val_types": "'dash' | 'dashdot' | 'dot' | 'solid'",
+ "required": false,
+ "description": "Sets the drawing style of the lines segments in this trace."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "shape": {
+ "key_type": "style",
+ "val_types": "'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv'",
+ "required": false,
+ "description": "Choose the line shape between each coordinate pair in this trace. Applies only to scatter traces. The default value is 'linear'. If set to 'spline', then the lines are drawn using spline interpolation between the coordinate pairs. The remaining available values correspond to step-wise line shapes."
+ },
+ "smoothing": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the amount of smoothing applied to the lines segments in this trace. Applies only to contour traces and scatter traces if 'shape' is set to 'spline'. The default value is 1. If 'smoothing' is set to 0, then no smoothing is applied. Set 'smoothing' to a value less (greater) than 1 for a less (more) pronounced line smoothing."
+ },
+ "outliercolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the color of the bordering line of the outlier points."
+ },
+ "outlierwidth": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the width in pixels of bordering line of the outlier points."
+ }
}
},
- "marker": {
- "color": {
- "val_types": "array-like of string describing color",
- "description": "Sets the color of the face of the marker object. If 'color' is linked to a list or an array of color strings, color values are mapped to individual marker points in the same order as in the data lists or arrays. To set the color of the marker's bordering line, use the 'line' key in Marker. The 'color' key can also accept a list or an array of numbers, where each number is then mapped to a color using the color scale set in 'colorscale'.",
- "required": false,
- "streamable": true,
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "type": "style"
- },
- "size": {
- "val_types": "number: x > 0, or list of these numbers",
- "required": false,
- "type": "style",
- "description": "Sets the size of the markers (in pixels). If 'size' is linked to a list or an array of numbers, size values are mapped to individual marker points in the same order as in the data lists or arrays. In this case, use 'size' in conjunction with 'sizeref' and 'sizemode' to fine-tune the map from the numbers linked to 'size' and the marker points' rendered sizes.",
- "streamable": true
- },
- "symbol": {
- "val_types": "'dot' | 'cross' | 'diamond' | 'square' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'x' OR list of these string values",
- "required": false,
- "type": "style",
- "description": "The symbol that is drawn on the plot for each marker. Supported only in scatter traces. If 'symbol' is linked to a list or an array of numbers, symbol values are mapped to individual marker points in the same order as in the data lists or arrays."
- },
- "line": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the line belonging to the marker. For example, the line around each point in a scatter trace or the line around each bar in a bar trace.",
- "streamable": true
- },
- "opacity": {
- "val_types": "number: x in [0, 1], or list of these numbers",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency also known as the alpha channel of colors) of the marker points. If the marker points' color is given in terms of 'rgba' color model, this does not need to be defined. If 'opacity' is linked to a list or an array of numbers, opacity values are mapped to individual marker points in the same order as in the data lists or arrays."
- },
- "sizeref": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the scale factor used to determine the rendered size of each marker point in this trace. Applies only to scatter traces that have an array linked to the 'size' key in Marker. If set, the value linked to 'sizeref' is used to divide each entry linked to 'size'. That is, setting 'sizeref' to less (greater) than 1, increases (decreases) the rendered marker sizes."
- },
- "sizemode": {
- "val_types": "'diameter'| 'area'",
- "required": false,
- "type": "style",
- "description": "Choose between marker size scaling options for the marker points in this trace. Applies only to scatter traces that have an array linked to the 'size' key in Marker. If 'diameter' ('area'), then the diameter (area) of the rendered marker points (in pixels) are proportional to the numbers linked to 'size'.E.g. set 'sizemode' to 'area' for a more a smaller range of rendered marker sizes."
- },
- "colorscale": {
- "val_types": "array_like of value-color pairs | 'Greys' | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'",
- "required": false,
- "type": "style",
- "description": "Sets and/or defines the color scale for this trace. The string values are pre-defined color scales. For custom color scales, define a list of color-value pairs where, by default, the first element of the pair corresponds to a normalized value of color from 0-1, i.e. (c-cmin)/ (cmax-cmin), and the second element of pair corresponds to a color. Use with 'cauto', 'cmin' and 'cmax to fine-tune the map from 'color' to rendered colors.",
- "examples": [
- "'Greys'",
- [
- [
- 0,
- "rgb(0,0,0)"
- ],
- [
- 0.5,
- "rgb(65, 182, 196)"
- ],
- [
- 1,
- "rgb(255,255,255)"
- ]
+ "contours": {
+ "name": "Contours",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "contours"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the contours.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/contour-plots/"
+ ],
+ "keymeta": {
+ "showlines": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the contour lines appear on the plot."
+ },
+ "start": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the value of the first contour level."
+ },
+ "end": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the value of the last contour level."
+ },
+ "size": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the size of each contour level.",
+ "streamable": true
+ },
+ "coloring": {
+ "key_type": "style",
+ "val_types": " 'fill' | 'heatmap' | 'lines' | 'none' ",
+ "required": false,
+ "description": "Choose the coloring method for this contour trace. The default value is 'fill' where coloring is done evenly between each contour line. 'heatmap' colors on a grid point-by-grid point basis. 'lines' colors only the contour lines, each with respect to the color scale. 'none' prints all contour lines with the same color; choose their color in a Line object at the trace level if desired."
+ }
+ }
+ },
+ "colorbar": {
+ "name": "ColorBar",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "colorbar"
+ ],
+ "docstring": "A dictionary-like object object for representing a color bar in plotly.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "title": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "description": "The title of the colorbar."
+ },
+ "titleside": {
+ "key_type": "style",
+ "val_types": "'right' | 'top' | 'bottom'",
+ "required": false,
+ "description": "Location of colorbar title with respect to the colorbar."
+ },
+ "titlefont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings of the colorbar title."
+ },
+ "thickness": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the thickness of the line surrounding the colorbar."
+ },
+ "thicknessmode": {
+ "key_type": "style",
+ "val_types": "string: 'pixels' | 'fraction' ",
+ "required": false,
+ "description": "Sets thickness unit mode."
+ },
+ "len": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the length of the colorbar."
+ },
+ "lenmode": {
+ "key_type": "style",
+ "val_types": "string: 'pixels' | 'fraction' ",
+ "required": false,
+ "description": "Sets length unit mode."
+ },
+ "autotick": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the colorbar ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the colorbar ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this colorbar object."
+ },
+ "nticks": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the number of colorbar ticks. No need to set 'autoticks' to False for 'nticks' to apply."
+ },
+ "ticks": {
+ "key_type": "style",
+ "val_types": "'' | 'inside' | 'outside'",
+ "required": false,
+ "description": "Sets the format of the ticks on this colorbar. For hidden ticks, link 'ticks' to an empty string."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the colorbar ticks will feature tick labels."
+ },
+ "tick0": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the starting point of the ticks of this colorbar."
+ },
+ "dtick": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the distance between ticks on this colorbar."
+ },
+ "ticklen": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the length of the tick lines on this colorbar."
+ },
+ "tickwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the tick lines on this colorbar."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the tick lines on this colorbar."
+ },
+ "tickangle": {
+ "key_type": "style",
+ "val_types": "number: x in [-90, 90]",
+ "required": false,
+ "description": "Sets the angle in degrees of the ticks on this colorbar."
+ },
+ "tickfont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the ticks' font."
+ },
+ "exponentformat": {
+ "key_type": "style",
+ "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
+ "required": false,
+ "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
+ },
+ "showexponent": {
+ "key_type": "style",
+ "val_types": "'all' | 'first' | 'last' | 'none'",
+ "required": false,
+ "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
+ },
+ "x": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'x' position of this colorbar."
+ },
+ "y": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'y' position of this colorbar."
+ },
+ "xanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'left' | 'center' | 'right'",
+ "required": false,
+ "description": "Sets the horizontal position anchor of this colorbar. That is, bind the position set with the 'x' key to the 'left' or 'center' or 'right' of this colorbar."
+ },
+ "yanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
+ "required": false,
+ "description": "Sets the vertical position anchor of this colorbar. That is, bind the position set with the 'y' key to the 'bottom' or 'middle' or 'top' of this colorbar."
+ },
+ "bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background (bg) color of this colorbar.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "outlinecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "The color of the outline surrounding this colorbar.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "outlinewidth": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the width of the outline surrounding this colorbar."
+ },
+ "bordercolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the color of the enclosing boarder of this colorbar.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
]
- ]
- },
- "cauto": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the default values of 'cmax' and 'cmax' can be overwritten."
- },
- "cmin": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the minimum 'color' data value to be resolved by the color scale. Its default value is the minimum of the 'color' data values. This value will be used as the minimum in the color scale normalization. For more info see 'colorscale'. Has only an effect if 'color' is linked to an array-like and 'colorscale' is set."
- },
- "cmax": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the maximum 'color' data value to be resolved by the color scale. Its default value is the maximum of the 'color' data values. This value will be used as the maximum in the color scale normalization. For more info see 'colorscale'. Has only an effect if 'color' is linked to an array-like and 'colorscale' is set."
- },
- "outliercolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the face color of the outlier points."
- },
- "maxdisplayed": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets maximum number of displayed points for this trace. Applies only to scatter traces."
+ },
+ "borderwidth": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width of the boarder enclosing this colorbar"
+ },
+ "xpad": {
+ "key_type": "plot_info",
+ "val_types": "number: x in [0, 50]",
+ "required": false,
+ "description": "Sets the amount of space (padding) between the colorbar and the enclosing boarder in the x-direction."
+ },
+ "ypad": {
+ "key_type": "plot_info",
+ "val_types": "number: x in [0, 50]",
+ "required": false,
+ "description": "Sets the amount of space (padding) between the colorbar and the enclosing boarder in the y-direction."
+ }
}
},
- "line": {
- "color": {
- "val_types": "string describing color",
- "description": "Sets the color of the line object. If linked within 'marker', sets the color of the marker's bordering line. If linked within, 'contours', sets the color of the contour lines.",
- "required": false,
- "streamable": true,
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "type": "style"
- },
- "width": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width (in pixels) of the line object."
- },
- "dash": {
- "val_types": "'dash' | 'dashdot' | 'dot' | 'solid'",
- "required": false,
- "type": "style",
- "description": "Sets the drawing style of this line object."
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
- },
- "shape": {
- "val_types": "'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv'",
- "required": false,
- "type": "style",
- "description": "Choose the line shape between each coordinate pair in this trace. Applies only to scatter traces. The default value is 'linear'. If 'spline', then the lines are drawn using spline interpolation between the coordinate pairs. The remaining available values correspond to step-wise line shapes, see example in: https://plot.ly/~alex/315 ."
- },
- "smoothing": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the amount of smoothing applied to this line object. Applies only to contour traces and scatter traces if 'shape' is set to 'spline'. The default value is 1. If 'smoothing' is set to 0, then no smoothing is applied. Set 'smoothing' to a value less (greater) than 1 for a less (more) pronounced line smoothing. "
- },
- "outliercolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the color of the bordering line of the outlier points."
- },
- "outlierwidth": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "For box plots only. Has an effect only if 'boxpoints' is set to 'suspectedoutliers'. Sets the width in pixels of bordering line of the outlier points."
+ "stream": {
+ "name": "Stream",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "stream"
+ ],
+ "docstring": "A dictionary-like object containing specifications of the data stream.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/streaming/"
+ ],
+ "keymeta": {
+ "token": {
+ "key_type": "plot_info",
+ "val_types": "A stream id number, see https://plot.ly/settings",
+ "required": true,
+ "description": "The stream id number links a data trace on a plot with a stream. In other words, any data trace you create can reference a 'stream'. If you stream data to Plotly with the same stream id (token), Plotly knows update this data object with the incoming data stream."
+ },
+ "maxpoints": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the maximum number of points to keep on the plots from an incoming stream. For example, if 'maxpoints' is set to 50, only the newest 50 points will be displayed on the plot."
+ }
}
},
- "font": {
- "family": {
- "val_types": " 'Arial, sans-serif' | 'Balto, sans-serif' | 'Courier New, monospace' | 'Droid Sans, sans-serif' | 'Droid Serif, serif' | 'Droid Sans Mono, sans-serif' | 'Georgia, serif' | 'Gravitas One, cursive' | 'Old Standard TT, serif' | 'Open Sans, sans-serif' or ('') | 'PT Sans Narrow, sans-serif' | 'Raleway, sans-serif' | 'Times New Roman, Times, serif'",
- "required": false,
- "type": "style",
- "description": "Sets the font family. If linked in the first level of the layout object, set the color of the global font. The default font in Plotly is 'Open Sans, sans-serif'."
- },
- "size": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the size of font. If linked in the first level of the layout object, set the color of the global font.",
- "streamable": true
- },
- "color": {
- "val_types": "string describing color",
- "description": "Sets the color of the font. If linked in the first level of the layout object, set the color of the global font.",
- "required": false,
- "streamable": true,
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "type": "style"
- },
- "outlinecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "For polar chart only. Sets the color of the text's outline.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
+ "error_z": {
+ "name": "ErrorZ",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "error_z"
+ ],
+ "docstring": "A dictionary-like object representing a set of error bars spanning along the z-axis in a 3D plot.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'data' | 'percent' | 'constant' | 'sqrt'",
+ "required": false,
+ "description": "Specify how the 'value' or 'array' key in this error bar will be used to render the bars. Using 'data' will set error bar lengths to the actual numbers specified in 'array'. Using 'percent' will set bar lengths to the percent of error associated with 'value'. Using 'constant' will set each error bar length to the single value specified in 'value'. Using 'sqrt' will set each error bar length to the square root of the x data at each point ('value' and 'array' do not apply)."
+ },
+ "symmetric": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not error bars are the same length in both directions (positive z and negative z). If not specified, the error bars will be symmetric."
+ },
+ "array": {
+ "key_type": "data",
+ "val_types": "list or 1d numpy array of numbers, strings, datetimes",
+ "required": false,
+ "description": "The array corresponding to the span of the error bars. Has only an effect if 'type' is set to 'data'. Values in the array are plotted relative to the 'z' coordinates. For example, with 'z'=[1,2] and 'array'=[1,2], the error bars will span from z= 0 to 2 and z= 0 to 4 if 'symmetric' is set to True; and from z= 1 to 2 and z= 2 to 4 if 'symmetric' is set to False and 'arrayminus' is empty."
+ },
+ "value": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "The value or percentage determining the error bars' span, at all trace coordinates. Has an effect if 'type' is set to 'value' or 'percent'. If 'symmetric' is set to False, this value corresponds to the span above the trace of coordinates. To specify multiple error bar lengths, you should set 'type' to 'data' and use the 'array' key instead."
+ },
+ "arrayminus": {
+ "key_type": "data",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'array' but corresponding to the span of the error bars below the trace coordinates"
+ },
+ "valueminus": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Has an effect only when 'symmetric' is set to False. Same as 'value' but corresponding to the span of the error bars below the trace coordinates"
+ },
+ "color": {
+ "val_types": "a string describing color",
+ "description": "Sets the color of the error bars.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "thickness": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the line thickness of the z error bars."
+ },
+ "width": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width (in pixels) of the cross-bar at both ends of the error bars."
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ }
}
},
"xaxis": {
- "title": {
- "val_types": "string",
- "required": false,
- "type": "plot_info",
- "description": "The x-axis title."
- },
- "titlefont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings of the x-axis title."
- },
- "range": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "style",
- "description": "Defines the start and end point of this x axis.",
- "examples": [
- [
- -13,
- 20
- ],
- [
- 0,
- 1
+ "name": "XAxis",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "xaxis"
+ ],
+ "docstring": "A dictionary-like object for representing an x-axis in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/axes/",
+ "https://plot.ly/python/multiple-axes/",
+ "https://plot.ly/python/subplots/",
+ "https://plot.ly/python/insets/"
+ ],
+ "keymeta": {
+ "title": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "description": "The x-axis title."
+ },
+ "titlefont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings of the x-axis title."
+ },
+ "range": {
+ "key_type": "style",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Defines the start and end point of this x-axis.",
+ "examples": [
+ "[-13, 20]",
+ "[0, 1]"
]
- ]
- },
- "domain": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "plot_info",
- "description": "Sets the domain of this x axis; that is, the available space for this x axis to live in. Domain coordinates are given in normalized coordinates with respect to the paper.",
- "examples": [
- [
- 0,
- 0.4
- ],
- [
- 0.6,
- 1
+ },
+ "domain": {
+ "key_type": "plot_info",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Sets the domain of this x-axis; that is, the available space for this x-axis to live in. Domain coordinates are given in normalized coordinates with respect to the paper.",
+ "examples": [
+ "[0, 0.4]",
+ "[0.6, 1]"
]
- ]
- },
- "type": {
- "val_types": "'linear' | 'log' | 'date' | 'category'",
- "required": false,
- "type": "style",
- "description": "Sets the format of this axis."
- },
- "rangemode": {
- "val_types": "'normal' | 'tozero' | 'nonnegative'",
- "required": false,
- "type": "style",
- "description": "Choose between Plotly's automated axis generation modes: 'normal' (the default) sets the axis range in relation to the extrema in the data object, 'tozero' extends the axes to x=0 no matter the data plotted and 'nonnegative' sets a non-negative range no matter the data plotted."
- },
- "autorange": {
- "val_types": "True | False | 'reversed'",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the range of this x-axis is automatically picked by Plotly. If 'range' is set, then 'autorange' is set to False automatically. Otherwise, if 'autorange' is set to True (the default behavior), the range of this x-axis can respond to adjustments made in the web GUI automatically. If 'autorange' is set to 'reversed', then this x-axis is drawn in reverse i.e. from right to left instead of from left to right (the default behavior)."
- },
- "showgrid": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this axis features grid lines."
- },
- "zeroline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not an additional grid line (thicker than the other grid lines, by default) will appear on this axis along x=0."
- },
- "showline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the line bounding this x axis will be shown on the figure."
- },
- "autotick": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the axis ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the axis ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this axis object."
- },
- "nticks": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of axis ticks. No need to set 'autoticks' to False for 'nticks' to apply."
- },
- "ticks": {
- "val_types": "'' | 'inside' | 'outside'",
- "required": false,
- "type": "style",
- "description": "Sets the format of tick visibility on this axis."
- },
- "showticklabels": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the axis ticks will feature tick labels."
- },
- "tick0": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the starting point of the ticks of this axis."
- },
- "dtick": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the distance between ticks on this axis."
- },
- "ticklen": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this axis."
- },
- "tickwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the tick lines on this axis."
- },
- "tickcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the tick lines on this axis."
- },
- "tickangle": {
- "val_types": "number: x in [-90, 90]",
- "required": false,
- "type": "style",
- "description": "Sets the angle in degrees of the ticks on this axis."
- },
- "tickfont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the ticks' font."
- },
- "exponentformat": {
- "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
- "required": false,
- "type": "style",
- "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
- },
- "showexponent": {
- "val_types": "'all' | 'first' | 'last' | 'none'",
- "required": false,
- "type": "style",
- "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
- },
- "mirror": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether to mirror the axis line to the opposite side of the plot."
- },
- "gridcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the axis grid color."
- },
- "gridwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the grid width (in pixels)."
- },
- "zerolinecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of this axis' zeroline."
- },
- "zerolinewidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of this axis' zeroline (in pixels)."
- },
- "linecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the axis line color."
- },
- "linewidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the axis line (in pixels)."
- },
- "anchor": {
- "val_types": "'y' | 'y1' | 'y2' | ... | 'free'",
- "required": false,
- "type": "plot_info",
- "description": "Choose whether the position of this x-axis will be anchored to a corresponding y-axis or will be 'free' to appear anywhere in the vertical space of this figure."
- },
- "overlaying": {
- "val_types": "'x' | 'x1' | 'x2' | ... | False",
- "required": false,
- "type": "plot_info",
- "description": "Choose to overlay the data bound to this x-axis on the same plotting area as a corresponding y-axis or choose not overlay other x-the other axis/axes of this figure."
- },
- "side": {
- "val_types": "'bottom' | 'top'",
- "required": false,
- "type": "plot_info",
- "description": "Sets whether this x-axis sits at the 'bottom' of the plot or at the 'top' of the plot."
- },
- "position": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets where this x-axis is positioned in the plotting space. For example 'position'=0.5 will place this axis in the exact center of the plotting space. Has an effect only if 'anchor' is set to 'free'."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'linear' | 'log' | 'date' | 'category'",
+ "required": false,
+ "description": "Sets the format of this axis."
+ },
+ "rangemode": {
+ "key_type": "style",
+ "val_types": "'normal' | 'tozero' | 'nonnegative'",
+ "required": false,
+ "description": "Choose between Plotly's automated axis generation modes: 'normal' (the default) sets the axis range in relation to the extrema in the data object, 'tozero' extends the axes to x=0 no matter the data plotted and 'nonnegative' sets a non-negative range no matter the data plotted."
+ },
+ "autorange": {
+ "key_type": "style",
+ "val_types": "True | False | 'reversed'",
+ "required": false,
+ "description": "Toggle whether or not the range of this x-axis is automatically picked by Plotly. If 'range' is set, then 'autorange' is set to False automatically. Otherwise, if 'autorange' is set to True (the default behavior), the range of this x-axis can respond to adjustments made in the web GUI automatically. If 'autorange' is set to 'reversed', then this x-axis is drawn in reverse, e.g. in a 2D plot, from right to left instead of from left to right (the default behavior)."
+ },
+ "showgrid": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this axis features grid lines."
+ },
+ "zeroline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not an additional grid line (thicker than the other grid lines, by default) will appear on this axis along x=0."
+ },
+ "showline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the line bounding this x-axis will be shown on the figure."
+ },
+ "autotick": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the axis ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this axis object."
+ },
+ "nticks": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the number of axis ticks. No need to set 'autoticks' to False for 'nticks' to apply."
+ },
+ "ticks": {
+ "key_type": "style",
+ "val_types": "'' | 'inside' | 'outside'",
+ "required": false,
+ "description": "Sets the format of the ticks on this axis. For hidden ticks, link 'ticks' to an empty string."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks will feature tick labels."
+ },
+ "tick0": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the starting point of the ticks of this axis."
+ },
+ "dtick": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the distance between ticks on this axis."
+ },
+ "ticklen": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the length of the tick lines on this axis."
+ },
+ "tickwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the tick lines on this axis."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the tick lines on this axis."
+ },
+ "tickangle": {
+ "key_type": "style",
+ "val_types": "number: x in [-90, 90]",
+ "required": false,
+ "description": "Sets the angle in degrees of the ticks on this axis."
+ },
+ "tickfont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the ticks' font."
+ },
+ "exponentformat": {
+ "key_type": "style",
+ "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
+ "required": false,
+ "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
+ },
+ "showexponent": {
+ "key_type": "style",
+ "val_types": "'all' | 'first' | 'last' | 'none'",
+ "required": false,
+ "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
+ },
+ "mirror": {
+ "key_type": "style",
+ "val_types": "True | False | 'ticks' | 'all' | 'allticks'",
+ "required": false,
+ "description": "Toggle the axis line and/or ticks across the plots or subplots. If True, mirror the axis line across the primary subplot (i.e. the axis that this axis is anchored to). If 'ticks', mirror the axis line and the ticks. If 'all', mirror the axis line to all subplots containing this axis. If 'allticks', mirror the line and ticks to all subplots containing this axis. If False, don't mirror the axis or the ticks."
+ },
+ "gridcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis grid color."
+ },
+ "gridwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the grid width (in pixels)."
+ },
+ "zerolinecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of this axis' zeroline."
+ },
+ "zerolinewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of this axis' zeroline (in pixels)."
+ },
+ "linecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis line color."
+ },
+ "linewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the axis line (in pixels)."
+ },
+ "anchor": {
+ "key_type": "plot_info",
+ "val_types": "'y' | 'y1' | 'y2' | ... | 'free' ",
+ "required": false,
+ "description": "Choose whether the position of this x-axis will be anchored to a corresponding y-axis or will be 'free' to appear anywhere in the vertical space of this figure. Has no effect in 3D plots."
+ },
+ "overlaying": {
+ "key_type": "plot_info",
+ "val_types": "'x' | 'x1' | 'x2' | ... | False",
+ "required": false,
+ "description": "Choose to overlay the data bound to this x-axis on the same plotting area as a corresponding y-axis or choose not overlay other x-the other axis/axes of this figure.Has no effect in 3D plots."
+ },
+ "side": {
+ "key_type": "plot_info",
+ "val_types": "'bottom' | 'top'",
+ "required": false,
+ "description": "Sets whether this x-axis sits at the 'bottom' of the plot or at the 'top' of the plot.Has no effect in 3D plots."
+ },
+ "position": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets where this x-axis is positioned in the plotting space. For example if 'position' is set to 0.5, then this axis is placed at the exact center of the plotting space. Has an effect only if 'anchor' is set to 'free'.Has no effect in 3D plots."
+ },
+ "showbackground": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this x-axis will have a background color. Has an effect only in 3D plots."
+ },
+ "backgroundcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background color of this x-axis. Has an effect only in 3D plots and if 'showbackground' is set to True."
+ },
+ "showspikes": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not spikes will link up to this x-axis when hovering over data points. Has an effect only in 3D plots."
+ },
+ "spikesides": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the spikes will expand out to the x-axis bounds when hovering over data points. Has an effect only in 3D plots and if 'showspikes' is set to True."
+ },
+ "spikethickness": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the thickness (in pixels) of the x-axis spikes.Has an effect only in 3D plots and if 'showspikes' is set to True."
+ }
}
},
"yaxis": {
- "title": {
- "val_types": "string",
- "required": false,
- "type": "plot_info",
- "description": "The y-axis title."
- },
- "titlefont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings of the y-axis title."
- },
- "range": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "style",
- "description": "Defines the start and end point of this y axis.",
- "examples": [
- [
- -13,
- 20
- ],
- [
- 0,
- 1
+ "name": "YAxis",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "yaxis"
+ ],
+ "docstring": "A dictionary-like object for representing a y-axis in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/axes/",
+ "https://plot.ly/python/multiple-axes/",
+ "https://plot.ly/python/subplots/",
+ "https://plot.ly/python/insets/"
+ ],
+ "keymeta": {
+ "title": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "description": "The y-axis title."
+ },
+ "titlefont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings of the y-axis title."
+ },
+ "range": {
+ "key_type": "style",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Defines the start and end point of this y-axis.",
+ "examples": [
+ "[-13, 20]",
+ "[0, 1]"
]
- ]
- },
- "domain": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "plot_info",
- "description": "Sets the domain of this y axis; that is, the available space for this y axis to live in. Domain coordinates are given in normalized coordinates with respect to the paper.",
- "examples": [
- [
- 0,
- 0.4
- ],
- [
- 0.6,
- 1
+ },
+ "domain": {
+ "key_type": "plot_info",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Sets the domain of this y-axis; that is, the available space for this y-axis to live in. Domain coordinates are given in normalized coordinates with respect to the paper.",
+ "examples": [
+ "[0, 0.4]",
+ "[0.6, 1]"
]
- ]
- },
- "type": {
- "val_types": "'linear' | 'log' | 'date' | 'category'",
- "required": false,
- "type": "style",
- "description": "Sets the format of this axis."
- },
- "rangemode": {
- "val_types": "'normal' | 'tozero' | 'nonnegative'",
- "required": false,
- "type": "style",
- "description": "Choose between Plotly's automated axis generation modes: 'normal' (the default) sets the axis range in relation to the extrema in the data object, 'tozero' extends the axes to y=0 no matter the data plotted and 'nonnegative' sets a non-negative range no matter the data plotted."
- },
- "autorange": {
- "val_types": "True | False | 'reversed'",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the range of this y-axis is automatically picked by Plotly. If 'range' is set, then 'autorange' is set to False automatically. Otherwise, if 'autorange' is set to True (the default behavior), the range of this y-axis can respond to adjustments made in the web GUI automatically. If 'autorange' is set to 'reversed', then this y-axis is drawn in reverse i.e. from top to bottom instead of from bottom to top (the default behavior)."
- },
- "showgrid": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not this axis features grid lines."
- },
- "zeroline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not an additional grid line (thicker than the other grid lines, by default) will appear on this axis along y=0."
- },
- "showline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the line bounding this y axis will be shown on the figure."
- },
- "autotick": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the axis ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the axis ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this axis object."
- },
- "nticks": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of axis ticks. No need to set 'autoticks' to False for 'nticks' to apply."
- },
- "ticks": {
- "val_types": "'' | 'inside' | 'outside'",
- "required": false,
- "type": "style",
- "description": "Sets the format of tick visibility on this axis."
- },
- "showticklabels": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the axis ticks will feature tick labels."
- },
- "tick0": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the starting point of the ticks of this axis."
- },
- "dtick": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the distance between ticks on this axis."
- },
- "ticklen": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this axis."
- },
- "tickwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the tick lines on this axis."
- },
- "tickcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the tick lines on this axis."
- },
- "tickangle": {
- "val_types": "number: x in [-90, 90]",
- "required": false,
- "type": "style",
- "description": "Sets the angle in degrees of the ticks on this axis."
- },
- "tickfont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the ticks' font."
- },
- "exponentformat": {
- "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
- "required": false,
- "type": "style",
- "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
- },
- "showexponent": {
- "val_types": "'all' | 'first' | 'last' | 'none'",
- "required": false,
- "type": "style",
- "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
- },
- "mirror": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether to mirror the axis line to the opposite side of the plot."
- },
- "gridcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the axis grid color."
- },
- "gridwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the grid width (in pixels)."
- },
- "zerolinecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of this axis' zeroline."
- },
- "zerolinewidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of this axis' zeroline (in pixels)."
- },
- "linecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the axis line color."
- },
- "linewidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the axis line (in pixels)."
- },
- "anchor": {
- "val_types": "'x' | 'x1' | 'x2' | ... | 'free'",
- "required": false,
- "type": "plot_info",
- "description": "Choose whether the position of this y-axis will be anchored to a corresponding x-axis or will be 'free' to appear anywhere in the horizontal space of this figure."
- },
- "overlaying": {
- "val_types": "'y' | 'y1' | 'y2' | ... | False",
- "required": false,
- "type": "plot_info",
- "description": "Choose to overlay the data bound to this y-axis on the same plotting area as a corresponding x-axis or choose not overlay other y-the other axis/axes of this figure."
- },
- "side": {
- "val_types": "'left' | 'right'",
- "required": false,
- "type": "plot_info",
- "description": "Sets whether this y-axis sits at the 'left' of the plot or at the 'right' of the plot."
- },
- "position": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets where this y-axis is positioned in the plotting space. For example 'position'=0.5 will place this axis in the exact center of the plotting space. Has an effect only if 'anchor' is set to 'free'."
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'linear' | 'log' | 'date' | 'category'",
+ "required": false,
+ "description": "Sets the format of this axis."
+ },
+ "rangemode": {
+ "key_type": "style",
+ "val_types": "'normal' | 'tozero' | 'nonnegative'",
+ "required": false,
+ "description": "Choose between Plotly's automated axis generation modes: 'normal' (the default) sets the axis range in relation to the extrema in the data object, 'tozero' extends the axes to y=0 no matter the data plotted and 'nonnegative' sets a non-negative range no matter the data plotted."
+ },
+ "autorange": {
+ "key_type": "style",
+ "val_types": "True | False | 'reversed'",
+ "required": false,
+ "description": "Toggle whether or not the range of this y-axis is automatically picked by Plotly. If 'range' is set, then 'autorange' is set to False automatically. Otherwise, if 'autorange' is set to True (the default behavior), the range of this y-axis can respond to adjustments made in the web GUI automatically. If 'autorange' is set to 'reversed', then this y-axis is drawn in reverse, e.g. in a 2D plot, from top to bottom instead of from bottom to top (the default behavior)."
+ },
+ "showgrid": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this axis features grid lines."
+ },
+ "zeroline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not an additional grid line (thicker than the other grid lines, by default) will appear on this axis along y=0."
+ },
+ "showline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the line bounding this y-axis will be shown on the figure."
+ },
+ "autotick": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the axis ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this axis object."
+ },
+ "nticks": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the number of axis ticks. No need to set 'autoticks' to False for 'nticks' to apply."
+ },
+ "ticks": {
+ "key_type": "style",
+ "val_types": "'' | 'inside' | 'outside'",
+ "required": false,
+ "description": "Sets the format of the ticks on this axis. For hidden ticks, link 'ticks' to an empty string."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks will feature tick labels."
+ },
+ "tick0": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the starting point of the ticks of this axis."
+ },
+ "dtick": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the distance between ticks on this axis."
+ },
+ "ticklen": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the length of the tick lines on this axis."
+ },
+ "tickwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the tick lines on this axis."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the tick lines on this axis."
+ },
+ "tickangle": {
+ "key_type": "style",
+ "val_types": "number: x in [-90, 90]",
+ "required": false,
+ "description": "Sets the angle in degrees of the ticks on this axis."
+ },
+ "tickfont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the ticks' font."
+ },
+ "exponentformat": {
+ "key_type": "style",
+ "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
+ "required": false,
+ "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
+ },
+ "showexponent": {
+ "key_type": "style",
+ "val_types": "'all' | 'first' | 'last' | 'none'",
+ "required": false,
+ "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
+ },
+ "mirror": {
+ "key_type": "style",
+ "val_types": "True | False | 'ticks' | 'all' | 'allticks'",
+ "required": false,
+ "description": "Toggle the axis line and/or ticks across the plots or subplots. If True, mirror the axis line across the primary subplot (i.e. the axis that this axis is anchored to). If 'ticks', mirror the axis line and the ticks. If 'all', mirror the axis line to all subplots containing this axis. If 'allticks', mirror the line and ticks to all subplots containing this axis. If False, don't mirror the axis or the ticks."
+ },
+ "gridcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis grid color."
+ },
+ "gridwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the grid width (in pixels)."
+ },
+ "zerolinecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of this axis' zeroline."
+ },
+ "zerolinewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of this axis' zeroline (in pixels)."
+ },
+ "linecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis line color."
+ },
+ "linewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the axis line (in pixels)."
+ },
+ "anchor": {
+ "key_type": "plot_info",
+ "val_types": "'x' | 'x1' | 'x2' | ... | 'free' ",
+ "required": false,
+ "description": "Choose whether the position of this y-axis will be anchored to a corresponding x-axis or will be 'free' to appear anywhere in the horizontal space of this figure. Has no effect in 3D plots."
+ },
+ "overlaying": {
+ "key_type": "plot_info",
+ "val_types": "'y' | 'y1' | 'y2' | ... | False",
+ "required": false,
+ "description": "Choose to overlay the data bound to this y-axis on the same plotting area as a corresponding x-axis or choose not overlay other y-the other axis/axes of this figure.Has no effect in 3D plots."
+ },
+ "side": {
+ "key_type": "plot_info",
+ "val_types": "'left' | 'right'",
+ "required": false,
+ "description": "Sets whether this y-axis sits at the 'left' of the plot or at the 'right' of the plot.Has no effect in 3D plots."
+ },
+ "position": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets where this y-axis is positioned in the plotting space. For example if 'position' is set to 0.5, then this axis is placed at the exact center of the plotting space. Has an effect only if 'anchor' is set to 'free'.Has no effect in 3D plots."
+ },
+ "showbackground": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this y-axis will have a background color. Has an effect only in 3D plots."
+ },
+ "backgroundcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background color of this y-axis. Has an effect only in 3D plots and if 'showbackground' is set to True."
+ },
+ "showspikes": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not spikes will link up to this y-axis when hovering over data points. Has an effect only in 3D plots."
+ },
+ "spikesides": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the spikes will expand out to the y-axis bounds when hovering over data points. Has an effect only in 3D plots and if 'showspikes' is set to True."
+ },
+ "spikethickness": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the thickness (in pixels) of the y-axis spikes.Has an effect only in 3D plots and if 'showspikes' is set to True."
+ }
}
},
"radialaxis": {
- "range": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "style",
- "description": "Defines the start and end point of this radial axis.",
- "examples": [
- [
- -13,
- 20
- ],
- [
- 0,
- 1
+ "name": "RadialAxis",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "radialaxis"
+ ],
+ "docstring": "A dictionary-like object for representing a radial axis in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/polar-chart/"
+ ],
+ "keymeta": {
+ "range": {
+ "key_type": "style",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Defines the start and end point of this radial-axis.",
+ "examples": [
+ "[-13, 20]",
+ "[0, 1]"
]
- ]
- },
- "domain": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "plot_info",
- "description": "Polar chart subplots are not supported yet. This key has currently no effect."
- },
- "orientation": {
- "val_types": "number: x in [-360, 360]",
- "required": false,
- "type": "style",
- "description": "Sets the orientation (an angle with respect to the origin) of the radial axis."
- },
- "showline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the line bounding this radial axis will be shown on the figure."
- },
- "showticklabels": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the radial axis ticks will feature tick labels."
- },
- "tickorientation": {
- "val_types": "'horizontal' | 'vertical'",
- "required": false,
- "type": "style",
- "description": "Choose the orientation (from the paper perspective) of the radial axis tick labels."
- },
- "ticklen": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this radial axis."
- },
- "tickcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the tick lines on this radial axis."
- },
- "ticksuffix": {
- "val_types": "string",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this radial axis."
- },
- "endpadding": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "more info coming soon"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
+ },
+ "domain": {
+ "key_type": "plot_info",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Polar chart subplots are not supported yet. This key has currently no effect."
+ },
+ "orientation": {
+ "key_type": "style",
+ "val_types": "number: x in [-360, 360]",
+ "required": false,
+ "description": "Sets the orientation (an angle with respect to the origin) of the radial axis."
+ },
+ "showline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the line bounding this radial-axis will be shown on the figure."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the radial axis ticks will feature tick labels."
+ },
+ "tickorientation": {
+ "key_type": "style",
+ "val_types": "'horizontal' | 'vertical'",
+ "required": false,
+ "description": "Choose the orientation (from the paper perspective) of the radial axis tick labels."
+ },
+ "ticklen": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the length of the tick lines on this radial axis."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the tick lines on this radial axis."
+ },
+ "ticksuffix": {
+ "key_type": "style",
+ "val_types": "a string",
+ "required": false,
+ "description": "Sets the length of the tick lines on this radial axis."
+ },
+ "endpadding": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "more info coming soon"
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ }
}
},
"angularaxis": {
- "range": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "style",
- "description": "Defines the start and end point of this angular axis. By default, 'range' is set to [0,360]. Has no effect if 't' is linked to an array-like of string.",
- "examples": [
- [
- 0,
- 180
+ "name": "AngularAxis",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "angularaxis"
+ ],
+ "docstring": "A dictionary-like object for representing an angular axis in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/polar-chart/"
+ ],
+ "keymeta": {
+ "range": {
+ "key_type": "style",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Defines the start and end point of this angular-axis. By default, 'range' is set to [0,360]. Has no effect if 't' is linked to a list or 1d numpy array of strings.",
+ "examples": [
+ "[0, 180]",
+ "[0, 6.2831]"
+ ]
+ },
+ "domain": {
+ "key_type": "plot_info",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Polar chart subplots are not supported yet. This key has currently no effect."
+ },
+ "showline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the line bounding this angular-axis will be shown on the figure. If 'showline' is set to True, the bounding line starts from the origin and extends to the edge of radial axis."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the angular axis ticks will feature tick labels."
+ },
+ "tickorientation": {
+ "key_type": "style",
+ "val_types": "'horizontal' | 'vertical'",
+ "required": false,
+ "description": "Choose the orientation (from the paper's perspective) of the radial axis tick labels."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
],
- [
- 0,
- 6.2831
+ "description": "Sets the color of the tick lines on this angular axis."
+ },
+ "ticksuffix": {
+ "key_type": "style",
+ "val_types": "a string",
+ "required": false,
+ "description": "Sets the length of the tick lines on this angular axis."
+ },
+ "endpadding": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "more info coming soon"
+ },
+ "visible": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggles whether or not this object will be visible on the rendered figure."
+ }
+ }
+ },
+ "scene": {
+ "name": "Scene",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "scene"
+ ],
+ "docstring": "A dictionary-like object for representing a 3D scene in plotly.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "xaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing an x-axis of a particular 3D scene."
+ },
+ "yaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing an y-axis of a particular 3D scene."
+ },
+ "zaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing an z-axis of a particular 3D scene."
+ },
+ "cameraposition": {
+ "key_type": "plot_info",
+ "val_types": "camera position list or 1d numpy array",
+ "required": false,
+ "examples": [
+ "[[0.2, 0.5, 0.1, 0.2], [0.1, 0, -0.1], 3]"
+ ],
+ "description": "Sets the camera position with respect to the scene. The first entry (a list or 1d numpy array of length 4) sets the angular position of the camera. The second entry (a list or 1d numpy array of length 3) sets the (x,y,z) translation of the camera. The third entry (a scalar) sets zoom of the camera."
+ },
+ "bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background (bg) color of this scene (i.e. of the plotting surface and the margins).",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
]
- ]
- },
- "domain": {
- "val_types": "number array of length 2",
- "required": false,
- "type": "plot_info",
- "description": "Polar chart subplots are not supported yet. This key has currently no effect."
- },
- "showline": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the line bounding this angular axis will be shown on the figure. If 'showline' is set to True, the bounding line starts from the origin and extends to the edge of radial axis."
- },
- "showticklabels": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the angular axis ticks will feature tick labels."
- },
- "tickorientation": {
- "val_types": "'horizontal' | 'vertical'",
- "required": false,
- "type": "style",
- "description": "Choose the orientation (from the paper's perspective) of the radial axis tick labels."
- },
- "tickcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the tick lines on this angular axis."
- },
- "ticksuffix": {
- "val_types": "string",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this angular axis."
- },
- "endpadding": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "more info coming soon"
- },
- "visible": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggles whether or not this object will actually be visible in the rendered figure."
+ }
}
},
- "legend": {
- "x": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'x' position of this legend. Use in conjunction with 'xref' and 'xanchor' to fine-tune the location of this legend."
- },
- "y": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'y' position of this legend. Use in conjunction with 'yref' and 'yanchor' to fine-tune the location of this legend."
- },
- "traceorder": {
- "val_types": "'normal' | 'reversed'",
- "required": false,
- "type": "style",
- "description": "Trace order is set by the order of the data in associated grid for the plot. This sets whether this order is read from left-to-right or from right-to-left."
- },
- "font": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings within the legend."
- },
- "bgcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the background (bg) color for the legend.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "bordercolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the enclosing border color for the legend.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "borderwidth": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the border enclosing for the legend."
- },
- "xref": {
- "val_types": "'paper' | 'x1' | 'x2' | etc",
- "required": false,
- "type": "plot_info",
- "description": "Sets the x coordinate for this object refers to. If you reference an axis, e.g., 'x2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'x' location refers to the distance from the left side of the plotting area in normalized coordinates where 0=='left' and 1=='right'. If set to refer to an xaxis' object, e.g., 'x1', 'x2', 'x3', etc., the 'x' location will refer to the location in terms of this axis."
- },
- "yref": {
- "val_types": "'paper' | 'y1' | 'y2' | etc",
- "required": false,
- "type": "plot_info",
- "description": "Sets the y coordinate for this object refers to. If you reference an axis, e.g., 'y2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'y' location refers to the distance from the left side of the plotting area in normalized coordinates where 0=='bottom' and 1=='top'. If set to refer to an yaxis' object, e.g., 'y1', 'y2', 'y3', etc., the 'y' location will refer to the location in terms of this axis."
- },
- "xanchor": {
- "val_types": "'auto' | 'left' | 'center' | 'right'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the horizontal location of the object referenced by the 'x' (position) key. For example, if 'x'==1, 'xref'='paper', and 'xanchor'='right', the rightmost portion of this object will line up with the rightmost edge of the plotting area."
- },
- "yanchor": {
- "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the horizontal location of the object referenced by the 'y' (position) key. For example, if 'y'==1, 'yref'='paper', and 'yanchor'='top', the topmost portion of this object will line up with the topmost edge of the plotting area."
+ "zaxis": {
+ "name": "ZAxis",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "zaxis"
+ ],
+ "docstring": "A dictionary-like object for representing a z-axis in 3D plotly graphs.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "title": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "description": "The z-axis title."
+ },
+ "titlefont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings of the z-axis title."
+ },
+ "range": {
+ "key_type": "style",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Defines the start and end point of this z-axis.",
+ "examples": [
+ "[-13, 20]",
+ "[0, 1]"
+ ]
+ },
+ "domain": {
+ "key_type": "plot_info",
+ "val_types": "number array of length 2",
+ "required": false,
+ "description": "Sets the domain of this z-axis; that is, the available space for this z-axis to live in. Domain coordinates are given in normalized coordinates with respect to the paper.",
+ "examples": [
+ "[0, 0.4]",
+ "[0.6, 1]"
+ ]
+ },
+ "type": {
+ "key_type": "plot_info",
+ "val_types": "'linear' | 'log' | 'date' | 'category'",
+ "required": false,
+ "description": "Sets the format of this axis."
+ },
+ "rangemode": {
+ "key_type": "style",
+ "val_types": "'normal' | 'tozero' | 'nonnegative'",
+ "required": false,
+ "description": "Choose between Plotly's automated axis generation modes: 'normal' (the default) sets the axis range in relation to the extrema in the data object, 'tozero' extends the axes to z=0 no matter the data plotted and 'nonnegative' sets a non-negative range no matter the data plotted."
+ },
+ "autorange": {
+ "key_type": "style",
+ "val_types": "True | False | 'reversed'",
+ "required": false,
+ "description": "Toggle whether or not the range of this z-axis is automatically picked by Plotly. If 'range' is set, then 'autorange' is set to False automatically. Otherwise, if 'autorange' is set to True (the default behavior), the range of this z-axis can respond to adjustments made in the web GUI automatically. If 'autorange' is set to 'reversed', then this z-axis is drawn in reverse."
+ },
+ "showgrid": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this axis features grid lines."
+ },
+ "zeroline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not an additional grid line (thicker than the other grid lines, by default) will appear on this axis along z=0."
+ },
+ "showline": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the line bounding this z-axis will be shown on the figure."
+ },
+ "autotick": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the axis ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this axis object."
+ },
+ "nticks": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the number of axis ticks. No need to set 'autoticks' to False for 'nticks' to apply."
+ },
+ "ticks": {
+ "key_type": "style",
+ "val_types": "'' | 'inside' | 'outside'",
+ "required": false,
+ "description": "Sets the format of the ticks on this axis. For hidden ticks, link 'ticks' to an empty string."
+ },
+ "showticklabels": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the axis ticks will feature tick labels."
+ },
+ "tick0": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the starting point of the ticks of this axis."
+ },
+ "dtick": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the distance between ticks on this axis."
+ },
+ "ticklen": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the length of the tick lines on this axis."
+ },
+ "tickwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the tick lines on this axis."
+ },
+ "tickcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the tick lines on this axis."
+ },
+ "tickangle": {
+ "key_type": "style",
+ "val_types": "number: x in [-90, 90]",
+ "required": false,
+ "description": "Sets the angle in degrees of the ticks on this axis."
+ },
+ "tickfont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object defining the parameters of the ticks' font."
+ },
+ "exponentformat": {
+ "key_type": "style",
+ "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
+ "required": false,
+ "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
+ },
+ "showexponent": {
+ "key_type": "style",
+ "val_types": "'all' | 'first' | 'last' | 'none'",
+ "required": false,
+ "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
+ },
+ "mirror": {
+ "key_type": "style",
+ "val_types": "True | False | 'ticks' | 'all' | 'allticks'",
+ "required": false,
+ "description": "Has no effect in 3D plots."
+ },
+ "gridcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis grid color."
+ },
+ "gridwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the grid width (in pixels)."
+ },
+ "zerolinecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of this axis' zeroline."
+ },
+ "zerolinewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of this axis' zeroline (in pixels)."
+ },
+ "linecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the axis line color."
+ },
+ "linewidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width of the axis line (in pixels)."
+ },
+ "anchor": {
+ "key_type": "plot_info",
+ "val_types": "",
+ "required": false,
+ "description": "Has no effect in 3D plots."
+ },
+ "overlaying": {
+ "key_type": "plot_info",
+ "val_types": "",
+ "required": false,
+ "description": "Has no effect in 3D plots."
+ },
+ "side": {
+ "key_type": "plot_info",
+ "val_types": "",
+ "required": false,
+ "description": "Has no effect in 3D plots."
+ },
+ "position": {
+ "key_type": "style",
+ "val_types": "",
+ "required": false,
+ "description": "Has no effect in 3D plots."
+ },
+ "showbackground": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not this z-axis will have a background color. Has an effect only in 3D plots."
+ },
+ "backgroundcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background color of this z-axis. Has an effect only in 3D plots and if 'showbackground' is set to True."
+ },
+ "showspikes": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not spikes will link up to this z-axis when hovering over data points. Has an effect only in 3D plots."
+ },
+ "spikesides": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the spikes will expand out to the z-axis bounds when hovering over data points. Has an effect only in 3D plots and if 'showspikes' is set to True."
+ },
+ "spikethickness": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the thickness (in pixels) of the z-axis spikes.Has an effect only in 3D plots and if 'showspikes' is set to True."
+ }
}
},
- "colorbar": {
- "title": {
- "val_types": "string",
- "required": false,
- "type": "plot_info",
- "description": "The title of the colorbar."
- },
- "titleside": {
- "val_types": "'right' | 'top' | 'bottom'",
- "required": false,
- "type": "style",
- "description": "Location of colorbar title with respect to the colorbar."
- },
- "titlefont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings of the colorbar title."
- },
- "thickness": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the thickness of the line surrounding the colorbar."
- },
- "thicknessmode": {
- "val_types": "string: 'pixels' | 'fraction' ",
- "required": false,
- "type": "style",
- "description": "Sets thickness unit mode."
- },
- "len": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the length of the colorbar."
- },
- "lenmode": {
- "val_types": "string: 'pixels' | 'fraction' ",
- "required": false,
- "type": "style",
- "description": "Sets length unit mode."
- },
- "x": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'x' position of this colorbar. "
- },
- "y": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'y' position of this colorbar. "
- },
- "autotick": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the colorbar ticks parameters are picked automatically by Plotly. Once 'autotick' is set to False, the colorbar ticks parameters can be declared with 'ticks', 'tick0', 'dtick0' and other tick-related key in this colorbar object."
- },
- "nticks": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Specifies the number of colorbar ticks. No need to set 'autoticks' to False for 'nticks' to apply."
- },
- "ticks": {
- "val_types": "'' | 'inside' | 'outside'",
- "required": false,
- "type": "style",
- "description": "Sets the format of tick visibility on this colorbar."
- },
- "showticklabels": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the colorbar ticks will feature tick labels."
- },
- "tick0": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the starting point of the ticks of this colorbar."
- },
- "dtick": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the distance between ticks on this colorbar."
- },
- "ticklen": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the length of the tick lines on this colorbar."
- },
- "tickwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the tick lines on this colorbar."
- },
- "tickcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the tick lines on this colorbar."
- },
- "tickangle": {
- "val_types": "number: x in [-90, 90]",
- "required": false,
- "type": "style",
- "description": "Sets the angle in degrees of the ticks on this colorbar."
- },
- "tickfont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object defining the parameters of the ticks' font."
- },
- "exponentformat": {
- "val_types": "'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
- "required": false,
- "type": "style",
- "description": "Sets how exponents show up. Here's how the number 1000000000 (1 billion) shows up in each. If set to 'none': 1,000,000,000. If set to 'e': 1e+9. If set to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 will appear super-scripted). If set to 'SI': 1G. If set to 'B': 1B (useful when referring to currency)."
- },
- "showexponent": {
- "val_types": "'all' | 'first' | 'last' | 'none'",
- "required": false,
- "type": "style",
- "description": "If set to 'all', ALL exponents will be shown appended to their significands. If set to 'first', the first tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'last', the last tick's exponent will be appended to its significand, however no other exponents will appear--only the significands. If set to 'none', no exponents will appear, only the significands."
- },
- "xanchor": {
- "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the horizontal location of the object referenced by the 'y' (position) key. For example, if 'y'==1, 'yref'='paper', and 'yanchor'='top', the topmost portion of this object will line up with the topmost edge of the plotting area."
- },
- "bgcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the background (bg) color for this colorbar.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "outlinecolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "The color of the outline surrounding this colorbar.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "outlinewidth": {
- "val_types": "number",
- "required": false,
- "type": "style",
- "description": "Sets the width of the outline surrounding this colorbar."
- },
- "borderwidth": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the boarder enclosing this colorbar"
- },
- "xpad": {
- "val_types": "number: x in [0, 50]",
- "required": false,
- "type": "style",
- "description": "Sets the amount of space (padding) between the colorbar and the enclosing boarder in the x-direction."
- },
- "ypad": {
- "val_types": "number: x in [0, 50]",
- "required": false,
- "type": "style",
- "description": "Sets the amount of space (padding) between the colorbar and the enclosing boarder in the y-direction."
+ "layout": {
+ "name": "Layout",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "layout"
+ ],
+ "docstring": "A dictionary-like object containing specification of the layout of a plotly figure.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/figure-labels/",
+ "https://plot.ly/python/axes/",
+ "https://plot.ly/python/bar-charts/",
+ "https://plot.ly/python/log-plot/"
+ ],
+ "keymeta": {
+ "title": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "description": "The title of the figure."
+ },
+ "titlefont": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings of the figure's title."
+ },
+ "font": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the global font settings for this figure (e.g. all axis titles and labels)."
+ },
+ "showlegend": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the legend will be shown in this figure."
+ },
+ "autosize": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the dimensions of the figure are automatically picked by Plotly. Plotly picks figure's dimensions as a function of your machine's display resolution. Once 'autosize' is set to False, the figure's dimensions can be set with 'width' and 'height'."
+ },
+ "width": {
+ "key_type": "plot_info",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the width in pixels of the figure you are generating."
+ },
+ "height": {
+ "key_type": "plot_info",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the height in pixels of the figure you are generating."
+ },
+ "xaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing an x-axis (i.e. an horizontal axis). The first XAxis object can be entered into 'layout' by linking it to 'xaxis' OR 'xaxis1', both keys are identical to Plotly. To create references other than x-axes, you need to define them in 'layout' using keys 'xaxis2', 'xaxis3' and so on. Note that in 3D plots, XAxis objects must be linked from a Scene object."
+ },
+ "yaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing an y-axis (i.e. an vertical axis). The first YAxis object can be entered into 'layout' by linking it to 'yaxis' OR 'yaxis1', both keys are identical to Plotly. To create references other than y-axes, you need to define them in 'layout' using keys 'yaxis2', 'yaxis3' and so on. Note that in 3D plots, YAxis objects must be linked from a Scene object."
+ },
+ "legend": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing the legend parameters for this figure."
+ },
+ "annotations": {
+ "key_type": "object",
+ "val_types": "list-like object of one or several dictionary-like object",
+ "required": false,
+ "description": "Links a list-like object that contains one or multiple annotation dictionary-like objects."
+ },
+ "margin": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object containing the margin parameters for this figure."
+ },
+ "paper_bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the figure's paper (i.e. area representing the canvas of the figure)."
+ },
+ "plot_bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the background color of the plot (i.e. the area laying inside this figure's axes."
+ },
+ "hovermode": {
+ "key_type": "style",
+ "val_types": "'closest' | 'x' | 'y'",
+ "required": false,
+ "description": "Sets this figure's behavior when a user hovers over it. When set to 'x', all data sharing the same 'x' coordinate will be shown on screen with corresponding trace labels. When set to 'y' all data sharing the same 'y' coordinates will be shown on the screen with corresponding trace labels. When set to 'closest', information about the data point closest to where the viewer is hovering will appear."
+ },
+ "dragmode": {
+ "key_type": "style",
+ "val_types": "'zoom' | 'pan' | 'rotate' (in 3D plots)",
+ "required": false,
+ "description": "Sets this figure's behavior when a user preforms a mouse 'drag' in the plot area. When set to 'zoom', a portion of the plot will be highlighted, when the viewer exits the drag, this highlighted section will be zoomed in on. When set to 'pan', data in the plot will move along with the viewers dragging motions. A user can always depress the 'shift' key to access the whatever functionality has not been set as the default. In 3D plots, the default drag mode is 'rotate' which rotates the scene."
+ },
+ "separators": {
+ "key_type": "style",
+ "val_types": "a two-character string",
+ "required": false,
+ "description": "Sets the decimal (the first character) and thousands (the second character) separators to be displayed on this figure's tick labels and hover mode. This is meant for internationalization purposes. For example, if 'separator' is set to ', ', then decimals are separated by commas and thousands by spaces. One may have to set 'exponentformat' to 'none' in the corresponding axis object(s) to see the effects."
+ },
+ "barmode": {
+ "key_type": "plot_info",
+ "val_types": "'stack' | 'group' | 'overlay'",
+ "required": false,
+ "description": "For bar and histogram plots only. This sets how multiple bar objects are plotted together. In other words, this defines how bars at the same location appear on the plot. If set to 'stack' the bars are stacked on top of one another. If set to 'group', the bars are plotted next to one another, centered around the shared location. If set to 'overlay', the bars are simply plotted over one another, you may need to set the opacity to see this."
+ },
+ "bargap": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "For bar and histogram plots only. Sets the gap between bars (or sets of bars) at different locations."
+ },
+ "bargroupgap": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "For bar and histogram plots only. Sets the gap between bars in the same group. That is, when multiple bar objects are plotted and share the same locations, this sets the distance between bars at each location."
+ },
+ "boxmode": {
+ "key_type": "plot_info",
+ "val_types": "'overlay' | 'group'",
+ "required": false,
+ "description": "For box plots only. Sets how groups of box plots appear. If set to 'overlay', a group of boxes will be plotted directly on top of one another at their specified location. If set to 'group', the boxes will be centered around their shared location, but they will not overlap."
+ },
+ "radialaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the radial axis in a polar plot."
+ },
+ "angularaxis": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the angular axis in a polar plot."
+ },
+ "scene": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing a scene in a 3D plot. The first Scene object can be entered into 'layout' by linking it to 'scene' OR 'scene1', both keys are identical to Plotly. Link subsequent Scene objects using 'scene2', 'scene3', etc."
+ },
+ "direction": {
+ "key_type": "plot_info",
+ "val_types": "'clockwise' | 'counterclockwise'",
+ "required": false,
+ "description": "For polar plots only. Sets the direction corresponding to positive angles."
+ },
+ "orientation": {
+ "key_type": "plot_info",
+ "val_types": "number: x in [-360, 360]",
+ "required": false,
+ "description": "For polar plots only. Rotates the entire polar by the given angle."
+ },
+ "hidesources": {
+ "key_type": "style",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not an annotation citing the data source is placed at the bottom-right corner of the figure.This key has an effect only on graphs that have been generated from forked graphs from plot.ly."
+ }
}
},
- "margin": {
- "l": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the left margin size in pixels."
- },
- "r": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the right margin size in pixels."
- },
- "b": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the bottom margin size in pixels."
- },
- "t": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the top margin size in pixels."
- },
- "pad": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the distance between edge of the plot and the bounding rectangle that encloses the plot (in pixels)."
- },
- "autoexpand": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "more info coming soon"
+ "font": {
+ "name": "Font",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "font",
+ "titlefont",
+ "textfont",
+ "tickfont"
+ ],
+ "docstring": "A dictionary-like object containing specifications of on-plot, title or global text font.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/font/",
+ "https://plot.ly/python/text-and-annotations/",
+ "https://plot.ly/python/line-and-scatter/"
+ ],
+ "keymeta": {
+ "family": {
+ "key_type": "style",
+ "val_types": "'Arial, sans-serif' | 'Balto, sans-serif' | 'Courier New, monospace' | 'Droid Sans, sans-serif' | 'Droid Serif, serif' | 'Droid Sans Mono, sans-serif' | 'Georgia, serif' | 'Gravitas One, cursive' | 'Old Standard TT, serif' | 'Open Sans, sans-serif' or ('') | 'PT Sans Narrow, sans-serif' | 'Raleway, sans-serif' | 'Times New Roman, Times, serif'",
+ "required": false,
+ "description": "Sets the font family. If linked in the first level of the layout object, set the color of the global font. The default font in Plotly is 'Open Sans, sans-serif'."
+ },
+ "size": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the size of text font. If linked directly from 'layout', set the size of the global font.",
+ "streamable": true
+ },
+ "color": {
+ "val_types": "a string describing color",
+ "description": "Sets the color of the text font. If linked directly from 'layout', set the color of the global font.",
+ "required": false,
+ "streamable": true,
+ "key_type": "style",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "outlinecolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "For polar chart only. Sets the color of the text's outline.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ }
+ }
+ },
+ "legend": {
+ "name": "Legend",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "legend"
+ ],
+ "docstring": "A dictionary-like object for representing a legend in plotly.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/legend/",
+ "https://plot.ly/python/figure-labels/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'x' position of this legend.Use in conjunction with 'xref' and 'xanchor' to fine-tune the location of this legend."
+ },
+ "y": {
+ "key_type": "style",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'y' position of this legend.Use in conjunction with 'yref' and 'yanchor' to fine-tune the location of this legend."
+ },
+ "traceorder": {
+ "key_type": "style",
+ "val_types": "'normal' | 'reversed'",
+ "required": false,
+ "description": "Trace order is set by the order of trace in the data dictionary. The 'traceorder' key sets whether the legend labels are shown from first-to-last trace ('normal') or from last-to-first ('reversed')."
+ },
+ "font": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings within the legend."
+ },
+ "bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background (bg) color of the legend.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "bordercolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the enclosing border color for the legend.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "borderwidth": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width of the border enclosing for the legend."
+ },
+ "xref": {
+ "key_type": "style",
+ "val_types": "'paper' | 'x1' | 'x2' | etc",
+ "required": false,
+ "description": "Sets the x coordinate system which this object refers to. If you reference an axis, e.g., 'x2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'x' location refers to the distance from the left side of the plotting area in normalized coordinates where 0 is 'left' and 1 is 'right'. If set to refer to an xaxis' , e.g., 'x1', 'x2', 'x3', etc., the 'x' location will refer to the location in terms of this axis."
+ },
+ "yref": {
+ "key_type": "style",
+ "val_types": "'paper' | 'y1' | 'y2' | etc",
+ "required": false,
+ "description": "Sets the y coordinate system which this object refers to. If you reference an axis, e.g., 'y2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'y' location refers to the distance from the left side of the plotting area in normalized coordinates where 0 is 'bottom' and 1 is 'top'. If set to refer to an yaxis' , e.g., 'y1', 'y2', 'y3', etc., the 'y' location will refer to the location in terms of this axis."
+ },
+ "xanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'left' | 'center' | 'right'",
+ "required": false,
+ "description": "Sets the horizontal position anchor of this legend. That is, bind the position set with the 'x' key to the 'left' or 'center' or 'right' of this legend. For example, if 'x' is set to 1, 'xref' to 'paper', and 'xanchor' to 'right', the right-most portion of this object will line up with the right-most edge of the plotting area."
+ },
+ "yanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
+ "required": false,
+ "description": "Sets the vertical position anchor of this legend. That is, bind the position set with the 'y' key to the 'bottom' or 'middle' or 'top' of this legend. For example, if 'y' is set to 1, 'yref' to 'paper', and 'yanchor' to 'top', the top-most portion of this object will line up with the top-most edge of the plotting area."
+ }
}
},
"annotation": {
- "x": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'x' position of this annotation. Use in conjunction with 'xref' and 'xanchor' to fine-tune the location of this annotation."
- },
- "y": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Sets the 'y' position of this annotation. Use in conjunction with 'yref' and 'yanchor' to fine-tune the location of this annotation."
- },
- "xref": {
- "val_types": "'paper' | 'x1' | 'x2' | etc",
- "required": false,
- "type": "plot_info",
- "description": "Sets the x coordinate for this object refers to. If you reference an axis, e.g., 'x2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'x' location refers to the distance from the left side of the plotting area in normalized coordinates where 0=='left' and 1=='right'. If set to refer to an xaxis' object, e.g., 'x1', 'x2', 'x3', etc., the 'x' location will refer to the location in terms of this axis."
- },
- "yref": {
- "val_types": "'paper' | 'y1' | 'y2' | etc",
- "required": false,
- "type": "plot_info",
- "description": "Sets the y coordinate for this object refers to. If you reference an axis, e.g., 'y2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'y' location refers to the distance from the left side of the plotting area in normalized coordinates where 0=='bottom' and 1=='top'. If set to refer to an yaxis' object, e.g., 'y1', 'y2', 'y3', etc., the 'y' location will refer to the location in terms of this axis."
- },
- "text": {
- "val_types": "string",
- "required": false,
- "type": "plot_info",
- "examples": [
- "regular text",
- "an annotation
spanning two lines",
- "bold text",
- "a link to plot.ly"
- ],
- "description": "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."
- },
- "showarrow": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "plot_info",
- "description": "Toggle whether or not the arrow associated with this annotation with be shown. If False, then the text linked to 'text' lines up with the 'x', 'y' coordinates'. If True (the default), then 'text' is placed near the arrow's tail."
- },
- "font": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings within this annotation."
- },
- "xanchor": {
- "val_types": "'auto' | 'left' | 'center' | 'right'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the horizontal location of the object referenced by the 'x' (position) key. For example, if 'x'==1, 'xref'='paper', and 'xanchor'='right', the rightmost portion of this object will line up with the rightmost edge of the plotting area."
- },
- "yanchor": {
- "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the horizontal location of the object referenced by the 'y' (position) key. For example, if 'y'==1, 'yref'='paper', and 'yanchor'='top', the topmost portion of this object will line up with the topmost edge of the plotting area."
- },
- "align": {
- "val_types": "'left' | 'center' | 'right'",
- "required": false,
- "type": "plot_info",
- "description": "Sets the vertical alignment of the text in the annotation with respect to the set 'x', 'y' position. Has only an effect if the text linked to 'text' spans more two or more lines (using
HTML one or more tags)."
- },
- "arrowhead": {
- "val_types": "0 | 1 | 2 | 3 | 4 | 5 | 6 | 7",
- "required": false,
- "type": "style",
- "description": "Sets the arrowhead style. Has an effect only if 'showarrow' is set to True."
- },
- "arrowsize": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Scales the arrowhead's size. Has an effect only if 'showarrow' is set to True."
- },
- "arrowwidth": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the arrowhead's width (in pixels). Has an effect only if 'showarrow' is set to True."
- },
- "arrowcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the arrowhead. Has an effect only if 'showarrow' is set to True."
- },
- "ax": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Position of the annotation text relative to the arrowhead about the x-axis. Has an effect only if 'showarrow' is set to True."
- },
- "ay": {
- "val_types": "number",
- "required": false,
- "type": "plot_info",
- "description": "Position of the annotation text relative to the arrowhead about the y-axis. Has an effect only if 'showarrow' is set to True."
- },
- "textangle": {
- "val_types": "number: x in [-180, 180]",
- "required": false,
- "type": "style",
- "description": "Sets the angle of the text linked to 'text' with respect to the horizontal."
- },
- "bordercolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "The color of the enclosing boarder of this annotation.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "borderwidth": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "Sets the width of the boarder enclosing this annotation"
- },
- "borderpad": {
- "val_types": "number: x in [0, 10]",
- "required": false,
- "type": "style",
- "description": "The amount of space (padding) between the text and the enclosing boarder."
- },
- "bgcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "description": "Sets the background (bg) color for this annotation.",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ]
- },
- "opacity": {
- "val_types": "number: x in [0, 1]",
- "required": false,
- "type": "style",
- "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ "name": "Annotation",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object for representing an annotation in plotly. Annotations appear as notes on the final figure. You can set all the features of the annotation text, background color, and location. Additionally, these notes can be anchored to actual data or the page for help with location after pan-and-zoom actions.",
+ "examples": [
+ "annotation = Annotation(\n text='what i want this to say is:
THIS!',\n x=0,\n y=0,\n xref='paper',\n yref='paper,\n yanchor='bottom',\n xanchor='left')"
+ ],
+ "links": [
+ "https://plot.ly/python//text-and-annotations/"
+ ],
+ "keymeta": {
+ "x": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'x' position of this annotation.Use in conjunction with 'xref' and 'xanchor' to fine-tune the location of this annotation."
+ },
+ "y": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Sets the 'y' position of this annotation.Use in conjunction with 'yref' and 'yanchor' to fine-tune the location of this annotation."
+ },
+ "xref": {
+ "key_type": "style",
+ "val_types": "'paper' | 'x1' | 'x2' | etc",
+ "required": false,
+ "description": "Sets the x coordinate system which this object refers to. If you reference an axis, e.g., 'x2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'x' location refers to the distance from the left side of the plotting area in normalized coordinates where 0 is 'left' and 1 is 'right'. If set to refer to an xaxis' , e.g., 'x1', 'x2', 'x3', etc., the 'x' location will refer to the location in terms of this axis."
+ },
+ "yref": {
+ "key_type": "style",
+ "val_types": "'paper' | 'y1' | 'y2' | etc",
+ "required": false,
+ "description": "Sets the y coordinate system which this object refers to. If you reference an axis, e.g., 'y2', the object will move with pan-and-zoom to stay fixed to this point. If you reference the 'paper', it remains fixed regardless of pan-and-zoom. In other words, if set to 'paper', the 'y' location refers to the distance from the left side of the plotting area in normalized coordinates where 0 is 'bottom' and 1 is 'top'. If set to refer to an yaxis' , e.g., 'y1', 'y2', 'y3', etc., the 'y' location will refer to the location in terms of this axis."
+ },
+ "text": {
+ "key_type": "plot_info",
+ "val_types": "a string",
+ "required": false,
+ "examples": [
+ "'regular text'",
+ "'an annotation
spanning two lines'",
+ "'bold text'",
+ "\"a link to plot.ly\""
+ ],
+ "description": "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."
+ },
+ "showarrow": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "Toggle whether or not the arrow associated with this annotation with be shown. If False, then the text linked to 'text' lines up with the 'x', 'y' coordinates'. If True (the default), then 'text' is placed near the arrow's tail."
+ },
+ "font": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "Links a dictionary-like object describing the font settings within this annotation."
+ },
+ "xanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'left' | 'center' | 'right'",
+ "required": false,
+ "description": "Sets the horizontal position anchor of this annotation. That is, bind the position set with the 'x' key to the 'left' or 'center' or 'right' of this annotation. For example, if 'x' is set to 1, 'xref' to 'paper', and 'xanchor' to 'right', the right-most portion of this object will line up with the right-most edge of the plotting area."
+ },
+ "yanchor": {
+ "key_type": "plot_info",
+ "val_types": "'auto' | 'bottom' | 'middle' | 'top'",
+ "required": false,
+ "description": "Sets the vertical position anchor of this annotation. That is, bind the position set with the 'y' key to the 'bottom' or 'middle' or 'top' of this annotation. For example, if 'y' is set to 1, 'yref' to 'paper', and 'yanchor' to 'top', the top-most portion of this object will line up with the top-most edge of the plotting area."
+ },
+ "align": {
+ "key_type": "plot_info",
+ "val_types": "'left' | 'center' | 'right'",
+ "required": false,
+ "description": "Sets the vertical alignment of the text in the annotation with respect to the set 'x', 'y' position. Has only an effect if the text linked to 'text' spans more two or more lines (using
HTML one or more tags)."
+ },
+ "arrowhead": {
+ "key_type": "style",
+ "val_types": "0 | 1 | 2 | 3 | 4 | 5 | 6 | 7",
+ "required": false,
+ "description": "Sets the arrowhead style. Has an effect only if 'showarrow' is set to True."
+ },
+ "arrowsize": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Scales the arrowhead's size. Has an effect only if 'showarrow' is set to True."
+ },
+ "arrowwidth": {
+ "key_type": "style",
+ "val_types": "number: x > 0",
+ "required": false,
+ "description": "Sets the arrowhead's width (in pixels). Has an effect only if 'showarrow' is set to True."
+ },
+ "arrowcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ],
+ "description": "Sets the color of the arrowhead. Has an effect only if 'showarrow' is set to True."
+ },
+ "ax": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Position of the annotation text relative to the arrowhead about the x-axis. Has an effect only if 'showarrow' is set to True."
+ },
+ "ay": {
+ "key_type": "plot_info",
+ "val_types": "number",
+ "required": false,
+ "description": "Position of the annotation text relative to the arrowhead about the y-axis. Has an effect only if 'showarrow' is set to True."
+ },
+ "textangle": {
+ "key_type": "style",
+ "val_types": "number: x in [-180, 180]",
+ "required": false,
+ "description": "Sets the angle of the text linked to 'text' with respect to the horizontal."
+ },
+ "bordercolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "The color of the enclosing boarder of this annotation.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "borderwidth": {
+ "key_type": "style",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the width of the boarder enclosing this annotation"
+ },
+ "borderpad": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 10]",
+ "required": false,
+ "description": "The amount of space (padding) between the text and the enclosing boarder."
+ },
+ "bgcolor": {
+ "key_type": "style",
+ "val_types": "a string describing color",
+ "required": false,
+ "description": "Sets the background (bg) color of this annotation.",
+ "examples": [
+ "'green'",
+ "'rgb(0, 255, 0)'",
+ "'rgba(0, 255, 0, 0.3)'",
+ "'hsl(120,100%,50%)'",
+ "'hsla(120,100%,50%,0.3)'",
+ "'#434F1D'"
+ ]
+ },
+ "opacity": {
+ "key_type": "style",
+ "val_types": "number: x in [0, 1]",
+ "required": false,
+ "description": "Sets the opacity, or transparency, of the entire object, also known as the alpha channel of colors. If the object's color is given in terms of 'rgba' color model, 'opacity' is redundant."
+ }
}
},
- "layout": {
- "title": {
- "val_types": "string",
- "required": false,
- "type": "plot_info",
- "description": "The title of the figure."
- },
- "titlefont": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the font settings of the figure's title."
- },
- "font": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the global font settings for this figure (e.g. all axis titles and labels)."
- },
- "showlegend": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the legend will be shown in this figure."
- },
- "autosize": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not the dimensions of the figure are automatically picked by Plotly. Plotly picks figure's dimensions as a function of your machine's display resolution. Once 'autosize' is set to False, the figure's dimensions can be set with 'width' and 'height'."
- },
- "width": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the width in pixels of the figure you are generating."
- },
- "height": {
- "val_types": "number: x > 0",
- "required": false,
- "type": "style",
- "description": "Sets the height in pixels of the figure you are generating."
- },
- "xaxis": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing an x-axis (i.e. an horizontal axis). The first XAxis object can be entered into layout by linking it to 'xaxis' OR 'xaxis1', both keys are identical to Plotly. To create references other x-axes, you need to define them in the layout dictionary-like object using keys 'xaxis2', 'xaxis3' and so on."
- },
- "yaxis": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing an y-axis (i.e. an vertical axis). The first YAxis object can be entered into layout by linking it to 'yaxis' OR 'yaxis1', both keys are identical to Plotly. To create references other y-axes, you need to define them in the layout dictionary-like object using keys 'yaxis2', 'yaxis3' and so on."
- },
- "legend": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing the legend parameters for this figure."
- },
- "annotations": {
- "val_types": "array-like of one or several dictionaries",
- "required": false,
- "type": "object",
- "description": "A list-like object that contains one or multiple annotation dictionaries."
- },
- "margin": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object containing the margin parameters for this figure."
- },
- "paper_bgcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the color of the figure's paper (i.e. area representing the canvas of the figure)."
- },
- "plot_bgcolor": {
- "val_types": "string describing color",
- "required": false,
- "type": "style",
- "examples": [
- "'green'",
- "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"
- ],
- "description": "Sets the background color of the plot (i.e. the area laying inside this figure's axes."
- },
- "hovermode": {
- "val_types": "'closest' | 'x' | 'y'",
- "required": false,
- "type": "style",
- "description": "Sets this figure's behavior when a user hovers over it. When set to 'x', all data sharing the same 'x' coordinate will be shown on screen with corresponding trace labels. When set to 'y' all data sharing the same 'y' coordainte will be shown on the screen with corresponding trace labels. When set to 'closest', information about the data point closest to where the viewer is hovering will appear."
- },
- "dragmode": {
- "val_types": "'zoom' | 'pan'",
- "required": false,
- "type": "style",
- "description": "Sets this figure's behavior when a user preforms a mouse 'drag' in the plot area. When set to 'zoom', a portion of the plot will be highlighted, when the viewer exits the drag, this highlighted section will be zoomed in on. When set to 'pan', data in the plot will move along with the viewers dragging motions. A user can always depress the 'shift' key to access the whatever functionality has not been set as the default."
- },
- "separators": {
- "val_types": "a two-character string",
- "required": false,
- "type": "style",
- "description": "Sets the decimal (the first character) and thousands (the second character) separators to be displayed on this figure's tick labels and hover mode. This is meant for internationalization purposes. For example, if 'separator' is set to ', ', then decimals are separated by commas and thousands by spaces. One may have to set 'exponentformat' to 'none' in the corresponding axis object(s) to see the effects."
- },
- "barmode": {
- "val_types": "'stack' | 'group' | 'overlay'",
- "required": false,
- "type": "plot_info",
- "description": "For bar and histogram plots only. This sets how multiple bar objects are plotted together. In other words, this defines how bars at the same location appear on the plot. If set to 'stack' the bars are stacked on top of one another. If set to 'group', the bars are plotted next to one another, centered around the shared location. If set to 'overlay', the bars are simply plotted over one another, you may need to set the opacity to see this."
- },
- "bargap": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "For bar and histogram plots only. Sets the gap between bars (or sets of bars) at different locations."
- },
- "bargroupgap": {
- "val_types": "number: x >= 0",
- "required": false,
- "type": "style",
- "description": "For bar and histogram plots only. Sets the gap between bars in the same group. That is, when multiple bar objects are plotted and share the same locations, this sets the distance between bars at each location."
- },
- "boxmode": {
- "val_types": "'overlay' | 'group'",
- "required": false,
- "type": "plot_info",
- "description": "For box plots only. Sets how groups of box plots appear. If set to 'overlay', a group of boxes will be plotted directly on top of one another at their specified location. If set to 'group', the boxes will be centered around their shared location, but they will not overlap."
- },
- "radialaxis": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the radial axis in a polar plot."
- },
- "angularaxis": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object describing the angular axis in a polar plot."
- },
- "direction": {
- "val_types": "'clockwise' | 'counterclockwise'",
- "required": false,
- "type": "plot_info",
- "description": "For polar plots only. Sets the direction corresponding to positive angles."
- },
- "orientation": {
- "val_types": "number: x in [-360, 360]",
- "required": false,
- "type": "plot_info",
- "description": "For polar plots only. Rotates the entire polar by the given angle."
- },
- "hidesources": {
- "val_types": "boolean: True | False",
- "required": false,
- "type": "style",
- "description": "Toggle whether or not an annotation citing the data source is placed at the bottom-right corner of the figure.This key has an effect only on graphs that have been generated from forked graphs from plot.ly."
+ "margin": {
+ "name": "Margin",
+ "obj_type": "dictionary",
+ "parent_keys": [
+ "margin"
+ ],
+ "docstring": "A dictionary-like object containing specification of the margins.",
+ "examples": [],
+ "links": [
+ "https://plot.ly/python/setting-graph-size/"
+ ],
+ "keymeta": {
+ "l": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the left margin size in pixels."
+ },
+ "r": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the right margin size in pixels."
+ },
+ "b": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the bottom margin size in pixels."
+ },
+ "t": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the top margin size in pixels."
+ },
+ "pad": {
+ "key_type": "plot_info",
+ "val_types": "number: x >= 0",
+ "required": false,
+ "description": "Sets the distance between edge of the plot and the bounding rectangle that encloses the plot (in pixels)."
+ },
+ "autoexpand": {
+ "key_type": "plot_info",
+ "val_types": "a boolean: True | False",
+ "required": false,
+ "description": "more info coming soon"
+ }
}
},
"figure": {
- "data": {
- "val_types": "array-like of one or several dictionaries",
- "required": false,
- "type": "object",
- "description": "A list-like array of the data trace(s) that is/are to be visualized."
- },
- "layout": {
- "val_types": "dictionary-like",
- "required": false,
- "type": "object",
- "description": "A dictionary-like object that contains the layout parameters (e.g. information about the axis, global settings and layout information related to the rendering of the figure)."
+ "name": "Figure",
+ "obj_type": "dictionary",
+ "parent_keys": [],
+ "docstring": "A dictionary-like object representing a figure to be rendered by plotly. This is the container for all things to be rendered in a figure.",
+ "examples": [],
+ "links": [],
+ "keymeta": {
+ "data": {
+ "key_type": "object",
+ "val_types": "list-like object of one or several dictionary-like object",
+ "required": false,
+ "description": "A list-like object of one or multiple trace dictionary-like objects to be shown on one plotly figure."
+ },
+ "layout": {
+ "key_type": "object",
+ "val_types": "dictionary-like object",
+ "required": false,
+ "description": "A dictionary-like object that contains the layout parameters (e.g. information about the axis, global settings and layout information related to the rendering of the figure)."
+ }
}
},
- "data": {},
- "annotations": {},
- "trace": {
- "x": {
- "type": "data"
- },
- "y": {
- "type": "data"
- },
- "z": {
- "type": "data"
- },
- "r": {
- "type": "data"
- },
- "t": {
- "type": "data"
- },
- "text": {
- "type": "data"
- },
- "name": {
- "type": "data"
- },
- "mode": {
- "type": "plot_info"
- },
- "marker": {
- "type": "object"
- },
- "line": {
- "type": "object"
- },
- "fill": {
- "type": "style"
- },
- "fillcolor": {
- "type": "style"
- },
- "opacity": {
- "type": "style"
- },
- "showlegend": {
- "type": "style"
- },
- "xaxis": {
- "type": "plot_info"
- },
- "yaxis": {
- "type": "plot_info"
- },
- "angularaxis": {},
- "radialaxis": {},
- "error_y": {
- "type": "object"
- },
- "error_x": {
- "type": "object"
- },
- "textfont": {
- "type": "object"
- },
- "type": {
- "type": "plot_info"
- },
- "orientation": {
- "type": "plot_info"
- },
- "boxpoints": {
- "type": "style"
- },
- "jitter": {
- "type": "style"
- },
- "pointpos": {
- "type": "style"
- },
- "boxmean": {
- "type": "style"
- },
- "whiskerwidth": {
- "type": "style"
- },
- "scl": {
- "type": "style"
- },
- "reversescl": {
- "type": "style"
- },
- "colorbar": {
- "type": "object"
- },
- "autobinx": {
- "type": "style"
- },
- "autobiny": {
- "type": "style"
- },
- "xbins": {
- "type": "object"
- },
- "ybins": {
- "type": "object"
- },
- "histnorm": {
- "type": "plot_info"
- },
- "zmax": {
- "type": "plot_info"
- },
- "zmin": {
- "type": "plot_info"
- },
- "dx": {},
- "dy": {},
- "x0": {},
- "y0": {},
- "zauto": {
- "type": "plot_info"
- },
- "hm_id": {},
- "nbinsx": {
- "type": "style"
- },
- "nbinsy": {
- "type": "style"
- },
- "showscale": {
- "type": "style"
- }
+ "data": {
+ "name": "Data",
+ "obj_type": "list or 1d numpy array",
+ "parent_keys": [
+ "data"
+ ],
+ "docstring": "A list-like object of trace dictionary-like objects to be shown on one plotly figure.",
+ "examples": [
+ "Data([Bar(x=[1,2], y=[4,5]), Scatter(x=[1,2], y[2,3])])"
+ ],
+ "links": [],
+ "keymeta": {}
},
- "plotlylist": {},
- "plotlydict": {},
- "plotlytrace": {}
+ "annotations": {
+ "name": "Annotations",
+ "obj_type": "list or 1d numpy array",
+ "parent_keys": [
+ "annotations"
+ ],
+ "docstring": "A list-like object of annotation dictionary-like objects to be shown on one plotly figure.",
+ "examples": [
+ "Annotations([Annotation(x=0, y=1, text='look!'),\n Annotation(x=1, y=2, text='See the data at the URL below, showarrow=False),\n Annotation(x=10, y=20, text='this point is an outlier)])"
+ ],
+ "links": [],
+ "keymeta": {}
+ }
}
\ No newline at end of file
diff --git a/plotly/graph_reference/graph_objs_meta.py b/plotly/graph_reference/graph_objs_meta.py
deleted file mode 100644
index eeae63cb7be..00000000000
--- a/plotly/graph_reference/graph_objs_meta.py
+++ /dev/null
@@ -1,3256 +0,0 @@
-#
-# ----------------------- Plotly graph object meta ------------------------------
-#
-# Welcome to the ultimate reference of Plotly's JSON graph format.
-#
-# Refer to
-#
-# - ./README.md for philosophy and info about the repo
-# - ./graph_objs_meta-toc.md for the table contents
-#
-# -------------------------------------------------------------------------------
-
-
-## Required module(s)
-
-# Use ordered dictionaries to list graph object keys
-from collections import OrderedDict
-
-# -------------------------------------------------------------------------------
-
-
-## Shortcut definitions and inventories
-
-### @meta-shortcut@ - Shortcut of shortcuts
-
-# @output@
-# Format the keys' values into a dictionary
-def output(_required, _type, _val_types, _description, **kwargs):
- '''
- Outputs a dictionary of key-value pairs, given the keys.
- (pos. arg. 1) _required: value of 'required' key
- (pos. arg. 2) _type: value of 'type' key
- (pos. arg. 3) _val_types: value of 'val_types' key
- (pos. arg. 4) _description: value of 'description' key
- (keyword args) kwargs: dictionary of additional key-value pairs
- '''
- _dict = dict(
- required= _required,
- type= _type,
- val_types= _val_types,
- description= _description)
- if len(kwargs):
- for k, v in kwargs.iteritems():
- _dict[k] = v
- return _dict
-
-# @lS@
-# Format long strings ...
-
-# @api@ ...
-# for API specific meta
-
-### @val_types@ - Inventory of value types shortcuts
-
-# @val_types-number@
-# Use this to format key accepting numbers
-def _number(lt=None, le=None, gt=None, ge=None, list=False):
- if any((all((lt is not None, le is not None)),
- all((gt is not None, ge is not None)))):
- raise Exception("over-constrained number definition")
- if [lt, le, gt, ge] == [None, None, None, None]:
- out = "number"
- elif lt is not None and ([ge, gt] == [None, None]):
- out = "number: x < {lt}".format(lt=lt)
- elif le is not None and ([ge, gt] == [None, None]):
- out = "number: x <= {le}".format(le=le)
- elif gt is not None and ([le, lt] == [None, None]):
- out = "number: x > {gt}".format(gt=gt)
- elif ge is not None and ([le, lt] == [None, None]):
- out = "number: x >= {ge}".format(ge=ge)
- elif (lt is not None) and (gt is not None):
- out = "number: x in ({gt}, {lt})".format(gt=gt, lt=lt)
- elif (lt is not None) and (ge is not None):
- out = "number: x in [{ge}, {lt})".format(ge=ge, lt=lt)
- elif (le is not None) and (gt is not None):
- out = "number: x in ({gt}, {le}]".format(gt=gt, le=le)
- elif (le is not None) and (ge is not None):
- out = "number: x in [{ge}, {le}]".format(le=le, ge=ge)
- if list:
- return out+", or list of these numbers"
- else:
- return out
-
-# @val_types-dict@
-val_types = dict(
- bool="boolean: True | False",
- color="string describing color",
- string="string",
- number= _number,
- number_array="array-like of numbers",
- data_array="array-like of numbers, strings, datetimes",
- string_array="array-like of strings",
- color_array="array-like of string describing color",
- matrix="matrix-like: list of lists, numpy.matrix",
- object="dictionary-like",
- object_list="array-like of one or several dictionaries",
-)
-
-### @required_cond@ - Inventory of shortcuts for conditionally required keys
-
-# @required_cond-keys@
-# Use this for conditions involving keys
-def _required_keys(keys):
- if type(keys)==str:
- to_be = 'is'
- if all([type(keys)==list, len(keys)==1]):
- to_be = 'is'
- keys = keys[0]
- elif type(keys)==list:
- keys=','.join(keys[0:-1])+' and '+keys[-1]
- to_be = 'are'
- return " when {keys} {to_be} unset".format(keys=keys,to_be=to_be)
-
-# @required_cond-plottype@
-# Use this for conditions involving plot type
-def _required_plottype(plottype):
- return " when making a {plottype}".format(plottype=plottype)
-
-# @required_cond-dict@
-required_cond = dict(
- keys= _required_keys,
- plottype= _required_plottype
-)
-
-
-### @shortcuts@ - Inventory of meta generators for repeated keys
-
-#### @shortcuts-coordinates@
-
-# @x@
-def make_x(obj):
- _required=dict(
- scatter=required_cond['keys'](["'y'","'r'","'t'"]),
- bar=required_cond['keys'](["'y'"]),
- histogram=required_cond['keys'](["'y'"]),
- box=False,
- heatmap=False,
- contour=False,
- histogram2d=True,
- histogram2dcontour=True,
- )
- _type='data'
- _val_types=val_types['data_array']
- _description=dict(
- scatter="The x coordinates of the points of this scatter trace. "
- "If 'x' is linked to an list or array of strings, "
- "then the x coordinates are integers [0,1,2,3, ...] labeled "
- "on the x-axis by the list or array of strings linked to 'x'.",
- bar="The x coordinates of the bars. "
- "If 'x' is linked to an list or array of strings, "
- "then the x coordinates are integers [0,1,2,3, ...] labeled "
- "on the x-axis by the list or array of strings linked to 'x'. "
- "If 'y' is not set, the bars are plotted horizontally, "
- "with their length determined by the list or array linked to 'x'.",
- histogram="The data sample to be binned (done by Plotly) on the x-axis "
- "and plotted as vertical bars.",
- box="Usually, you do not need to set this value as "
- "plotly will handle box locations for you. However "
- "this allows you to have fine control over the "
- "location data for the box. Unlike making a bar, "
- "a box plot is made of many y values. Therefore, "
- "to give location data to the values you place in "
- "'y', the length of 'x' must equal the length of 'y'. "
- "when making multiple box plots, you can concatenate "
- "the data sets for each box into a single 'y' array. "
- "then, the entries in 'x' define which box plot each "
- "entry in 'y' belongs to. When making a single box "
- "plot, you must set each entry in 'x' to the same "
- "value, see 'x0' for a more practical way to handle "
- "this case. If you don't include 'x', the box will "
- "simply be assigned a location.",
- heatmap="This array-like value contains the horizontal coordinates "
- "referring to the columns of the 'z' matrix. "
- "if strings, the x-labels are spaced evenly. "
- "If the dimensions of z are (n x m), "
- "the length of the 'x' array should be 'm'.",
- histogram2d="The data sample to be binned on the x-axis and "
- "whose distribution (computed by Plotly) will correspond "
- "to the x-coordinates of this 2D histogram trace."
- )
- _description['contour']= _description['heatmap']
- _description['histogram2dcontour']= _description['histogram2d']
- _streamable=True
- if obj=='box': # TODO! Sub 'code' for example link?
- _code=''.join([">>> y0 = [1,2,3,1,1]",
- ">>> y1 = [3,2,1,2,3]",
- ">>> y = y0+y1 # N.B. list not numpy arrays here",
- ">>> x = [0,0,0,0,0,1,1,1,1,1] # len(x) == len(y)",
- ">>> Box(y=y, x=x, name='two boxes SHARE this name.')"
- ])
- return output(_required[obj],_type,_val_types,_description[obj],
- streamable=_streamable,code=_code)
- else:
- return output(_required[obj],_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @y@
-def make_y(obj):
- _required=dict(
- scatter=required_cond['keys'](["'x'","'r'","'t'"]),
- bar=required_cond['keys'](["'x'"]),
- histogram=required_cond['keys'](["'x'"]),
- box=True,
- heatmap=False,
- contour=False,
- histogram2d=True,
- histogram2dcontour=True,
- )
- _type='data'
- _val_types=val_types['data_array']
- _description=dict(
- scatter="The y coordinates of the points of this scatter trace. "
- "If 'y' is linked to an list or array of strings, "
- "then the y coordinates are integers [0,1,2,3, ...] labeled "
- "on the y-axis by the list or array of strings linked to 'y'.",
- histogram="The data sample to be binned (done by Plotly) on the y-axis "
- "and plotted as horizontal bars.",
- bar="The y coordinates of the bars. "
- "If 'y' is linked to an list or array of strings, "
- "then the y coordinates are integers [0,1,2,3, ...] labeled "
- "on the y-axis by the list or array of strings linked to 'y'. "
- "If 'x' is not set, the bars are plotted vertically, "
- "with their length determined by the list or array linked to 'y'.",
- box="This array is used to define an individual "
- "box plot, or, a concatenation of multiple box plots. "
- "Statistics from these numbers define the bounds of "
- "the box, the length of the whiskers, etc. For "
- "details on defining multiple boxes with locations "
- "see 'x'. Each box spans from the first quartile to the third. "
- "The second quartile is marked by a line inside the box. "
- "By default, the whiskers are correspond to box' edges +/- 1.5 times "
- "the interquartile range. See also 'boxpoints' for more info",
- heatmap="This array-like value contains the vertical coordinates "
- "referring to the rows of the 'z' matrix. "
- "If strings, the y-labels are spaced evenly. "
- "If the dimensions of z are (n x m), "
- "the length of the 'y' array should be 'n'.",
- histogram2d="The data sample to be binned on the y-axis and "
- "whose distribution (computed by Plotly) will correspond "
- "to the y-coordinates of this 2D histogram trace."
- )
- _description['contour']= _description['heatmap']
- _description['histogram2dcontour']= _description['histogram2d']
- _streamable=True
- return output(_required[obj],_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @z@
-def make_z(obj):
- _required=True
- _type='data'
- _val_types=val_types['matrix']
- _description=dict(
- heatmap="The data that describes the mapping. "
- "The dimensions of the 'z' matrix are (n x m) "
- "where there are 'n' ROWS defining the "
- "number of partitions along the y-axis; this is equal to the "
- "length of the 'y' array. "
- "There are 'm' COLUMNS defining the number "
- "of partitions along the x-axis; "
- "this is equal to the length of the 'x' array. "
- "Therefore, the color of the cell z[i][j] is mapped to "
- "the ith partition of the y-axis (starting from the bottom "
- "of the plot) and the jth partition of the x-axis "
- "(starting from the left of the plot). "
- "In Python, a (non-numpy) matrix is best thought of as "
- "a list of lists (of lists, of lists, etc.). "
- "Therefore, running len(z) will give you the number "
- "of ROWS and running len(z[0]) will give you "
- "the number of COLUMNS. If you ARE using numpy, then running "
- "z.shape will give you the tuple, (n, m), e.g., (3, 5)."
- )
- _description['contour']= _description['heatmap']
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @r@
-def make_r(obj):
- _required=dict(
- scatter=required_cond['plottype']("Polar Chart"),
- bar=required_cond['plottype']("Polar Chart"),
- area=True
- )
- _type='data'
- _val_types=val_types['number_array'] # Q? Should this support string too?
- _description=dict(
- scatter="For Polar charts only. "
- "The radial coordinates of the points in this "
- "polar scatter trace about the origin.",
- bar="For Polar charts only. "
- "The radial coordinates of the bars in this polar bar trace "
- "about the original; that is, the radial extent of each bar.",
- area="The radial coordinates of the circle sectors in this "
- "polar area trace about the origin; that is, the radial extent of "
- "each circle sector."
- )
- _streamable=True
- return output(_required[obj],_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @t@
-def make_t(obj):
- _required=dict(
- scatter=required_cond['plottype']("Polar Chart"),
- bar=required_cond['plottype']("Polar Chart"),
- area=True
- )
- _type='data'
- _val_types=val_types['data_array']
- _description=dict(
- scatter="For Polar charts only. "
- "The angular coordinates of the points in this "
- "polar scatter trace.",
- bar="For Polar charts only. "
- "The angular coordinates of the bars in this polar bar trace.",
- area="The angular coordinates of the circle sectors in this "
- "polar area trace. There are as many sectors as coordinates "
- "linked to 't' and 'r'. Each sector is drawn about the "
- "coordinates linked to 't', where they spanned symmetrically "
- "in both the positive and negative angular directions. "
- "The angular extent of each sector is equal to the angular range "
- "(360 degree by default) divided by the number of sectors. "
- "Note that the sectors are drawn in order; coordinates at the end "
- "of the array may overlay the coordinates at the start."
- )
- for k in _description.keys():
- _description[k]+=''.join([" By default, the angular coordinates "
- "are in degrees (0 to 360) where the angles "
- "are measured clockwise about the right-hand "
- "side of the origin. To change this "
- "behavior, modify 'range' in AngularAxis "
- "or/and 'direction' in Layout. "
- "If 't' is linked to an array-like of "
- "strings, then the angular coordinates are "
- "[0, 360\N, 2*360/N, ...] where N is the "
- "number of coordinates given labeled by the "
- "array-like of strings linked to 't'."
- ])
- _streamable=True
- return output(_required[obj],_type,_val_types,_description[obj],
- streamable=_streamable)
-
-#### @shortcuts-coordinates-alternative@
-
-# @x0y0@ | @x0@ | @y0@
-def make_x0y0(obj, x_or_y=False):
- _required=False
- _type='plot_info'
- _val_types=val_types['number']()
- S={'x':['x',], 'y':['y',], False:['',]}
- s=S[x_or_y]
- _description=dict( # TODO! Add scatter?
- box="The location of this box. When 'y' defines a single "
- "box, 'x0' can be used to set where this box is "
- "centered on the x-axis. If many boxes are set to "
- "appear at the same 'x0' location, they will form a "
- "box group.",
- heatmap="The location of the first coordinate of the {S0}-axis. "
- "Use with 'd{S0}' an alternative to an '{S0}' list/array. "
- "Has no effect if '{S0}' is set.".format(S0=s[0])
- )
- _description['contour']= _description['heatmap']
- return output(_required,_type,_val_types,_description[obj])
-
-# @dxdy@ | @dx@ | @dy@
-def make_dxdy(obj, x_or_y=False):
- _required=False
- _type='plot_info'
- _val_types=val_types['number']()
- S={'x':['x',], 'y':['y',], False:['',]}
- s=S[x_or_y]
- _description=dict( # TODO! Add scatter?
- heatmap="Spacing between {S0}-axis coordinates. "
- "Use with '{S0}0' an alternative to an '{S0}' list/array. "
- "Has no effect if '{S0}' is set.".format(S0=s[0]),
- )
- _description['contour']= _description['heatmap']
- return output(_required,_type,_val_types,_description[obj])
-
-# @xytype@ | @xtype@ | @ytype@
-def make_xytype(obj, x_or_y):
- _required=False
- _type='plot_info'
- _val_types="'array' | 'scaled'",
- S={'x':['x','horizontal'], 'y':['y','vertical'], False:['',]}
- s=S[x_or_y]
- _description=dict(
- heatmap="If set to 'scaled' and '{S0}' is linked to a list/array, "
- "then the {S1} labels are scaled to a list "
- "of integers of unit step "
- "starting from 0.".format(S0=s[0],S1=s[1])
- )
- _description['contour']= _description['heatmap']
- return output(_required,_type,_val_types,_description[obj])
-
-#### @shortcuts-trace-aux@
-
-# @text@
-def make_text(obj):
- _required=False
- _type='data'
- _val_types=val_types['string_array']
- _description=dict(
- scatter="The text elements associated with each (x,y) pair in "
- "this scatter trace. If the scatter 'mode' does not "
- "include 'text' then text elements will appear on hover only. "
- "In contrast, if 'text' is included in 'mode', "
- "the entries in 'text' "
- "will be rendered on the plot at the locations "
- "specified in part by their corresponding (x,y) coordinate pair "
- "and the 'textposition' key.",
- bar="The text elements associated with each bar in this trace. "
- "The entries in 'text' will appear on hover only, in a text "
- "box located at the top of each bar."
- )
- _description['histogram']=_description['bar']
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @error@ | @error_y@ | @error_x@
-def make_error(obj, x_or_y):
- _required=False
- _type='object'
- _val_types=val_types['object']
- S={'x':['horizontal','x'], 'y':['vetical','y']}
- s=S[x_or_y]
- _description=dict(
- scatter="A dictionary-like object describing "
- "the {S0} error bars (i.e. along the {S1}-axis) "
- "that can be drawn "
- "from the (x, y) coordinates.".format(S0=s[0],S1=s[1]),
- bar="A dictionary-like object describing the {S0} error bars "
- "(i.e. along the {S1}-axis) that can "
- "be drawn from bar tops.".format(S0=s[0],S1=s[1])
- )
- _description['histogram']= _description['bar']
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-#### @shortcuts-trace-style@
-
-# @orientation@
-def make_orientation(obj):
- _required=False
- _type='plot_info'
- _val_types="'v' | 'h'"
- _description=dict(
- bar="This defines the direction of the bars. "
- "If set to 'v', the length of each bar will run vertically. "
- "If set to 'h', the length of each bar will run horizontally",
- histogram="Web GUI Artifact. Histogram orientation is determined "
- "by which of 'x' or 'y' the data sample is linked to."
- )
- return output(_required,_type,_val_types,_description[obj])
-
-# @marker@
-def make_marker(obj):
- _required=False
- _type='object'
- _val_types=val_types['object']
- _description=dict(
- scatter="A dictionary-like object containing marker style "
- "parameters for this scatter trace. "
- "Has an effect only if 'mode' contains 'markers'.",
- bar="A dictionary-like object containing marker style "
- "parameters for this bar trace, for example, "
- "the bars' fill color, border width and border color.",
- box="A dictionary-like object containing marker style "
- "parameters for this the boxpoints of box trace. "
- "Has an effect only 'boxpoints' is set to 'outliers', "
- "'suspectedoutliers' or 'all'.",
- area="A dictionary-like object containing marker style "
- "of the area sectors of this trace, for example the sector fill "
- "color and sector boundary line width and sector boundary color."
- )
- _description['histogram']= _description['bar']
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @line@
-def make_line(obj):
- _required=False
- _type='object'
- _val_types=val_types['object']
- _description=dict(
- scatter="A dictionary-like object containing line style "
- "parameters for this scatter trace. "
- "Has an effect only if 'mode' contains 'lines'.",
- bar="Artifact. Has no effect.",
- box="A dictionary-like object containing line style "
- "parameters for the border of this box trace "
- "(including the whiskers).",
- contour="A dictionary-like object containing line style "
- "parameters for contour lines of this contour trace "
- "(including line width, dash, color and smoothing level). "
- "Has no an effect if 'showlines' is set to False in Contours.",
- marker="A dictionary-like object describing the line belonging to "
- "the marker. For example, the line around each point "
- "in a scatter trace or the line around each bar in a "
- "bar trace.",
- )
- _description['histogram']= _description['bar']
- _description['histogram2dcontour']= _description['contour']
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @opacity@
-def make_opacity(marker=False):
- _required=False
- _type="style"
- if not marker:
- _val_types=val_types['number'](ge=0, le=1)
- _description=''.join(["Sets the opacity, or transparency, ",
- "of the entire object, ",
- "also known as the alpha channel of colors. ",
- "If the object's color is given in terms of ",
- "'rgba' color ",
- "model, 'opacity' is redundant."
- ])
- else:
- _val_types=val_types['number'](ge=0, le=1, list=True)
- _description=''.join(["Sets the opacity, or transparency "
- "also known as the alpha channel of colors) "
- "of the marker points. "
- "If the marker points' "
- "color is given in terms of 'rgba' "
- "color model, this does not need to be defined. "
- "If 'opacity' is linked to a list or an array "
- "of numbers, opacity values are mapped to "
- "individual marker points in the "
- "same order as in the data lists or arrays."
- ])
- return output(_required,_type,_val_types,_description)
-
-# @textfont@
-def make_textfont(obj):
- _required=False
- _type='object'
- _val_types=val_types['object']
- _description=dict(
- scatter="A dictionary-like object describing the font style "
- "of this scatter trace's text elements. Has only "
- "an effect if 'mode' is set and includes 'text'.",
- bar="Not currently supported, has no effect."
- )
- _description['histogram']= _description['bar']
- return output(_required,_type,_val_types,_description[obj])
-
-# @font@
-def make_font(obj):
- _required=False
- _type='object'
- _val_types=val_types['object']
- _description=dict(
- legend="A dictionary-like object describing the font "
- "settings within the legend.",
- annotation="A dictionary-like object describing the font "
- "settings within this annotation.",
- layout="A dictionary-like object describing the global font "
- "settings for this figure (e.g. all axis titles and labels)."
- )
- return output(_required,_type,_val_types,_description[obj])
-
-#### @shortcuts-for-all-traces@
-
-# @name@
-drop_name=dict(
- required=False,
- type='data',
- val_types=val_types['string'],
- description="The label associated with this trace. "
- "This name will appear in the legend, on hover and "
- "in the column header in the online spreadsheet."
-)
-
-# @stream@
-drop_stream=dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="The stream dictionary-like object that initializes traces as "
- "writable-streams, for use with the real-time streaming "
- "API. Learn more here:\n"
- "https://plot.ly/python/streaming/"
-)
-
-# @visible@
-drop_visible=dict(
- required=False,
- type='plot_info',
- val_types=val_types['bool'],
- description="Toggles whether or not this object will actually be "
- "visible in the rendered figure."
-)
-
-#### @shortcuts-trace-and-layout@
-
-# @showlegend@
-def make_showlegend(trace=False, layout=False):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- if trace:
- _description=''.join(["Toggle whether or not this trace will be ",
- "labeled in the legend."
- ])
- elif layout:
- _description=''.join(["Toggle whether or not the legend will "
- "be shown in this figure."
- ])
- return output(_required,_type,_val_types,_description)
-
-# @axis@ | @xaxis@ | @yaxis@
-def make_axis(x_or_y, trace=False, layout=False):
- _required=False
- S={'x':['x','horizontal','X'], 'y':['y','vertical','Y']}
- s=S[x_or_y]
- if trace:
- _type='plot_info'
- _val_types="'{S0}1' | '{S0}2' | '{S0}3' | etc.".format(S0=s[0])
- _description=''.join(["This key determines which {S0}-axis ",
- "the {S0}-coordinates of this trace will ",
- "reference in the figure. Values '{S0}1' ",
- "and '{S0}' reference to layout['{S0}axis'], ",
- "'{S0}2' references layout['{S0}axis2'], and ",
- "so on. Note that '{S0}1' will always refer to ",
- "layout['{S0}axis'] or layout['{S0}axis1'], ",
- "they are the same."
- ]).format(S0=s[0])
- elif layout:
- _type='object'
- _val_types=val_types['object']
- _description=''.join(["A dictionary-like object describing an ",
- "{S0}-axis (i.e. an {S1} axis). ",
- "The first {S2}Axis object can be entered into "
- "layout by linking it to '{S0}axis' OR ",
- "'{S0}axis1', both keys are identical to Plotly. ",
- " To create references other {S0}-axes, ",
- "you need to define them in the layout ",
- "dictionary-like object using keys '{S0}axis2', ",
- "'{S0}axis3' and so on."
- ]).format(S0=s[0],S1=s[1],S2=s[2])
- return output(_required,_type,_val_types,_description)
-
-# @type@
-def make_type(trace):
- _required=False
- _type='plot_info'
- _val_types=trace
- _description=''.join(["Plotly identifier for this data's trace type. ",
- " This defines how this ",
- " data dictionary will be handled. ",
- " For example, 'scatter' type expects ",
- " x and y data-arrays corresponding to ",
- "(x, y) coordinates whereas a 'histogram' ",
- "only requires a single x or y array ",
- " and a 'heatmap' type requires a z matrix."
- ])
- return output(_required,_type,_val_types,_description)
-
-#### @shortcuts-histograms-specs@
-
-# @histnorm@
-drop_histnorm=dict(
- required=False,
- type='style',
- val_types="'' (or 'count') | 'percent' | 'probability' | 'density' | "
- "'probability density'",
- description="If histnorm is not specified, or histnorm='' ("
- "empty string), the height of each bar displays the "
- "frequency of occurrence, i.e., the number of times this "
- "value was found in the corresponding bin. If "
- "histnorm='percent', the height of each bar displays the "
- "percentage of total occurrences found within the "
- "corresponding bin. If histnorm='probability', the height "
- "of each bar displays the probability that an event will "
- "fall into the corresponding bin. If histnorm='density', "
- "the height of each bar is equal to the number of "
- "occurrences in a bin divided by the size of the bin "
- "interval such that summing the area of all bins will "
- "yield the total number of occurrences. If "
- "histnorm='probability density', the height of each bar "
- "is equal to the number of probability that an event will "
- "fall into the corresponding bin divided by the size of "
- "the bin interval such that summing the area of all bins "
- "will yield 1, i.e. an event must fall into one of the "
- "bins."
-)
-
-# @autobin@ | @autobinx@ | @autobiny@
-def make_autobin(x_or_y):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- S={'x':['x','X'], 'y':['y','Y']}
- s=S[x_or_y]
- _description=''.join(["Toggle whether or not the {S0}-axis bin parameters ",
- "are picked automatically by Plotly. ",
- "Once 'autobin{S0}' is set to False, the {S0}-axis ",
- "bins parameters can be declared ",
- "in the {S1}Bins object."
- ]).format(S0=s[0],S1=s[1])
- return output(_required,_type,_val_types,_description)
-
-# @nbins@ | @nbinsx@ | @nbinsy@
-def make_nbins(x_or_y):
- _required=False
- _type='style'
- _val_types=val_types['number'](gt=0)
- S={'x':['x',], 'y':['y',]}
- s=S[x_or_y]
- _description=''.join(["Specifies the number of {S0}-axis bins. ",
- "No need to set 'autobin{S0}' to False ",
- "for 'nbins{S0}' to apply."
- ]).format(S0=s[0])
- return output(_required,_type,_val_types,_description)
-
-# @bins@ | @xbins@ | @ybins@
-def make_bins(x_or_y):
- _required=False
- _type='object'
- _val_types=val_types['object']
- S={'x':['x',], 'y':['y',]}
- s=S[x_or_y]
- _description=''.join(["A dictionary-like object defining the parameters ",
- "of {S0}-axis bins of this trace, for example, ",
- "the bin width and the bins' starting and ",
- "ending value. Has an effect only if ",
- "'autobin{S0}'=False."
- ]).format(S0=s[0])
- return output(_required,_type,_val_types,_description)
-
-#### @shortcuts-2d-specs@
-
-# @colorbar@
-drop_colorbar=dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object defining the parameters of "
- "the color bar associated with this trace "
- "(including its title, length and width)."
-)
-
-# @colorscale@
-def make_colorscale(z_or_color):
- _required=False
- _type="style"
- _val_types=''.join(["array_like of value-color pairs | "
- "'Greys' | 'Greens' | 'Bluered' | 'Hot' | "
- "'Picnic' | 'Portland' | 'Jet' | 'RdBu' | 'Blackbody' | "
- "'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'"
- ])
- S={'c': ['color', 'c'], 'z': ['z', 'z']}
- s = S[z_or_color]
- _description=''.join(["Sets and/or defines the color scale for this trace. "
- "The string values are pre-defined color "
- "scales. For custom color scales, define a list of "
- "color-value pairs where, by default, the first "
- "element of the pair "
- "corresponds to a normalized value of {S0} from 0-1, "
- "i.e. ({S1}-{S1}min)/ ({S1}max-{S1}min), and the "
- "second element of pair corresponds to a color. "
- "Use with '{S1}auto', '{S1}min' and "
- "'{S1}max to fine-tune the map from '{S0}' to "
- "rendered colors."
- ]).format(S0=s[0],S1=s[1])
- _examples=["'Greys'",
- [[0, "rgb(0,0,0)"],
- [0.5, "rgb(65, 182, 196)"],
- [1, "rgb(255,255,255)"]]
- ]
- return output(_required,_type,_val_types,_description,
- examples=_examples)
-
-# @zcauto@ | @zauto@ | @cauto@
-def make_zcauto(z_or_c):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- _description=''.join(["Toggle whether or not the default values "
- "of '{}max' and '{}max' can be overwritten."
- ]).format(z_or_c, z_or_c)
- return output(_required,_type,_val_types,_description)
-
-
-# @zcminmax@ | @zmin@ | @zmax@ | @cmin@ | @cmax@
-def make_zcminmax(min_or_max, z_or_color):
- _required=False
- _type='style'
- _val_types=val_types['number']()
- S={'min': 'minimum', 'max': 'maximum'}
- s=S[min_or_max]
- _description=''.join(["Sets the {S0} '{z_or_color}' data value to be "
- "resolved by the color scale. "
- "Its default value is the {S0} of the "
- "'{z_or_color}' data values. "
- "This value will be used as the {S0} in the color scale "
- "normalization. For more info see 'colorscale'."
- ]).format(S0=s,z_or_color=z_or_color)
- if z_or_color=='color':
- _description += ''.join([" Has only an effect if 'color' is linked "
- "to an array-like and 'colorscale' is set."
- ])
- return output(_required,_type,_val_types,_description)
-
-# @reversescale@
-drop_reversescale=dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not the color scale will be reversed."
-)
-
-# @showscale@
-drop_showscale=dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not the color scale associated with "
- "this mapping will be shown alongside the figure."
-)
-
-#### @shortcuts-2d-specs-more
-
-# @zsmooth@ # TODO! Describe the 2 algorithms
-drop_zsmooth=dict(
- required=False,
- type='style',
- val_types=" False | 'best' | 'fast' ",
- description="Choose between algorithms ('best' or 'fast') "
- "to smooth data linked to 'z'. "
- "The default value is False "
- "corresponding to no smoothing."
-)
-
-# @autocontour@
-drop_autocontour=dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not the contour parameters are picked "
- "automatically by Plotly. "
- "If False, declare the contours parameters "
- "in the Contours object."
-)
-
-# @ncontours@
-drop_ncontours=dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=1),
- description="Specifies the number of contours lines "
- "in the contour plot. "
- "No need to set 'autocontour' to False for 'ncontours' "
- "to apply."
-)
-
-# @contours@
-drop_contours=dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object defining the parameters of "
- "the contours of this trace."
-)
-
-#### @shortcuts-color@
-
-# @examples-color@
-examples_color = ["'green'", "'rgb(0, 255, 0)'",
- "'rgba(0, 255, 0, 0.3)'",
- "'hsl(120,100%,50%)'",
- "'hsla(120,100%,50%,0.3)'"]
-
-# @color@
-def make_color(obj):
- _required=False
- _type='style' #Q? 'data' in bubble charts (i.e. if linked to array)
- if obj=='marker':
- _val_types=val_types['color_array'] #Q? Add "or 'data_array'"
- else:
- _val_types=val_types['color']
- _description=dict(
- marker="Sets the color of the face of the marker object. "
- "If 'color' is linked to a list or an array of color strings, "
- "color values are mapped to individual marker points "
- "in the same order as in the data lists or arrays. "
- "To set the color of the marker's bordering line, "
- "use the 'line' key in Marker. "
- "The 'color' key can also accept a list or an array of numbers, "
- "where each number is then mapped to a color using the "
- "color scale set in 'colorscale'.",
- line="Sets the color of the line object. "
- "If linked within 'marker', sets the color of the marker's "
- "bordering line. "
- "If linked within, 'contours', sets the color of the "
- "contour lines.",
- font="Sets the color of the font. "
- "If linked in the first level of the layout object, set the "
- "color of the global font.",
- error="Sets the color of the error bars."
- )
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable,examples=examples_color)
-
-# @fillcolor@
-def make_fillcolor(obj):
- _required=False
- _type='style'
- _val_types=val_types['color']
- _description=dict(
- scatter="Sets the color that will appear "
- "in the specified fill area (set in 'fill'). "
- "Has no effect if 'fill' is set to 'none'.",
- box="Sets the color of the box interior."
- )
- return output(_required,_type,_val_types,_description[obj],
- examples=examples_color)
-
-# @outlinecolor@
-def make_outlinecolor(obj):
- _required=False
- _type='style'
- _val_types=val_types['color']
- _description=dict(
- font="For polar chart only. Sets the color of the text's outline.",
- colorbar="The color of the outline surrounding this colorbar."
- )
- return output(_required,_type,_val_types,_description[obj],
- examples=examples_color)
-
-# @bgcolor@
-def make_bgcolor(obj):
- _required=False
- _type='style'
- _val_types=val_types['color']
- _description=dict(
- legend="Sets the background (bg) color for the legend.",
- colorbar="Sets the background (bg) color for this colorbar.",
- annotation="Sets the background (bg) color for this annotation."
- )
- return output(_required,_type,_val_types,_description[obj],
- examples=examples_color)
-
-# @bordercolor@
-def make_bordercolor(obj):
- _required=False
- _type='style'
- _val_types=val_types['color']
- _description=dict(
- legend="Sets the enclosing border color for the legend.",
- colorbar="Sets the color of the enclosing boarder of this colorbar.",
- annotation="The color of the enclosing boarder of this annotation."
- )
- return output(_required,_type,_val_types,_description[obj],
- examples=examples_color)
-
-#### @shortcuts-dimensions@
-
-# @size@
-def make_size(obj, x_or_y=False):
- _required=False
- _type='style' #Q? 'data' in bubble charts (i.e. if linked to array)
- if obj=='marker':
- _val_types=val_types['number'](gt=0,list=True)
- else:
- _val_types=val_types['number'](gt=0)
- S={'x': ['x',], 'y': ['y',], False:['',]}
- s=S[x_or_y]
- _description=dict(
- marker="Sets the size of the markers (in pixels). "
- "If 'size' is linked to a list or an array of numbers, "
- "size values are mapped to individual marker points "
- "in the same order as in the data lists or arrays. "
- "In this case, use 'size' in conjunction "
- "with 'sizeref' and 'sizemode' "
- "to fine-tune the map from the numbers linked to 'size' "
- "and the marker points' rendered sizes.",
- font="Sets the size of font. "
- "If linked in the first level of the layout object, set the "
- "color of the global font.",
- bins="Sets the size (i.e. their width) of each "
- "{S0}-axis bin.".format(S0=s[0]),
- contours="Sets the size of each contour level."
- )
- _streamable=True
- return output(_required,_type,_val_types,_description[obj],
- streamable=_streamable)
-
-# @startend@ | @start@ | @end@
-def make_startend(obj, start_or_end, x_or_y=False):
- _required=False
- _type='style'
- _val_types=val_types['number'](gt=0)
- S_se={'start':['first','starting'], 'end':['last','end']}
- s_se=S_se[start_or_end]
- S_xy={'x': ['x',], 'y': ['y',], False:['',]}
- s_xy=S_xy[x_or_y]
- _description=dict(
- bins="Sets the {S_se1} point on the {S_xy0}-axis for the {S_se0} "
- "bin.".format(S_se0=s_se[0],S_se1=s_se[1],S_xy0=s_xy[0]),
- contours="Sets the value of the {S_se0} "
- "contour level.".format(S_se0=s_se[0])
- )
- return output(_required,_type,_val_types,_description[obj])
-
-# @width@
-def make_width(obj):
- _required=False
- _type='style'
- _val_types=val_types['number'](ge=0)
- _description=dict(
- line="Sets the width (in pixels) of the line object.",
- error="Sets the width (in pixels) of the cross-bar at both ends of "
- "the error bars.",
- figure="The width in pixels of the figure you're creating."
- )
- return output(_required,_type,_val_types,_description[obj])
-
-# @thickness@
-def make_thickness(obj, x_or_y=False):
- _required=False
- _type='style'
- _val_types=val_types['number'](ge=0)
- S={'x': ['x',], 'y': ['y',], False:['',]}
- s=S[x_or_y]
- _description=dict(
- error="Sets the line thickness of the {S0} error bars.".format(S0=s[0]),
- colorbar="Sets the thickness of the line surrounding the colorbar."
- )
- return output(_required,_type,_val_types,_description[obj])
-
-# @borderwidth@
-def make_borderwidth(obj):
- _required=False
- _type='style'
- _val_types=val_types['number'](ge=0)
- _description=dict(
- legend="Sets the width of the border enclosing for the legend.",
- colorbar="Sets the width of the boarder enclosing this colorbar",
- annotation="Sets the width of the boarder enclosing this annotation"
- )
- return output(_required,_type,_val_types,_description[obj])
-
-
-#### @shortcuts-title@
-
-# @title@
-def make_title(obj, x_or_y=False):
- _required=False
- _type='plot_info'
- _val_types=val_types['string']
- _description=dict(
- axis="The {S}-axis title.".format(S=x_or_y),
- colorbar="The title of the colorbar.",
- layout="The title of the figure."
- )
- return output(_required,_type,_val_types,_description[obj])
-
-# @titlefont@
-def make_titlefont(obj, x_or_y=False):
- _required=False
- _type='object'
- _val_types=val_types['object']
- _description=dict(
- axis="A dictionary-like object describing the font "
- "settings of the {S}-axis title.".format(S=x_or_y),
- colorbar="A dictionary-like object describing the font "
- "settings of the colorbar title.",
- layout="A dictionary-like object describing the font "
- "settings of the figure's title.",
- )
- return output(_required,_type,_val_types,_description[obj])
-
-#### @shortcuts-axis-other
-
-# @range@
-def make_range(what_axis):
- _required=False
- _type='style'
- _val_types="number array of length 2"
- _description=''.join(["Defines the start and end point of "
- "this {S} axis."
- ]).format(S=what_axis)
- _examples=[[-13, 20], [0, 1]]
- if what_axis=='angular':
- _description += ''.join([" By default, 'range' is set to [0,360]. "
- "Has no effect if 't' is linked to "
- "an array-like of string."
- ])
- _examples=[[0, 180], [0, 6.2831]]
- return output(_required,_type,_val_types,_description,
- examples=_examples)
-
-# @domain@
-def make_domain(what_axis):
- _required=False
- _type='plot_info'
- _val_types="number array of length 2"
- _description=''.join(["Sets the domain of this {S} axis; "
- "that is, the available space "
- "for this {S} axis to live in. "
- "Domain coordinates are given in normalized "
- "coordinates with respect to the paper."
- ]).format(S=what_axis)
- if what_axis in ['radial','angular']:
- _description = ''.join(["Polar chart subplots are not supported yet. "
- "This key has currently no effect."
- ])
- return output(_required,_type,_val_types,_description)
- else:
- _examples=[[0,0.4], [0.6, 1]]
- return output(_required,_type,_val_types,_description,
- examples=_examples)
-
-# @showline@
-def make_showline(what_axis):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- _description=''.join(["Toggle whether or not the line bounding this "
- "{S} axis will "
- "be shown on the figure.".format(S=what_axis)
- ])
- if what_axis=='angular':
- _description += ''.join([" If 'showline' is set to True, "
- "the bounding line starts from the origin and "
- "extends to the edge of radial axis."
- ])
- return output(_required,_type,_val_types,_description)
-
-#### @shortcuts-ticks@
-
-# @autotick@
-def make_autotick(axis_or_colorbar):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- _description=''.join(["Toggle whether or not the {S} ticks parameters ",
- "are picked automatically by Plotly. ",
- "Once 'autotick' is set to False, ",
- "the {S} ticks parameters can be declared ",
- "with 'ticks', 'tick0', 'dtick0' and other ",
- "tick-related key in this {S} object.",
- ]).format(S=axis_or_colorbar)
- return output(_required,_type,_val_types,_description)
-
-# @nticks@
-def make_nticks(axis_or_colorbar):
- _required=False
- _type='style'
- _val_types=val_types['number'](gt=0)
- _description=''.join(["Specifies the number of {S} ticks. ",
- "No need to set 'autoticks' to False ",
- "for 'nticks' to apply."
- ]).format(S=axis_or_colorbar)
- return output(_required,_type,_val_types,_description)
-
-# @showticklabels@
-def make_showticklabels(what_ticks):
- _required=False
- _type='style'
- _val_types=val_types['bool']
- _description=''.join(["Toggle whether or not the {} ticks "
- "will feature tick labels."
- ]).format(what_ticks)
- return output(_required,_type,_val_types,_description)
-
-#### @shortcuts-refs-anchors@
-
-# @xyref@ | @xref@ | @yref@
-def make_xyref(x_or_y):
- _required=False
- _type='plot_info'
- S={'x': ['x','left','right'], 'y':['y','bottom','top']}
- s=S[x_or_y]
- _val_types="'paper' | '{S0}1' | '{S0}2' | etc".format(S0=s[0])
- _description=''.join(["Sets the {S0} coordinate for this object ",
- "refers to. If you reference an axis, e.g., ",
- "'{S0}2', the object will move with pan-and-zoom ",
- "to stay fixed to this point. If you reference ",
- "the 'paper', it remains fixed regardless of ",
- "pan-and-zoom. In other words, if set to 'paper', ",
- "the '{S0}' location refers to the distance from ",
- "the left side of the plotting area in normalized ",
- "coordinates where 0=='{S1}' and 1=='{S2}'. ",
- "If set to refer to an {S0}axis' object, e.g., ",
- "'{S0}1', '{S0}2', '{S0}3', etc., the ",
- "'{S0}' location will refer to the location in "
- "terms of this axis."
- ]).format(S0=s[0],S1=s[1],S2=s[2])
- return output(_required,_type,_val_types,_description)
-
-# @xyanchor@ | @xanchor@ | @yanchor@
-def make_xyanchor(x_or_y):
- _required=False
- _type='plot_info'
- _val_types={
- 'x':"'auto' | 'left' | 'center' | 'right'",
- 'y':"'auto' | 'bottom' | 'middle' | 'top'"
- }
- S={'x': ['x','left','right'], 'y':['y','bottom','top']}
- s=S[x_or_y]
- _description=''.join(["Sets the horizontal location of the object ",
- "referenced by the '{S0}' (position) key. ",
- "For example, if '{S0}'==1, ",
- "'{S0}ref'='paper', and '{S0}anchor'='{S2}', ",
- "the {S2}most portion of this object will line ",
- "up with the {S2}most edge of the plotting area.",
- ]).format(S0=s[0],S2=s[2])
- return output(_required,_type,_val_types[x_or_y],_description)
-
-#### @shortcuts-layout-position@
-
-# @xy_layout@ | @x_layout@ | @y_layout@
-def make_xy_layout(obj, x_or_y):
- _required=False
- _type='plot_info'
- _val_types=val_types['number']()
- _description=''.join(["Sets the '{x_or_y}' position of this {obj}. "
- ]).format(x_or_y=x_or_y, obj=obj)
- if obj in ['legend','annotation']:
- _description += ''.join(["Use in conjunction with '{x_or_y}ref' and "
- "'{x_or_y}anchor' to fine-tune the location of "
- "this {obj}."
- ]).format(x_or_y=x_or_y, obj=obj)
- return output(_required,_type,_val_types,_description)
-
-# -------------------------------------------------------------------------------
-
-
-## Graph Objects Meta
-
-# Initialize the list of meta for all graph objects
-META = []
-
-### @graph-objs-meta-trace@ - Meta of 'trace' graph objects (i.e. elements of data object)
-
-# @Scatter@
-META += [('scatter', OrderedDict([
-
- ('x', make_x('scatter')),
-
- ('y', make_y('scatter')),
-
- ('r', make_r('scatter')),
-
- ('t', make_t('scatter')),
-
- ('mode', dict(
- required=False,
- type='style',
- val_types="'lines' | 'markers' | 'text' | 'lines+markers' | "
- "'lines+text' | 'markers+text' | 'lines+markers+text'",
- description="Plotting mode (or style) for the scatter plot. If the "
- "mode includes 'text' then the 'text' will appear at "
- "the (x,y) points, otherwise it will appear on "
- "hover."
- )),
-
- ('name', drop_name),
-
- ('text', make_text('scatter')),
-
- ('error_y', make_error('scatter','y')),
-
- ('error_x', make_error('scatter','x')),
-
- ('marker', make_marker('scatter')),
-
- ('line', make_line('scatter')),
-
- ('textposition', dict(
- required=False,
- type='style',
- val_types="'top left' | 'top' (or 'top center')| 'top right' | "
- "'left' (or 'middle left') | '' (or 'middle center') |"
- "'right' (or 'middle right') |"
- "'bottom left' | 'bottom' (or 'bottom center') |"
- "'bottom right'",
- description="Sets the position of the text elements "
- "in the 'text' key with respect to the data points. "
- "By default, the text elements are plotted directly "
- "at the (x,y) coordinates."
- )),
-
- ('textfont', make_textfont('scatter')),
-
- ('connectgaps', dict(
- required=False,
- type='plot_info',
- val_types=val_types['bool'],
- description="Toggle whether or not missing data points "
- "(i.e. '' or NaNs) linked to 'x' and/or 'y', are "
- "added in by Plotly using linear interpolation."
- )),
-
- ('fill', dict(
- required=False,
- type='style',
- val_types="'none' | 'tozeroy' | 'tonexty' | 'tozerox' | 'tonextx",
- description="Use to make area-style charts. "
- "Determines which area to fill with a solid color."
- "By default, the area will appear in a more-transparent "
- "shape of the line color (or of the marker color if "
- "'mode' does not contains 'lines')."
- )),
-
- ('fillcolor', make_fillcolor('scatter')),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('scatter'))
-
-]))]
-
-# @Bar@
-META += [('bar', OrderedDict([
-
- ('x', make_x('bar')),
-
- ('y', make_y('bar')),
-
- ('name', drop_name),
-
- ('orientation', make_orientation('bar')),
-
- ('text', make_text('bar')),
-
- ('error_y', make_error('bar','y')),
-
- ('error_x', make_error('bar','x')),
-
- ('marker', make_marker('bar')),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('bar')),
-
- ('r', make_r('bar')), # ARTIFACT
-
- ('t', make_t('bar')), # ARTIFACT
-
- ('line', make_line('bar')), # ARTIFACT
-
- ('textfont', make_textfont('bar')) # ARTIFACT
-
-]))]
-
-# @Histogram@
-META += [('histogram', OrderedDict([
-
- ('x', make_x('histogram')),
-
- ('y', make_y('histogram')),
-
- ('histnorm', drop_histnorm),
-
- ('name', drop_name),
-
- ('autobinx', make_autobin('x')),
-
- ('nbinsx', make_nbins('x')),
-
- ('xbins', make_bins('x')),
-
- ('autobiny', make_autobin('y')),
-
- ('nbinsy', make_nbins('y')),
-
- ('ybins', make_bins('y')),
-
- ('text', make_text('histogram')),
-
- ('error_y', make_error('histogram','y')),
-
- ('error_x', make_error('histogram','x')),
-
- ('marker', make_marker('histogram')),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('histogram')),
-
- ('line', make_line('histogram')), # ARTIFACT
-
- ('orientation', make_orientation('histogram')) # ARTIFACT
-
-]))]
-
-# @Box@
-META += [('box', OrderedDict([
-
- ('y', make_y('box')),
-
- ('x0', make_x0y0('box')),
-
- ('x', make_x('box')),
-
- ('name', drop_name),
-
- ('boxmean', dict(
- required=False,
- type='style',
- val_types="False | True | 'sd'",
- description="Choose between add-on features for this box trace. "
- "If True then the mean of the data linked to 'y' is shown "
- "as a dashed line in the box. If 'sd', then the standard "
- "deviation is also shown. If False (the default), "
- "then no line shown."
- )),
-
- ('boxpoints', dict(
- required=False,
- type='style',
- val_types="'outliers' | 'all' | 'suspectedoutliers' | False",
- description="Choose between boxpoints options for this box trace. "
- "If 'outliers' (the default), then only the points lying "
- "outside the box' whiskers (more info in 'y') are shown. "
- "If 'all', then all data points linked 'y' are shown. "
- "If 'suspectedoutliers', then outliers points are shown and "
- "points either less than 4*Q1-3*Q3 or greater than "
- "4*Q3-3*Q1 are highlighted (with 'outliercolor' in Marker). "
- "If False, then only the boxes are shown and the whiskers "
- "correspond to the minimum and maximum value linked to 'y'."
- )),
-
- ('jitter', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0,le=1),
- description="Sets the width of the jitter in the boxpoints scatter "
- "in this trace. "
- "Has an no effect if 'boxpoints' is set to False. "
- "If 0, then the "
- "boxpoints are aligned vertically. If 1 then the "
- "boxpoints are placed in a random horizontal jitter of width "
- "equal to the width of the boxes."
- )),
-
- ('pointpos', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=-2, le=2),
- description="Sets the horizontal position of the boxpoints "
- "in relation to the boxes in this trace. "
- "Has an no effect if 'boxpoints' is set to False. "
- "If 0, then the boxpoints are placed over the center of "
- "each box. If 1 (-1), then the boxpoints are placed on the "
- "right (left) each box border. "
- "If 2 (-2), then the boxpoints are "
- "placed 1 one box width to right (left) of each box. "
- )),
-
- ('whiskerwidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0, le=1),
- description="Sets the width of the whisker of the box relative "
- "to the box' "
- "width (in normalized coordinates, e.g. if "
- "'whiskerwidth' set 1, then the whiskers are as wide "
- "as the box."
- )),
-
- ('fillcolor', make_fillcolor('box')),
-
- ('marker', make_marker('box')),
-
- ('line', make_line('box')),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('box'))
-
-]))]
-
-# @Heatmap@
-META += [('heatmap', OrderedDict([
-
- ('z', make_z('heatmap')),
-
- ('x', make_x('heatmap')),
-
- ('y', make_y('heatmap')),
-
- ('name', drop_name),
-
- ('zauto', make_zcauto('z')),
-
- ('zmin', make_zcminmax('min','z')),
-
- ('zmax', make_zcminmax('max','z')),
-
- ('colorscale', make_colorscale('z')),
-
- ('reversescale', drop_reversescale),
-
- ('showscale', drop_showscale),
-
- ('colorbar', drop_colorbar),
-
- ('zsmooth', drop_zsmooth),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('x0', make_x0y0('heatmap','x')),
-
- ('dx', make_dxdy('heatmap','x')),
-
- ('y0', make_x0y0('heatmap','y')),
-
- ('dy', make_dxdy('heatmap','y')),
-
- ('xtype', make_xytype('heatmap','x')),
-
- ('ytype', make_xytype('heatmap','y')),
-
- ('type', make_type('heatmap')),
-
-]))]
-
-# @Contour@
-META += [('contour', OrderedDict([
-
- ('z', make_z('contour')),
-
- ('x', make_x('contour')),
-
- ('y', make_y('contour')),
-
- ('name', drop_name),
-
- ('zauto', make_zcauto('z')),
-
- ('zmin', make_zcminmax('min','z')),
-
- ('zmax', make_zcminmax('max','z')),
-
- ('autocontour', drop_autocontour),
-
- ('ncontours', drop_ncontours),
-
- ('contours', drop_contours),
-
- ('line', make_line('contour')),
-
- ('colorscale', make_colorscale('z')),
-
- ('reversescale', drop_reversescale),
-
- ('showscale', drop_showscale),
-
- ('colorbar', drop_colorbar),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('x0', make_x0y0('heatmap','x')),
-
- ('dx', make_dxdy('heatmap','x')),
-
- ('y0', make_x0y0('heatmap','y')),
-
- ('dy', make_dxdy('heatmap','y')),
-
- ('xtype', make_xytype('heatmap','x')),
-
- ('ytype', make_xytype('heatmap','y')),
-
- ('type', make_type('contour')),
-
-]))]
-
-# @Histogram2d@
-META += [('histogram2d', OrderedDict([
-
- ('x', make_x('histogram2d')),
-
- ('y', make_y('histogram2d')),
-
- ('histnorm', drop_histnorm),
-
- ('name', drop_name),
-
- ('autobinx', make_autobin('x')),
-
- ('nbinsx', make_nbins('x')),
-
- ('xbins', make_bins('x')),
-
- ('autobiny', make_autobin('y')),
-
- ('nbinsy', make_nbins('y')),
-
- ('ybins', make_bins('y')),
-
- ('colorscale', make_colorscale('z')),
-
- ('reversescale', drop_reversescale),
-
- ('showscale', drop_showscale),
-
- ('colorbar', drop_colorbar),
-
- ('zauto', make_zcauto('z')),
-
- ('zmin', make_zcminmax('min','z')),
-
- ('zmax', make_zcminmax('max','z')),
-
- ('zsmooth', drop_zsmooth),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('histogram2d')),
-
-]))]
-
-# @Histogram2dContour@
-META += [('histogram2dcontour', OrderedDict([
-
- ('x', make_x('histogram2dcontour')),
-
- ('y', make_y('histogram2dcontour')),
-
- ('histnorm', drop_histnorm),
-
- ('name', drop_name),
-
- ('autobinx', make_autobin('x')),
-
- ('nbinsx', make_nbins('x')),
-
- ('xbins', make_bins('x')),
-
- ('autobiny', make_autobin('y')),
-
- ('nbinsy', make_nbins('y')),
-
- ('ybins', make_bins('y')),
-
- ('autocontour', drop_autocontour),
-
- ('ncontours', drop_ncontours),
-
- ('contours', drop_contours),
-
- ('line', make_line('histogram2dcontour')),
-
- ('colorscale', make_colorscale('z')),
-
- ('reversescale', drop_reversescale),
-
- ('showscale', drop_showscale),
-
- ('colorbar', drop_colorbar),
-
- ('zauto', make_zcauto('z')),
-
- ('zmin', make_zcminmax('min','z')),
-
- ('zmax', make_zcminmax('max','z')),
-
- ('opacity', make_opacity()),
-
- ('xaxis', make_axis('x',trace=True)),
-
- ('yaxis', make_axis('y',trace=True)),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('type', make_type('histogram2dcontour')),
-
-]))]
-
-# @Area@
-META += [('area', OrderedDict([
-
- ('r', make_r('area')),
-
- ('t', make_t('area')),
-
- ('name', drop_name),
-
- ('marker', make_marker('area')),
-
- ('showlegend', make_showlegend(trace=True)),
-
- ('stream', drop_stream),
-
- ('visible', drop_visible),
-
- ('angularaxis', dict( #Q? How do polar axes this work?
- required=False,
- type='plot_info',
- val_types='',
- description='Polar chart subplots are not supported yet. Info coming soon'
- )),
-
- ('radialaxis', dict( #Q? How do polar axes this work?
- required=False,
- type='plot_info',
- val_types='',
- description='Polar chart subplots are not supported yet. Info coming soon'
- )),
-
- ('type', make_type('area'))
-
-]))]
-
-### @graph-objs-meta-trace-aux@ - Meta of auxiliary trace graph objects (linked to trace graph object keys)
-
-#### @Error@ (META generation for ErrorY' and ErrorX')
-def meta_error(y_or_x):
-
- S={'y': ['y','vertically','up','down','above','below'],
- 'x': ['x','horizontally','right','left','right of','left of']}
- s=S[y_or_x]
-
- meta=[
-
- ('type', dict( # Different enough from shortcut
- required=False,
- type='plot_info',
- val_types="'data' | 'percent' | 'constant' | 'sqrt'",
- description=''.join(["Specify how the 'value' or 'array' key in ",
- "this error bar will be used to render the bars. ",
- "Using 'data' will set error bar lengths to the ",
- "actual numbers specified in 'array'. ",
- "Using 'percent' will set bar lengths to the ",
- "percent of error associated with 'value'. ",
- "Using 'constant' will set each error ",
- "bar length to the single value specified ",
- "in 'value'. Using 'sqrt' will set ",
- "each error bar length to the square root of ",
- "the x data at each point ('value' and 'array' ",
- "do not apply)."
- ]),
- )),
-
- ('symmetric', dict(
- required=False,
- type='plot_info',
- val_types=val_types['bool'],
- description="Toggle whether or not error bars are the same length "
- "in both directions ({S2} and {S3}). If not specified, "
- "the error bars will be "
- "symmetric.".format(S2=s[2],S3=s[3])
- )),
-
- ('array', dict(
- required=False,
- type='data',
- val_types=val_types['data_array'],
- description=''.join(["The array of corresponding to ",
- "error bars' span to be drawn. ",
- "Has only an effect if 'type' is set to ",
- "'data'. Values in the array are plotted ",
- "relative to the '{S0}' coordinates. ",
- "For example, with '{S0}'=[1,2] and ",
- "'array'=[1,2], the error bars will span ",
- "{S1} from {S0}= 0 to 2 and {S0}= 0 to 4 if ",
- "'symmetric'=True; and from {S0}= 1 to 2 and ",
- "{S0}= 2 to 4 if 'symmetric' is set to False ",
- "and 'arrayminus' is empty."
- ]).format(S0=s[0],S1=s[1])
- )),
-
- ('value', dict(
- required=False,
- type='plot_info',
- val_types=val_types['number'](ge=0),
- description="The value or percentage determining the error bars' "
- "span, at all trace coordinates. "
- "Has an effect if 'type' is set to 'value' or "
- "'percent'. "
- "If 'symmetric' is set to False, this value corresponds "
- "to the span {S4} the trace of coordinates. "
- "To specify multiple error bar lengths, "
- "you should set 'type' to 'data' and "
- "use the 'array' key instead.".format(S4=s[4])
- )),
-
- ('arrayminus', dict(
- required=False,
- type='data',
- val_types=val_types['number'](ge=0),
- description="Only functional when 'symmetric' is set to False. "
- "Same as 'array' but corresponding to the span "
- "of the error bars {S5} "
- "the trace coordinates".format(S5=s[5])
- )),
-
- ('valueminus', dict(
- required=False,
- type='plot_info',
- val_types=val_types['number'](ge=0),
- description=''.join(["Only functional when 'symmetric' ",
- "is set to False. ",
- "Same as 'value' but corresponding ",
- "to the span ",
- "of the error bars {S5} ",
- "the trace coordinates"]).format(S5=s[5])
- )),
-
- ('color', make_color('error')),
-
- ('thickness', make_thickness('error',y_or_x)),
-
- ('width', make_width('error')),
-
- ('opacity', make_opacity()),
-
- ]
-
- if y_or_x=='x':
- meta += [
- ('copy_ystyle', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description=''.join(["Toggle whether to set x error bar ",
- "style to the same style ",
- "(color, thickness, width, opacity) ",
- "as y error bars set in YAxis."
- ])
- ))]
-
- meta+=[
-
- ('visible', drop_visible),
-
- ]
-
- return [('error_{}'.format(y_or_x), OrderedDict(meta))]
-
-# @ErrorY
-META += meta_error('y')
-
-# @ErrorX
-META += meta_error('x')
-
-#### @Bins@ (META generation for 'XBins' and 'YBins')
-def meta_bins(x_or_y):
-
- meta=[
-
- ('start', make_startend('bins','start',x_or_y)),
-
- ('end', make_startend('bins','end',x_or_y)),
-
- ('size', make_size('bins',x_or_y)),
-
- ]
-
- return [('{}bins'.format(x_or_y), OrderedDict(meta))]
-
-# @XBins@
-META += meta_bins('x')
-
-# @YBins
-META += meta_bins('y')
-
-# @Contours@
-META += [('contours', OrderedDict([
-
- ('showlines', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not the contour lines appear on the "
- "plot."
- )),
-
- ('start', make_startend('contours','start','x')),
-
- ('end', make_startend('contours','end','x')),
-
- ('size', make_size('contours')),
-
- ('coloring', dict(
- required=False,
- type='style',
- val_types=" 'fill' | 'heatmap' | 'lines' | 'none' ",
- description="Choose the coloring method for this contour trace. "
- "The default value is 'fill' "
- "where coloring is done evenly between each contour line. "
- "'heatmap' colors on a grid point-by-grid point basis. "
- "'lines' colors only the contour lines, each with "
- "respect to the color scale. "
- "'none' prints all contour lines with the same color; "
- "choose their color in a Line object at the trace level "
- "if desired."
- ))
-
-]))]
-
-# @Stream@
-META += [('stream', OrderedDict([
-
- ('token', dict( #Q? These are public!! Is that OK?
- required=True,
- type='plot_info',
- val_types="A stream id number, see https://plot.ly/settings",
- description="This number links a data object on a plot with a "
- "stream. In other words, any data object you create "
- "can reference a 'stream'. If you stream data to "
- "Plotly with the same stream id (token), Plotly knows "
- "update this data object with the incoming data "
- "stream."
- )),
-
- ('maxpoints', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the maximum number of points to keep on the "
- "plots from an incoming stream. For example, "
- "if 'maxpoints' is set to 50, only the newest 50 points "
- "will be displayed on the plot."
- ))
-
-]))]
-
-### @graph-objs-meta-style@ - Meta of graph objects corresponding to style features
-
-# @Marker@
-META += [('marker', OrderedDict([
-
- ('color', make_color('marker')),
-
- ('size', make_size('marker')),
-
- ('symbol', dict(
- required=False,
- type='style',
- val_types="'dot' | 'cross' | 'diamond' | 'square' "
- "| 'triangle-down' | 'triangle-left' | 'triangle-right' "
- "| 'triangle-up' | 'x' OR list of these string values",
- description="The symbol that is drawn on the plot for each marker. "
- "Supported only in scatter traces. "
- "If 'symbol' is linked to a list or an array of numbers, "
- "symbol values are mapped to individual marker points "
- "in the same order as in the data lists or arrays."
- )),
-
- ('line', make_line('marker')),
-
- ('opacity', make_opacity(marker=True)),
-
- ('sizeref', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the scale factor used to determine the rendered size "
- "of each marker point in this trace. "
- "Applies only to scatter traces that have an array linked "
- "to the 'size' key in Marker. "
- "If set, the value linked to 'sizeref' is used to divide "
- "each entry linked to 'size'. That is, setting 'sizeref' to "
- "less (greater) than 1, increases (decreases) the "
- "rendered marker sizes."
- )),
-
- ('sizemode', dict(
- required=False,
- type='style',
- val_types="'diameter'| 'area'",
- description="Choose between marker size scaling options for the marker "
- "points in this trace. "
- "Applies only to scatter traces that have an array linked "
- "to the 'size' key in Marker. "
- "If 'diameter' ('area'), then the diameter (area) of the "
- "rendered marker points (in pixels) are "
- "proportional to the numbers linked to 'size'."
- "E.g. set 'sizemode' to 'area' for a more a smaller "
- "range of rendered marker sizes."
- )),
-
- ('colorscale', make_colorscale('c')),
-
- ('cauto', make_zcauto('c')),
-
- ('cmin', make_zcminmax('min','color')),
-
- ('cmax', make_zcminmax('max','color')),
-
- ('outliercolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="For box plots only. Has an effect only if 'boxpoints' is "
- "set to 'suspectedoutliers'. Sets the face color of the "
- "outlier points.",
- examples=examples_color
- )),
-
- ('maxdisplayed', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets maximum number of displayed points for this "
- "trace. Applies only to scatter traces."
- ))
-
-]))]
-
-# @Line@
-META += [('line', OrderedDict([
-
- ('color', make_color('line')),
-
- ('width', make_width('line')),
-
- ('dash', dict(
- required=False,
- type='style',
- val_types="'dash' | 'dashdot' | 'dot' | 'solid'",
- description="Sets the drawing style of this line object."
- )),
-
- ('opacity', make_opacity()),
-
- ('shape', dict(
- required=False,
- type='style',
- val_types="'linear' | 'spline' | 'hv' | 'vh' | 'hvh' | 'vhv'",
- description="Choose the line shape between each coordinate pair "
- "in this trace. "
- "Applies only to scatter traces. "
- "The default value is 'linear'. "
- "If 'spline', then the lines are drawn using spline "
- "interpolation between the coordinate pairs. "
- "The remaining available values correspond to "
- "step-wise line shapes, see example in: "
- "https://plot.ly/~alex/315 ."
- )),
-
- ('smoothing', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the amount of smoothing applied to this line object. "
- "Applies only to contour traces "
- "and scatter traces if 'shape' is set to 'spline'. "
- "The default value is 1. If 'smoothing' is set to 0, then "
- "no smoothing is applied. "
- "Set 'smoothing' to a value less "
- "(greater) than 1 for a less (more) pronounced line "
- "smoothing. "
- )),
-
- ('outliercolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="For box plots only. Has an effect only if 'boxpoints' is "
- "set to 'suspectedoutliers'. Sets the color of the "
- "bordering line of the outlier points.",
- examples=examples_color
- )),
-
- ('outlierwidth', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="For box plots only. Has an effect only if 'boxpoints' is "
- "set to 'suspectedoutliers'. Sets the width in pixels of "
- "bordering line of the outlier points.",
- examples=examples_color
- ))
-
-]))]
-
-# @Font@
-META += [('font', OrderedDict([
-
- ('family', dict(
- required=False,
- val_types=" 'Arial, sans-serif' | "
- " 'Balto, sans-serif' | "
- " 'Courier New, monospace' | "
- " 'Droid Sans, sans-serif' | "
- " 'Droid Serif, serif' | "
- " 'Droid Sans Mono, sans-serif' | "
- " 'Georgia, serif' | "
- " 'Gravitas One, cursive' | "
- " 'Old Standard TT, serif' | "
- " 'Open Sans, sans-serif' or ('') | "
- " 'PT Sans Narrow, sans-serif' | "
- " 'Raleway, sans-serif' | "
- " 'Times New Roman, Times, serif'",
- type='style',
- description="Sets the font family. "
- "If linked in the first level of the layout object, "
- "set the color of the global font. "
- "The default font in Plotly is 'Open Sans, sans-serif'."
- )),
-
- ('size', make_size('font')),
-
- ('color', make_color('font')),
-
- ('outlinecolor', make_outlinecolor('font')),
-
-]))]
-
-
-### @graph-objs-meta-layout-axis@ - Axis trace objects linked inside layout object
-
-#### @Ticks@ - (META generation for ticks in XAxis, YAXis and ColorBar)
-def meta_ticks(axis_or_colorbar):
-
- meta= [
-
- ('ticks', dict(
- required=False,
- type='style',
- val_types="'' | 'inside' | 'outside'",
- description="Sets the format of tick visibility "
- "on this {}.".format(axis_or_colorbar)
- )),
-
- ('showticklabels', make_showticklabels(axis_or_colorbar)),
-
- ('tick0', dict(
- required=False,
- type='style',
- val_types=val_types['number'](),
- description="Sets the starting point of the ticks "
- "of this {}.".format(axis_or_colorbar)
- )),
-
- ('dtick', dict(
- required=False,
- type='style',
- val_types=val_types['number'](),
- description="Sets the distance between ticks "
- "on this {}.".format(axis_or_colorbar)
- )),
-
- ('ticklen', dict(
- required=False,
- type='style',
- val_types=val_types['number'](), # Units?
- description="Sets the length of the tick lines "
- "on this {}.".format(axis_or_colorbar)
- )),
-
- ('tickwidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the width of the tick lines "
- "on this {}.".format(axis_or_colorbar)
- )),
-
- ('tickcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of the tick lines "
- "on this {}.".format(axis_or_colorbar),
- examples=examples_color
- )),
-
- ('tickangle', dict(
- required=False,
- type='style',
- val_types=val_types['number'](le=90, ge=-90),
- description="Sets the angle in degrees of the ticks "
- "on this {}.".format(axis_or_colorbar)
- )),
-
- ('tickfont', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object defining the parameters "
- "of the ticks' font."
- )),
-
- ('exponentformat', dict(
- required=False,
- type='style',
- val_types="'none' | 'e' | 'E' | 'power' | 'SI' | 'B'",
- description="Sets how exponents show up. Here's how the number "
- "1000000000 (1 billion) shows up in each. If set to "
- "'none': 1,000,000,000. If set to 'e': 1e+9. If set "
- "to 'E': 1E+9. If set to 'power': 1x10^9 (where the 9 "
- "will appear super-scripted). If set to 'SI': 1G. If "
- "set to 'B': 1B (useful when referring to currency)."
- )),
-
- ('showexponent', dict(
- required=False,
- type='style',
- val_types="'all' | 'first' | 'last' | 'none'",
- description="If set to 'all', ALL exponents will be shown "
- "appended to their significands. If set to 'first', "
- "the first tick's exponent will be appended to its "
- "significand, however no other exponents will "
- "appear--only the significands. If set to 'last', "
- "the last tick's exponent will be appended to its "
- "significand, however no other exponents will "
- "appear--only the significands. If set to 'none', "
- "no exponents will appear, only the significands."
- ))
-
- ]
-
- return meta
-
-#### @Axis@ (META generation for 'xaxis' and 'yaxis')
-def meta_axis(x_or_y):
-
- S={'x':['x','bottom','top','y','left','right','vertical'],
- 'y':['y','left','right','x','bottom','top','horizontal']}
- s=S[x_or_y]
-
- meta=[
-
- ('title', make_title('axis',x_or_y)),
-
- ('titlefont', make_titlefont('axis',x_or_y)),
-
- ('range', make_range(x_or_y)),
-
- ('domain', make_domain(x_or_y)),
-
- ('type', dict( # Different enough from shortcut
- required=False,
- type='style',
- val_types="'linear' | 'log' | 'date' | 'category'",
- description="Sets the format of this axis." # TODO! Add info
- )),
-
- ('rangemode', dict(
- required=False,
- type='style',
- val_types="'normal' | 'tozero' | 'nonnegative'",
- description="Choose between Plotly's automated axis generation "
- "modes: 'normal' (the default) sets the axis range "
- "in relation to the extrema in the data object, "
- "'tozero' extends the axes to {S0}=0 no matter "
- "the data plotted and 'nonnegative' sets a "
- "non-negative range no matter the "
- "data plotted.".format(S0=s[0])
- )),
-
- ('autorange', dict(
- required=False,
- type='style',
- val_types="True | False | 'reversed'",
- description="Toggle whether or not the range of this {S0}-axis is "
- "automatically picked by Plotly. "
- "If 'range' is set, then 'autorange' is set "
- "to False automatically. Otherwise, if 'autorange' "
- "is set to True (the default behavior), the range "
- "of this {S0}-axis can respond to adjustments made in "
- "the web GUI automatically. If 'autorange' is set "
- "to 'reversed', then this {S0}-axis is drawn in reverse "
- "i.e. from {S5} to {S4} instead of from {S4} to {S5} "
- "(the default behavior).".format(S0=s[0],S4=s[4],S5=s[5])
- )),
-
- ('showgrid', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not this axis features "
- "grid lines."
- )),
-
- ('zeroline', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not an additional grid line "
- "(thicker than the other grid lines, by default) "
- "will appear on this axis along {}=0.".format(x_or_y)
- )),
-
- ('showline', make_showline(x_or_y)),
-
- ('autotick', make_autotick('axis')),
-
- ('nticks', make_nticks('axis')),
-
- ]
-
- meta += meta_ticks('axis')
-
- meta+=[
-
- ('mirror', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether to mirror the axis line to the "
- "opposite side of the plot."
- )),
-
- ('gridcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the axis grid color.",
- examples=examples_color
- )),
-
- ('gridwidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the grid width (in pixels)."
- )),
-
- ('zerolinecolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of this axis' zeroline.",
- examples=examples_color
- )),
-
- ('zerolinewidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the width of this axis' zeroline (in pixels)."
- )),
-
- ('linecolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the axis line color.",
- examples=examples_color
- )),
-
- ('linewidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the width of the axis line (in pixels)."
- )),
-
- ('anchor', dict(
- required=False,
- type='plot_info',
- val_types="'{S3}' | '{S3}1' | '{S3}2' | ... | 'free'".format(S3=s[3]),
- description="Choose whether the position of this {S0}-axis "
- "will be anchored to a "
- "corresponding {S3}-axis or will be 'free' to appear "
- "anywhere in the {S6} space of "
- "this figure.".format(S0=s[0],S3=s[3],S6=s[6])
- )),
-
- ('overlaying', dict(
- required=False,
- type='plot_info',
- val_types="'{S0}' | '{S0}1' | '{S0}2' | ... | False".format(S0=s[0]),
- description="Choose to overlay the data bound to this {S0}-axis "
- "on the same plotting area as a "
- "corresponding {S3}-axis or choose not overlay other {S0}-"
- "the other axis/axes of this "
- "figure.".format(S0=s[0],S3=s[3],S6=s[6])
- )),
-
- ('side', dict(
- required=False,
- type='plot_info',
- val_types="'{S1}' | '{S2}'".format(S1=s[1],S2=s[2]),
- description="Sets whether this {S0}-axis sits at the '{S1}' of the "
- "plot or at the '{S2}' "
- "of the plot.".format(S0=s[0],S1=s[1],S2=s[2])
- )),
-
- ('position', dict(
- required=False,
- type='style',
- val_types=val_types['number'](le=1, ge=0),
- description="Sets where this {S0}-axis is positioned in the plotting "
- "space. For example 'position'=0.5 will place this "
- "axis in the exact center of the plotting space. Has "
- "an effect only if 'anchor' "
- "is set to 'free'.".format(S0=s[0])
- ))
-
- ]
-
- return [('{}axis'.format(x_or_y), OrderedDict(meta))]
-
-# @YAxis@
-META += meta_axis('x')
-
-# @YAxis@
-META += meta_axis('y')
-
-# @RadialAxis@
-META += [('radialaxis', OrderedDict([
-
- ('range', make_range('radial')),
-
- ('domain', make_domain('radial')),
-
- ('orientation', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=-360,le=360),
- description="Sets the orientation (an angle with respect to the origin) "
- "of the radial axis."
- )),
-
- ('showline', make_showline('radial')),
-
- ('showticklabels', make_showticklabels('radial axis')),
-
- ('tickorientation', dict(
- required=False,
- type='style',
- val_types="'horizontal' | 'vertical'",
- description="Choose the orientation (from the paper perspective) "
- "of the radial axis tick labels."
- )),
-
- ('ticklen', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the length of the tick lines "
- "on this radial axis."
- )),
-
- ('tickcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of the tick lines "
- "on this radial axis.",
- examples=examples_color
- )),
-
- ('ticksuffix', dict(
- required=False,
- type='style',
- val_types=val_types['string'],
- description="Sets the length of the tick lines "
- "on this radial axis."
- )),
-
- ('endpadding', dict(
- required=False,
- type='style',
- val_types=val_types['number'](),
- description="more info coming soon"
- )),
-
- ('visible', drop_visible)
-
-]))]
-
-# @AngularAxis@
-META += [('angularaxis', OrderedDict([
-
- ('range', make_range('angular')),
-
- ('domain', make_domain('angular')), #Q? Does not apply, right?
-
- ('showline', make_showline('angular')), #Q? Should be 'gridline'
-
- ('showticklabels', make_showticklabels('angular axis')),
-
- ('tickorientation', dict(
- required=False,
- type='style',
- val_types="'horizontal' | 'vertical'",
- description="Choose the orientation (from the paper's perspective) "
- "of the radial axis tick labels."
- )),
-
- ('tickcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of the tick lines "
- "on this angular axis.",
- examples=examples_color
- )),
-
- ('ticksuffix', dict(
- required=False,
- type='style',
- val_types=val_types['string'],
- description="Sets the length of the tick lines "
- "on this angular axis."
- )),
-
- ('endpadding', dict( # What does this do?
- required=False,
- type='style',
- val_types=val_types['number'](),
- description="more info coming soon"
- )),
-
- ('visible', drop_visible)
-
-]))]
-
-
-### @graph-objs-meta-layout-aux - Other graph object linked inside layout object
-
-# @Legend@
-META += [('legend', OrderedDict([
-
- ('x', make_xy_layout('legend', 'x')),
-
- ('y', make_xy_layout('legend', 'y')),
-
- ('traceorder', dict(
- required=False,
- type='style',
- val_types="'normal' | 'reversed'",
- description="Trace order is set by the order of the data in "
- "associated grid for the plot. This sets whether this "
- "order is read from left-to-right or from "
- "right-to-left.")),
-
- ('font', make_font('legend')),
-
- ('bgcolor', make_bgcolor('legend')),
-
- ('bordercolor', make_bordercolor('legend')),
-
- ('borderwidth', make_borderwidth('legend')),
-
- ('xref', make_xyref('x')),
-
- ('yref', make_xyref('y')),
-
- ('xanchor', make_xyanchor('x')),
-
- ('yanchor', make_xyanchor('y')),
-
-]))]
-
-# @ColorBar@
-meta=[
-
- ('title', make_title('colorbar')),
-
- ('titleside', dict(
- required=False,
- type='style',
- val_types="'right' | 'top' | 'bottom'",
- description="Location of colorbar title with respect "
- "to the colorbar."
- )),
-
- ('titlefont', make_titlefont('colorbar')),
-
- ('thickness', make_thickness('colorbar')),
-
- ('thicknessmode', dict(
- required=False,
- type='style',
- val_types="string: 'pixels' | 'fraction' ",
- description="Sets thickness unit mode."
- )),
-
- ('len', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the length of the colorbar."
- )),
-
- ('lenmode', dict(
- required=False,
- type='style',
- val_types="string: 'pixels' | 'fraction' ",
- description="Sets length unit mode."
- )),
-
- ('x', make_xy_layout('colorbar','x')),
-
- ('y', make_xy_layout('colorbar','y')),
-
- ('autotick', make_autotick('colorbar')),
-
- ('nticks', make_nticks('colorbar'))
-
- ]
-
-meta+=meta_ticks('colorbar')
-
-meta+=[
-
- ('xanchor', make_xyanchor('x')),
-
- ('xanchor', make_xyanchor('y')),
-
- ('bgcolor', make_bgcolor('colorbar')),
-
- ('outlinecolor', make_outlinecolor('colorbar')),
-
- ('outlinewidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](),
- description="Sets the width of the outline surrounding this colorbar."
- )),
-
- ('borderwidth', make_borderwidth('colorbar')),
-
- ('xpad', dict(
- required=False,
- type='style',
- val_types=val_types['number'](le=50, ge=0),
- description="Sets the amount of space (padding) between the colorbar and "
- "the enclosing boarder in the x-direction."
- )),
-
- ('ypad', dict(
- required=False,
- type='style',
- val_types=val_types['number'](le=50, ge=0),
- description="Sets the amount of space (padding) between the colorbar and "
- "the enclosing boarder in the y-direction."
- ))
-
-]
-
-META += [('colorbar', OrderedDict(meta))]
-
-# @Margin@
-META += [('margin', OrderedDict([
-
- ('l', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the left margin size in pixels."
- )),
-
- ('r', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the right margin size in pixels."
- )),
-
- ('b', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the bottom margin size in pixels."
- )),
-
- ('t', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the top margin size in pixels."
- )),
-
- ('pad', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Sets the distance between edge of the plot and the "
- "bounding rectangle that encloses the plot "
- "(in pixels)."
- )),
-
- ('autoexpand', dict( # TODO: ??
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="more info coming soon"
- ))
-
-]))]
-
-# @Annotation@
-META += [('annotation', OrderedDict([
-
- ('x', make_xy_layout('annotation','x')),
-
- ('y', make_xy_layout('annotation','y')),
-
- ('xref', make_xyref('x')),
-
- ('yref', make_xyref('y')),
-
- ('text', dict( # Different enough from shortcut-text
- required=False,
- type='plot_info',
- val_types=val_types['string'],
- description="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.",
- examples=["regular text",
- "an annotation
spanning two lines",
- "bold text",
- "a link to plot.ly"
- ]
- )),
-
- ('showarrow', dict(
- required=False,
- type='plot_info',
- val_types=val_types['bool'],
- description="Toggle whether or not the arrow associated with "
- "this annotation with be shown. "
- "If False, then the text linked to 'text' lines up with "
- "the 'x', 'y' coordinates'. If True (the default), then "
- "'text' is placed near the arrow's tail."
- )),
-
- ('font', make_font('annotation')),
-
- ('xanchor', make_xyanchor('x')),
-
- ('yanchor', make_xyanchor('y')),
-
- ('align', dict(
- required=False,
- type='plot_info',
- val_types="'left' | 'center' | 'right'",
- description="Sets the vertical alignment of the text in the "
- "annotation with respect to the set 'x', 'y' position. "
- "Has only an effect if the text linked to "
- "'text' spans more two or more lines "
- "(using
HTML one or more tags)."
- )),
-
- ('arrowhead', dict(
- required=False,
- type='style',
- val_types='0 | 1 | 2 | 3 | 4 | 5 | 6 | 7',
- description="Sets the arrowhead style. "
- "Has an effect only if 'showarrow' is set to True."
- )),
-
- ('arrowsize', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="Scales the arrowhead's size. "
- "Has an effect only if 'showarrow' is set to True."
- )),
-
- ('arrowwidth', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the arrowhead's width (in pixels). "
- "Has an effect only if 'showarrow' is set to True."
- )),
-
- ('arrowcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of the arrowhead. "
- "Has an effect only if 'showarrow' is set to True.",
- examples=examples_color
- )),
-
- ('ax', dict( # TODO! Better description
- required=False,
- type='plot_info',
- val_types=val_types['number'](),
- description="Position of the annotation text relative to the "
- "arrowhead about the x-axis. "
- "Has an effect only if 'showarrow' is set to True."
- )),
-
- ('ay', dict( # TODO! Better description
- required=False,
- type='plot_info',
- val_types=val_types['number'](),
- description="Position of the annotation text relative to the "
- "arrowhead about the y-axis. "
- "Has an effect only if 'showarrow' is set to True."
- )),
-
- ('textangle', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=-180,le=180),
- description="Sets the angle of the text linked to 'text' with respect "
- "to the horizontal."
-
- )),
-
- ('bordercolor', make_bordercolor('annotation')),
-
- ('borderwidth', make_borderwidth('annotation')),
-
- ('borderpad', dict(
- required=False,
- type='style',
- val_types=val_types['number'](le=10, ge=0),
- description="The amount of space (padding) between the text and "
- "the enclosing boarder.")),
-
- ('bgcolor', make_bgcolor('annotation')),
-
- ('opacity', make_opacity())
-
-]))]
-
-### @Layout@
-META += [('layout', OrderedDict([
-
- ('title', make_title('layout')),
-
- ('titlefont', make_titlefont('layout')),
-
- ('font', make_font('layout')),
-
- ('showlegend', make_showlegend(layout=True)),
-
- ('autosize', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not the dimensions of the figure are "
- "automatically picked by Plotly. Plotly picks figure's "
- "dimensions as a function of your machine's display "
- "resolution. "
- "Once 'autosize' is set to False, the figure's dimensions "
- "can be set with 'width' and 'height'."
- )),
-
- ('width', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the width in pixels of the figure you are "
- "generating."
- )),
-
- ('height', dict(
- required=False,
- type='style',
- val_types=val_types['number'](gt=0),
- description="Sets the height in pixels of the figure you are "
- "generating."
- )),
-
- ('xaxis', make_axis('x',layout=True)),
-
- ('yaxis', make_axis('y',layout=True)),
-
- ('legend', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object containing the legend "
- "parameters for this figure."
- )),
-
- ('annotations', dict(
- required=False,
- type='object',
- val_types=val_types['object_list'],
- description="A list-like object that contains one or multiple "
- "annotation dictionaries."
- )),
-
- ('margin', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object containing the margin "
- "parameters for this figure."
- )),
-
- ('paper_bgcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the color of the figure's paper "
- "(i.e. area representing the canvas of the figure).",
- examples=examples_color
- )),
-
- ('plot_bgcolor', dict(
- required=False,
- type='style',
- val_types=val_types['color'],
- description="Sets the background color of the plot (i.e. the area "
- "laying inside this figure's axes.",
- examples=examples_color
- )),
-
- ('hovermode', dict(
- required=False,
- type='style',
- val_types="'closest' | 'x' | 'y'",
- description="Sets this figure's behavior when a user hovers over it. "
- "When set to 'x', all data sharing the same 'x' "
- "coordinate will be shown on screen with "
- "corresponding trace labels. When set to 'y' all data "
- "sharing the same 'y' coordainte will be shown on the "
- "screen with corresponding trace labels. When set to "
- "'closest', information about the data point closest "
- "to where the viewer is hovering will appear."
- )),
-
- ('dragmode', dict(
- required=False,
- type='style',
- val_types="'zoom' | 'pan'",
- description="Sets this figure's behavior when a user preforms a mouse "
- "'drag' in the plot area. When set to 'zoom', a portion of "
- "the plot will be highlighted, when the viewer "
- "exits the drag, this highlighted section will be "
- "zoomed in on. When set to 'pan', data in the plot "
- "will move along with the viewers dragging motions. A "
- "user can always depress the 'shift' key to access "
- "the whatever functionality has not been set as the "
- "default."
- )),
-
- ('separators', dict(
- required=False,
- type='style',
- val_types="a two-character string",
- description="Sets the decimal (the first character) and thousands "
- "(the second character) separators to be displayed on "
- "this figure's tick labels and hover mode. "
- "This is meant for internationalization purposes. "
- "For example, if "
- "'separator' is set to ', ', then decimals are separated "
- "by commas and thousands by spaces. "
- "One may have to set 'exponentformat' to 'none' "
- "in the corresponding axis object(s) to see the "
- "effects.",
- )),
-
- ('barmode', dict(
- required=False,
- type='plot_info',
- val_types="'stack' | 'group' | 'overlay'",
- description="For bar and histogram plots only. "
- "This sets how multiple bar objects are plotted "
- "together. In other words, this defines how bars at "
- "the same location appear on the plot. If set to "
- "'stack' the bars are stacked on top of one another. "
- "If set to 'group', the bars are plotted next to one "
- "another, centered around the shared location. If set "
- "to 'overlay', the bars are simply plotted over one "
- "another, you may need to set the opacity to see this."
- )),
-
- ('bargap', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="For bar and histogram plots only. "
- "Sets the gap between bars (or sets of bars) at "
- "different locations."
- )),
-
- ('bargroupgap', dict(
- required=False,
- type='style',
- val_types=val_types['number'](ge=0),
- description="For bar and histogram plots only. "
- "Sets the gap between bars in the same group. "
- "That is, when multiple bar objects are plotted and "
- "share the same locations, this sets the distance "
- "between bars at each location."
- )),
-
- ('boxmode', dict(
- required=False,
- type='plot_info',
- val_types="'overlay' | 'group'",
- description="For box plots only. "
- "Sets how groups of box plots appear. "
- "If set to 'overlay', a group of boxes "
- "will be plotted directly on top of one "
- "another at their specified location. "
- "If set to 'group', the boxes will be "
- "centered around their shared location, "
- "but they will not overlap."
- )),
-
- ('radialaxis', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object describing the radial axis "
- "in a polar plot."
- )),
-
- ('angularaxis', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object describing the angular axis "
- "in a polar plot."
- )),
-
- ('direction', dict(
- required=False,
- type='plot_info',
- val_types="'clockwise' | 'counterclockwise'",
- description="For polar plots only. "
- "Sets the direction corresponding to "
- "positive angles."
- )),
-
- ('orientation', dict( # Different enough than in shortcut-orientation
- required=False,
- type='plot_info',
- val_types=val_types['number'](ge=-360,le=360),
- description="For polar plots only. "
- "Rotates the entire polar by the given angle."
- )),
-
- ('hidesources', dict(
- required=False,
- type='style',
- val_types=val_types['bool'],
- description="Toggle whether or not an annotation citing the data "
- "source is placed at the bottom-right corner of the figure."
- "This key has an effect only on graphs that have been "
- "generated from forked graphs from plot.ly."
- )),
-
-]))]
-
-### @Figure@
-META += [('figure', OrderedDict([
-
- ('data', dict(
- required=False,
- type='object',
- val_types=val_types['object_list'],
- description="A list-like array of the data trace(s) that is/are "
- "to be visualized."
- )),
-
- ('layout', dict(
- required=False,
- type='object',
- val_types=val_types['object'],
- description="A dictionary-like object that contains the layout "
- "parameters (e.g. information about the axis, "
- "global settings and layout information "
- "related to the rendering of the figure)."
- ))
-
-]))]
-
-
-### @graph-objs-meta-others@ -
-
-# @Data@ (accepts no keys)
-META += [('data', dict())]
-
-# @Annotations@ (accepts no keys)
-META += [('annotations', dict())]
-
-# @Trace@
-META += [('trace', OrderedDict([ #Q? Why keep this?
-
- ('x', dict(type='data')),
- ('y', dict(type='data')),
- ('z', dict(type='data')),
- ('r', dict(type='data')),
- ('t', dict(type='data')),
- ('text', dict(type='data')),
- ('name', dict(type='data')),
- ('mode', dict(type='plot_info')),
- ('marker', dict(type='object')),
- ('line', dict(type='object')),
- ('fill', dict(type='style')),
- ('fillcolor', dict(type='style')),
- ('opacity', dict(type='style')),
- ('showlegend', dict(type='style')),
- ('xaxis', dict(type='plot_info')),
- ('yaxis', dict(type='plot_info')),
- ('angularaxis', dict()),
- ('radialaxis', dict()),
- ('error_y', dict(type='object')),
- ('error_x', dict(type='object')),
- ('textfont', dict(type='object')),
- ('type', dict(type='plot_info')),
- ('orientation', dict(type='plot_info')),
- ('boxpoints', dict(type='style')),
- ('jitter', dict(type='style')),
- ('pointpos', dict(type='style')),
- ('boxmean', dict(type='style')),
- ('whiskerwidth', dict(type='style')),
- ('scl', dict(type='style')),
- ('reversescl', dict(type='style')),
- ('colorbar', dict(type='object')),
- ('autobinx', dict(type='style')),
- ('autobiny', dict(type='style')),
- ('xbins', dict(type='object')),
- ('ybins', dict(type='object')),
- ('histnorm', dict(type='plot_info')),
- ('zmax', dict(type='plot_info')),
- ('zmin', dict(type='plot_info')),
- ('dx', dict()),
- ('dy', dict()),
- ('x0', dict()),
- ('y0', dict()),
- ('zauto', dict(type='plot_info')),
- ('hm_id', dict()),
- ('nbinsx', dict(type='style')),
- ('nbinsy', dict(type='style')),
- ('showscale', dict(type='style'))
-
-]))]
-
-# @PlotlyList@ (accepts no keys)
-META += [('plotlylist', dict())]
-
-# @PlotlyDict@ (accepts no keys)
-META += [('plotlydict', dict())]
-
-# @PlotlyTrace@ (accepts no keys)
-META += [('plotlytrace', dict())]
-
-# -------------------------------------------------------------------------------
-
-
-## Write to json
-
-#
-INFO = OrderedDict(META)
-
-if __name__ == "__main__":
- import json
-
- with open('graph_objs_meta.json', 'w') as f:
- f.write(json.dumps(INFO, indent=4, sort_keys=False))
-
- obj_keys = dict()
- for key, val in INFO.items():
- obj_keys[key] = val.keys()
- obj_keys[key].sort()
- with open('graph_objs_keys.json', 'w') as f:
- f.write(json.dumps(obj_keys, indent=4, sort_keys=True))
-
- checklist = dict()
- for key, val in INFO.items():
- checklist[key] = dict()
- for k in val:
- checklist[key][k] = dict()
- if 'required' not in INFO[key][k]:
- checklist[key][k]['required'] = 'UNDOCUMENTED'
- if 'type' not in INFO[key][k]:
- checklist[key][k]['type'] = 'UNDOCUMENTED'
- if 'val_types' not in INFO[key][k]:
- checklist[key][k]['val_types'] = 'UNDOCUMENTED'
- if 'description' not in INFO[key][k]:
- checklist[key][k]['description'] = 'UNDOCUMENTED'
- if checklist[key][k] == dict():
- del checklist[key][k]
- if checklist[key] == dict():
- del checklist[key]
- with open('graph_objs_checklist.json', 'w') as f:
- f.write(json.dumps(checklist, indent=4, sort_keys=False))
diff --git a/plotly/graph_reference/test_graph_references.py b/plotly/graph_reference/test_graph_references.py
deleted file mode 100644
index 81edebfdcd5..00000000000
--- a/plotly/graph_reference/test_graph_references.py
+++ /dev/null
@@ -1,55 +0,0 @@
-import json
-with open('graph_objs_meta.json') as f:
- INFO = json.load(f)
-
-types = ['data', 'plot_info', 'style', 'object']
-
-attr_keys = ['required',
- 'description',
- 'examples', # todo: do we want this?
- 'type',
- 'val_types',
- 'streamable',
- 'code', # todo: do we want this?
- 'default'] # todo: do we want this?
-
-
-def test_type_exists():
- print "\n\ntesting if keys have 'type'\n"
- checks = True
- for obj_key, obj in INFO.items():
- if obj_key != 'trace':
- for attr_key, attr_dict in obj.items():
- if 'type' not in attr_dict:
- checks = False
- print obj_key, attr_key
- if not checks:
- raise Exception
-
-
-def test_for_invalid_attr_keys():
- print "\n\ntesting if attr keys are valid\n"
- checks = True
- for obj_key, obj in INFO.items():
- if obj_key != 'trace':
- for attr_key, attr_dict in obj.items():
- for attr in attr_dict:
- if attr not in attr_keys:
- print obj_key, attr_key, attr
- checks = False
- if not checks:
- raise Exception
-
-
-def test_type_value():
- print "\n\ntesting if 'type' values are valid\n"
- checks = True
- for obj_key, obj in INFO.items():
- if obj_key != 'trace':
- for attr_key, attr_dict in obj.items():
- if 'type' in attr_dict:
- if attr_dict['type'] not in types:
- print obj_key, attr_key, attr_dict['type']
- checks = False
- if not checks:
- raise Exception
\ No newline at end of file
diff --git a/plotly/tests/test_core/test_graph_objs/test_consistency.py b/plotly/tests/test_core/test_graph_objs/test_consistency.py
index 6e8f8b23bcd..bc38f1e06bc 100644
--- a/plotly/tests/test_core/test_graph_objs/test_consistency.py
+++ b/plotly/tests/test_core/test_graph_objs/test_consistency.py
@@ -10,17 +10,17 @@
def test_info_keys_in_key_to_name():
- for key in graph_objs.INFO:
+ for key in graph_objs.INFO.keys():
class_name = graph_objs.KEY_TO_NAME[key]
def test_names_in_name_to_key():
- for key in graph_objs.INFO:
+ for key in graph_objs.INFO.keys():
class_name = graph_objs.KEY_TO_NAME[key]
key_name = graph_objs.NAME_TO_KEY[class_name]
def test_names_in_name_to_class():
- for key in graph_objs.INFO:
+ for key in graph_objs.INFO.keys():
class_name = graph_objs.KEY_TO_NAME[key]
- _class = graph_objs.NAME_TO_CLASS[class_name]
+ graph_obj_class = graph_objs.get_class_instance_by_name(class_name)
diff --git a/plotly/tests/test_core/test_graph_objs/test_strip_style.py b/plotly/tests/test_core/test_graph_objs/test_strip_style.py
index b7e4afb8be8..7152eb31497 100644
--- a/plotly/tests/test_core/test_graph_objs/test_strip_style.py
+++ b/plotly/tests/test_core/test_graph_objs/test_strip_style.py
@@ -100,6 +100,7 @@ def test_strip_style():
Scatter(
x=[52698, 43117],
y=[53, 31],
+ mode='markers',
name='North America',
text=['United States', 'Canada'],
marker=Marker(
@@ -109,6 +110,7 @@ def test_strip_style():
Scatter(
x=[39317, 37236, 35650, 30066, 29570, 27159, 23557, 21046, 18007],
y=[33, 20, 13, 19, 27, 19, 49, 44, 38],
+ mode='markers',
name='Europe',
text=['Germany', 'Britain', 'France', 'Spain', 'Italy', 'Czech Rep.', 'Greece', 'Poland'],
marker=Marker(
@@ -118,6 +120,7 @@ def test_strip_style():
Scatter(
x=[42952, 37037, 33106, 17478, 9813, 5253, 4692, 3899],
y=[23, 42, 54, 89, 14, 99, 93, 70],
+ mode='markers',
name='Asia/Pacific',
text=['Australia', 'Japan', 'South Korea', 'Malaysia', 'China', 'Indonesia', 'Philippines', 'India'],
marker=Marker(
@@ -127,6 +130,7 @@ def test_strip_style():
Scatter(
x=[19097, 18601, 15595, 13546, 12026, 7434, 5419],
y=[43, 47, 56, 80, 86, 93, 80],
+ mode='markers',
name='Latin America',
text=['Chile', 'Argentina', 'Mexico', 'Venezuela', 'Venezuela', 'El Salvador', 'Bolivia'],
marker=Marker(
@@ -136,13 +140,20 @@ def test_strip_style():
]),
layout=Layout(
title='Quarter 1 Growth',
+ width=500,
+ height=500,
xaxis=XAxis(
title='GDP per Capita'
),
yaxis=YAxis(
title='Percent'
),
- margin=Margin()
+ margin=Margin(
+ l=65,
+ r=50,
+ b=65,
+ t=90
+ )
)
)
equivalent, msg = compare_dict(fig, comp_fig)
diff --git a/plotly/tests/test_core/test_graph_reference/test_key_types.py b/plotly/tests/test_core/test_graph_reference/test_key_types.py
index d5c1ca7fc43..6b2df0e1993 100644
--- a/plotly/tests/test_core/test_graph_reference/test_key_types.py
+++ b/plotly/tests/test_core/test_graph_reference/test_key_types.py
@@ -12,11 +12,11 @@
def test_style_exists():
checks = True
- for obj_key, obj in list(go.INFO.items()):
- if obj_key not in ['plotlylist', 'data', 'annotations', 'plotlydict', 'plotlytrace', 'trace']:
- for attr_key, attr in list(obj.items()):
- if 'type' not in attr:
+ for obj, stuff in list(go.INFO.items()):
+ if obj not in ['plotlylist', 'data', 'annotations', 'plotlydict', 'plotlytrace', 'trace']:
+ for attr_key, attr in list(stuff['keymeta'].items()):
+ if 'key_type' not in attr:
checks = False
print(obj_key, attr_key)
if not checks:
- raise Exception
\ No newline at end of file
+ raise Exception
diff --git a/plotly/tools.py b/plotly/tools.py
index 96c4d7a0dfa..363ad2224db 100644
--- a/plotly/tools.py
+++ b/plotly/tools.py
@@ -18,7 +18,7 @@
from plotly import utils
from plotly import exceptions
-from . graph_objs import graph_objs
+from plotly.graph_objs import graph_objs
# Warning format
def warning_on_one_line(message, category, filename, lineno, file=None, line=None):
@@ -452,10 +452,11 @@ def get_valid_graph_obj(obj, obj_type=None):
"""
try:
- new_obj = graph_objs.NAME_TO_CLASS[obj.__class__.__name__]()
+ new_obj = graph_objs.get_class_instance_by_name(
+ obj.__class__.__name__)
except KeyError:
try:
- new_obj = graph_objs.NAME_TO_CLASS[obj_type]()
+ new_obj = graph_objs.get_class_instance_by_name(obj_type)
except KeyError:
raise exceptions.PlotlyError(
"'{0}' nor '{1}' are recognizable graph_objs.".
@@ -482,7 +483,7 @@ def validate(obj, obj_type):
except KeyError:
pass
try:
- test_obj = graph_objs.NAME_TO_CLASS[obj_type](obj)
+ test_obj = graph_objs.get_class_instance_by_name(obj_type, obj)
except KeyError:
raise exceptions.PlotlyError(
"'{0}' is not a recognizable graph_obj.".
@@ -503,8 +504,8 @@ def validate_stream(obj, obj_type):
for key, val in list(obj.items()):
if key == 'type':
continue
- if 'streamable' in info[key]:
- if not info[key]['streamable']:
+ if 'streamable' in info['keymeta'][key].keys():
+ if not info['keymeta'][key]['streamable']:
raise exceptions.PlotlyError(
"The '{0}' key is not streamable in the '{1}' "
"object".format(
diff --git a/plotly/version.py b/plotly/version.py
index 5089ceda19c..19b4f1d6059 100644
--- a/plotly/version.py
+++ b/plotly/version.py
@@ -1 +1 @@
-__version__ = '1.2.9'
+__version__ = '1.3.0'
diff --git a/submodules/graph_reference b/submodules/graph_reference
index 200abcca9e2..7c1bc82c117 160000
--- a/submodules/graph_reference
+++ b/submodules/graph_reference
@@ -1 +1 @@
-Subproject commit 200abcca9e281c5cc0bdda355940883c0ad274b2
+Subproject commit 7c1bc82c1175ef537c8f2bcaba5ace7a924905a5