Help on class Heatmap in module plotly.graph_objs.graph_objs:
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)])
|
|
| Quick method reference:
|
| Heatmap.update(changes)
| Heatmap.strip_style()
| Heatmap.get_data()
| Heatmap.to_graph_objs()
| Heatmap.validate()
| Heatmap.to_string()
| Heatmap.force_clean()
|
| Valid keys:
|
| z [required=True] (value=matrix-like: list of lists, numpy.matrix):
| 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).
|
| x [required=False] (value=array-like of numbers, strings, datetimes):
| This array-like value contains the HORIZONTAL labels 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'.
|
| y [required=False] (value=array-like of numbers, strings, datetimes):
| This array-like value contains the VERTICAL labels 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'.
|
| name [required=False] (value=string):
| The label associated with this trace. This name will appear in the
| legend, in the column header in the spreadsheet, and on hover.
|
| scl [required=False] (value=array_like of value-color pairs | 'Greys' |
| 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' |
| 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'):
| The color scale. The strings are pre-defined color scales. For
| custom color scales, define a list of color-value 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.
|
| Examples:
| ['Greys', [[0, 'rgb(0,0,0)'], [1, 'rgb(255,255,255)']], [[0,
| 'rgb(8, 29, 88)'], [0.125, 'rgb(37, 52, 148)'], [0.25, 'rgb(34,
| 94, 168)'], [0.375, 'rgb(29, 145, 192)'], [0.5, 'rgb(65, 182,
| 196)'], [0.625, 'rgb(127, 205, 187)'], [0.75, 'rgb(199, 233,
| 180)'], [0.875, 'rgb(237, 248, 217)'], [1, 'rgb(255, 255,
| 217)']]]
|
| reversescl [required=False] (value=Aw, snap! Undocumented!):
| Aw, snap! Undocumented!
|
| colorbar [required=False] (value=ColorBar object | dictionary-like):
| This object represents a color bar that will be shown on the figure
| where the color is related to the data being shown.
|
| For more, run `help(plotly.graph_objs.ColorBar)`
|
| zmin [required=False] (value=number):
| The value used as the minimum in the color scale normalization in
| 'scl'. The default is the minimum of the 'z' data values.
|
| zmax [required=False] (value=number):
| The value used as the maximum in the color scale normalization in
| 'scl'. The default is the minimum of the 'z' data values.
|
| showlegend [required=False] (value=bool: True | False):
| Toggle whether or not this trace will show up in the legend.
|
| stream [required=False] (value=dictionary-like):
| The stream dict that initializes traces as writable-streams, for use
| with the real-time streaming API. See examples here:
| http://nbviewer.ipython.org/github/plotly/Streaming-Demos
|
| xaxis [required=False] (value=string: 'x1' | 'x2' | 'x3' | etc.):
| This key determines which xaxis the x coordinates in this trace will
| reference in the figure. 'x' references layout['xaxis'] and 'x2'
| references layout['xaxis2']. 'x1' will always refer to
| layout['xaxis'] or layout['xaxis1'], they are the same.
|
| yaxis [required=False] (value=string: 'y1' | 'y2' | 'y3' | etc.):
| This key determines which yaxis the y coordinates in this trace will
| reference in the figure. 'y' references layout['yaxis'] and 'y2'
| references layout['yaxis2']. 'y1' will always refer to
| layout['yaxis'] or layout['yaxis1'], they are the same.
|
| visible [required=False] (value=bool: True | False):
| Toggles whether this will actually be visible in the rendered
| figure.
|
| showscale [required=False] (value=bool: True | False):
| Toggle whether or not the color scale associated with this mapping
| will be shown alongside the rendered figure.
|
| x0 [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):
| Aw, snap! Undocumented!
|
| y0 [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):
| Aw, snap! Undocumented!
|
| xtype [required=False] (value='array' | 'scaled'):
| Aw, snap! Undocumented!
|
| ytype [required=False] (value='array' | 'scaled'):
| Aw, snap! Undocumented!
|
| dx [required=False] (value=number):
| Aw, snap! Undocumented!
|
| dy [required=False] (value=number):
| Aw, snap! Undocumented!
|
| zauto [required=False] (value=bool: True | False):
| Aw, snap! Undocumented!
|
| type [required=True] (value=heatmap):
| 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 wheras a
| 'histogram' only requires a single x or y array and a 'heatmap' type
| requires a z matrix.
|
| Method resolution order:
| Heatmap
| PlotlyTrace
| PlotlyDict
| __builtin__.dict
| __builtin__.object
|
| Methods inherited from PlotlyTrace:
|
| __init__(self, *args, **kwargs)
|
| to_string(self, level=0, indent=4, eol='\n', pretty=True, max_chars=80)
| Returns a formatted string showing graph_obj constructors.
|
| Example:
|
| print obj.to_string()
|
| Keyword arguments:
| level (default = 0) -- set number of indentations to start with
| indent (default = 4) -- set indentation amount
| eol (default = '
| ') -- set end of line character(s)
| pretty (default = True) -- curtail long list output with a '...'
| max_chars (default = 80) -- set max characters per line
|
| ----------------------------------------------------------------------
| Methods inherited from PlotlyDict:
|
| force_clean(self, caller=True)
| Attempts to convert to graph_objs and call force_clean() on values.
|
| Calling force_clean() on a PlotlyDict will ensure that the object is
| valid and may be sent to plotly. This process will also remove any
| entries that end up with a length == 0.
|
| Careful! This will delete any invalid entries *silently*.
|
| get_data(self)
| Returns the JSON for the plot with non-data elements stripped.
|
| get_ordered(self, caller=True)
|
| strip_style(self)
| Strip style from the current representation.
|
| All PlotlyDicts and PlotlyLists are guaranteed to survive the
| 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.
|
| This process first attempts to convert nested collections from dicts
| or lists to subclasses of PlotlyList/PlotlyDict. This process forces
| a validation, which may throw exceptions.
|
| Then, each of these objects call `strip_style` on themselves and so
| on, recursively until the entire structure has been validated and
| stripped.
|
| to_graph_objs(self, caller=True)
| Walk obj, convert dicts and lists to plotly graph objs.
|
| For each key in the object, if it corresponds to a special key that
| should be associated with a graph object, the ordinary dict or list
| will be reinitialized as a special PlotlyDict or PlotlyList of the
| appropriate `kind`.
|
| update(self, dict1=None, **dict2)
| Update current dict with dict1 and then dict2.
|
| This recursively updates the structure of the original dictionary-like
| object with the new entries in the second and third objects. This
| allows users to update with large, nested structures.
|
| Note, because the dict2 packs up all the keyword arguments, you can
| specify the changes as a list of keyword agruments.
|
| Examples:
| # update with dict
| obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))
| update_dict = dict(title='new title', xaxis=dict(domain=[0,.8]))
| obj.update(update_dict)
| obj
| {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}
|
| # update with list of keyword arguments
| obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))
| obj.update(title='new title', xaxis=dict(domain=[0,.8]))
| obj
| {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}
|
| This 'fully' supports duck-typing in that the call signature is
| identical, however this differs slightly from the normal update
| method provided by Python's dictionaries.
|
| validate(self, caller=True)
| 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.
|
| The validation process first requires that all nested collections be
| converted to the appropriate subclass of PlotlyDict/PlotlyList. Then,
| each of these objects call `validate` and so on, recursively,
| until the entire object has been validated.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from PlotlyDict:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from PlotlyDict:
|
| __metaclass__ = <class 'plotly.graph_objs.graph_objs.DictMeta'>
| 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.
|
| ----------------------------------------------------------------------
| Methods inherited from __builtin__.dict:
|
| __cmp__(...)
| x.__cmp__(y) <==> cmp(x,y)
|
| __contains__(...)
| D.__contains__(k) -> True if D has a key k, else False
|
| __delitem__(...)
| x.__delitem__(y) <==> del x[y]
|
| __eq__(...)
| x.__eq__(y) <==> x==y
|
| __ge__(...)
| x.__ge__(y) <==> x>=y
|
| __getattribute__(...)
| x.__getattribute__('name') <==> x.name
|
| __getitem__(...)
| x.__getitem__(y) <==> x[y]
|
| __gt__(...)
| x.__gt__(y) <==> x>y
|
| __iter__(...)
| x.__iter__() <==> iter(x)
|
| __le__(...)
| x.__le__(y) <==> x<=y
|
| __len__(...)
| x.__len__() <==> len(x)
|
| __lt__(...)
| x.__lt__(y) <==> x<y
|
| __ne__(...)
| x.__ne__(y) <==> x!=y
|
| __repr__(...)
| x.__repr__() <==> repr(x)
|
| __setitem__(...)
| x.__setitem__(i, y) <==> x[i]=y
|
| __sizeof__(...)
| D.__sizeof__() -> size of D in memory, in bytes
|
| clear(...)
| D.clear() -> None. Remove all items from D.
|
| copy(...)
| D.copy() -> a shallow copy of D
|
| fromkeys(...)
| dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
| v defaults to None.
|
| get(...)
| D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
|
| has_key(...)
| D.has_key(k) -> True if D has a key k, else False
|
| items(...)
| D.items() -> list of D's (key, value) pairs, as 2-tuples
|
| iteritems(...)
| D.iteritems() -> an iterator over the (key, value) items of D
|
| iterkeys(...)
| D.iterkeys() -> an iterator over the keys of D
|
| itervalues(...)
| D.itervalues() -> an iterator over the values of D
|
| keys(...)
| D.keys() -> list of D's keys
|
| pop(...)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
| If key is not found, d is returned if given, otherwise KeyError is raised
|
| popitem(...)
| D.popitem() -> (k, v), remove and return some (key, value) pair as a
| 2-tuple; but raise KeyError if D is empty.
|
| setdefault(...)
| D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
|
| values(...)
| D.values() -> list of D's values
|
| viewitems(...)
| D.viewitems() -> a set-like object providing a view on D's items
|
| viewkeys(...)
| D.viewkeys() -> a set-like object providing a view on D's keys
|
| viewvalues(...)
| D.viewvalues() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from __builtin__.dict:
|
| __hash__ = None
|
| __new__ = <built-in method __new__ of type object>
| T.__new__(S, ...) -> a new object with type S, a subtype of T