{ "metadata": { "name": "", "signature": "sha256:39c58afe571301d003ef422d7d70fc4d35829c10c248c007631f0e00987211d1" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "import plotly.plotly as py\n", "import plotly.tools as tls" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "from plotly.graph_objs import *" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "import numpy as np" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "help(Heatmap)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Help on class Heatmap in module plotly.graph_objs.graph_objs:\n", "\n", "class Heatmap(PlotlyTrace)\n", " | A dictionary-like object for representing a heatmap in plotly.\n", " | \n", " | Example:\n", " | \n", " | z = [[0, 1, 0, 1, 0],\n", " | [1, 0, 1, 0, 1],\n", " | [0, 1, 0, 1, 0],]\n", " | y = ['a', 'b', 'c']\n", " | x = [1, 2, 3, 4, 5]\n", " | py.plot([Heatmap(z=z, x=x, y=y)])\n", " | \n", " | \n", " | Quick method reference:\n", " | \n", " | Heatmap.update(changes)\n", " | Heatmap.strip_style()\n", " | Heatmap.get_data()\n", " | Heatmap.to_graph_objs()\n", " | Heatmap.validate()\n", " | Heatmap.to_string()\n", " | Heatmap.force_clean()\n", " | \n", " | Valid keys:\n", " | \n", " | z [required=True] (value=matrix-like: list of lists, numpy.matrix):\n", " | The data that describes the mapping. The dimensions of the 'z'\n", " | matrix are (n x m) where there are 'n' ROWS defining the number of\n", " | partitions along the y-axis; this is equal to the length of the 'y'\n", " | array. There are 'm' COLUMNS defining the number of partitions along\n", " | the x-axis; this is equal to the length of the 'x' array. Therefore,\n", " | the color of the cell z[i][j] is mapped to the ith partition of the\n", " | y-axis (starting from the bottom of the plot) and the jth partition\n", " | of the x-axis (starting from the left of the plot). In Python, a\n", " | (non-numpy) matrix is best thought of as a list of lists (of lists,\n", " | of lists, etc.). Therefore, running len(z) will give you the number\n", " | of ROWS and running len(z[0]) will give you the number of COLUMNS.\n", " | If you ARE using numpy, then running z.shape will give you the\n", " | tuple, (n, m), e.g., (3, 5).\n", " | \n", " | x [required=False] (value=array-like of numbers, strings, datetimes):\n", " | This array-like value contains the HORIZONTAL labels referring to\n", " | the COLUMNS of the 'z' matrix. If strings, the x-labels are spaced\n", " | evenly. If the dimensions of z are (n x m), the length of the 'x'\n", " | array should be 'm'.\n", " | \n", " | y [required=False] (value=array-like of numbers, strings, datetimes):\n", " | This array-like value contains the VERTICAL labels referring to the\n", " | ROWS of the 'z' matrix. If strings, the y-labels are spaced evenly.\n", " | If the dimensions of z are (n x m), the length of the 'y' array\n", " | should be 'n'.\n", " | \n", " | name [required=False] (value=string):\n", " | The label associated with this trace. This name will appear in the\n", " | legend, in the column header in the spreadsheet, and on hover.\n", " | \n", " | scl [required=False] (value=array_like of value-color pairs | 'Greys' |\n", " | 'Greens' | 'Bluered' | 'Hot' | 'Picnic' | 'Portland' | 'Jet' | 'RdBu' |\n", " | 'Blackbody' | 'Earth' | 'Electric' | 'YIOrRd' | 'YIGnBu'):\n", " | The color scale. The strings are pre-defined color scales. For\n", " | custom color scales, define a list of color-value pairs, where the\n", " | first element of the pair corresponds to a normalized value of z\n", " | from 0-1 (i.e. (z-zmin)/(zmax-zmin)), and the second element of\n", " | pair corresponds to a color.\n", " | \n", " | Examples:\n", " | ['Greys', [[0, 'rgb(0,0,0)'], [1, 'rgb(255,255,255)']], [[0,\n", " | 'rgb(8, 29, 88)'], [0.125, 'rgb(37, 52, 148)'], [0.25, 'rgb(34,\n", " | 94, 168)'], [0.375, 'rgb(29, 145, 192)'], [0.5, 'rgb(65, 182,\n", " | 196)'], [0.625, 'rgb(127, 205, 187)'], [0.75, 'rgb(199, 233,\n", " | 180)'], [0.875, 'rgb(237, 248, 217)'], [1, 'rgb(255, 255,\n", " | 217)']]]\n", " | \n", " | reversescl [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | colorbar [required=False] (value=ColorBar object | dictionary-like):\n", " | This object represents a color bar that will be shown on the figure\n", " | where the color is related to the data being shown.\n", " | \n", " | For more, run `help(plotly.graph_objs.ColorBar)`\n", " | \n", " | zmin [required=False] (value=number):\n", " | The value used as the minimum in the color scale normalization in\n", " | 'scl'. The default is the minimum of the 'z' data values.\n", " | \n", " | zmax [required=False] (value=number):\n", " | The value used as the maximum in the color scale normalization in\n", " | 'scl'. The default is the minimum of the 'z' data values.\n", " | \n", " | showlegend [required=False] (value=bool: True | False):\n", " | Toggle whether or not this trace will show up in the legend.\n", " | \n", " | stream [required=False] (value=dictionary-like):\n", " | The stream dict that initializes traces as writable-streams, for use\n", " | with the real-time streaming API. See examples here:\n", " | http://nbviewer.ipython.org/github/plotly/Streaming-Demos\n", " | \n", " | xaxis [required=False] (value=string: 'x1' | 'x2' | 'x3' | etc.):\n", " | This key determines which xaxis the x coordinates in this trace will\n", " | reference in the figure. 'x' references layout['xaxis'] and 'x2'\n", " | references layout['xaxis2']. 'x1' will always refer to\n", " | layout['xaxis'] or layout['xaxis1'], they are the same.\n", " | \n", " | yaxis [required=False] (value=string: 'y1' | 'y2' | 'y3' | etc.):\n", " | This key determines which yaxis the y coordinates in this trace will\n", " | reference in the figure. 'y' references layout['yaxis'] and 'y2'\n", " | references layout['yaxis2']. 'y1' will always refer to\n", " | layout['yaxis'] or layout['yaxis1'], they are the same.\n", " | \n", " | visible [required=False] (value=bool: True | False):\n", " | Toggles whether this will actually be visible in the rendered\n", " | figure.\n", " | \n", " | showscale [required=False] (value=bool: True | False):\n", " | Toggle whether or not the color scale associated with this mapping\n", " | will be shown alongside the rendered figure.\n", " | \n", " | x0 [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | y0 [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | xtype [required=False] (value='array' | 'scaled'):\n", " | Aw, snap! Undocumented!\n", " | \n", " | ytype [required=False] (value='array' | 'scaled'):\n", " | Aw, snap! Undocumented!\n", " | \n", " | dx [required=False] (value=number):\n", " | Aw, snap! Undocumented!\n", " | \n", " | dy [required=False] (value=number):\n", " | Aw, snap! Undocumented!\n", " | \n", " | zauto [required=False] (value=bool: True | False):\n", " | Aw, snap! Undocumented!\n", " | \n", " | type [required=True] (value=heatmap):\n", " | Plotly identifier for this data's trace type. This defines how this\n", " | data dictionary will be handled. For example, 'scatter' type expects\n", " | x and y data-arrays corresponding to (x, y) coordinates wheras a\n", " | 'histogram' only requires a single x or y array and a 'heatmap' type\n", " | requires a z matrix.\n", " | \n", " | Method resolution order:\n", " | Heatmap\n", " | PlotlyTrace\n", " | PlotlyDict\n", " | __builtin__.dict\n", " | __builtin__.object\n", " | \n", " | Methods inherited from PlotlyTrace:\n", " | \n", " | __init__(self, *args, **kwargs)\n", " | \n", " | to_string(self, level=0, indent=4, eol='\\n', pretty=True, max_chars=80)\n", " | Returns a formatted string showing graph_obj constructors.\n", " | \n", " | Example:\n", " | \n", " | print obj.to_string()\n", " | \n", " | Keyword arguments:\n", " | level (default = 0) -- set number of indentations to start with\n", " | indent (default = 4) -- set indentation amount\n", " | eol (default = '\n", " | ') -- set end of line character(s)\n", " | pretty (default = True) -- curtail long list output with a '...'\n", " | max_chars (default = 80) -- set max characters per line\n", " | \n", " | ----------------------------------------------------------------------\n", " | Methods inherited from PlotlyDict:\n", " | \n", " | force_clean(self, caller=True)\n", " | Attempts to convert to graph_objs and call force_clean() on values.\n", " | \n", " | Calling force_clean() on a PlotlyDict will ensure that the object is\n", " | valid and may be sent to plotly. This process will also remove any\n", " | entries that end up with a length == 0.\n", " | \n", " | Careful! This will delete any invalid entries *silently*.\n", " | \n", " | get_data(self)\n", " | Returns the JSON for the plot with non-data elements stripped.\n", " | \n", " | get_ordered(self, caller=True)\n", " | \n", " | strip_style(self)\n", " | Strip style from the current representation.\n", " | \n", " | All PlotlyDicts and PlotlyLists are guaranteed to survive the\n", " | stripping process, though they made be left empty. This is allowable.\n", " | \n", " | Keys that will be stripped in this process are tagged with\n", " | `'type': 'style'` in the INFO dictionary listed in graph_objs_meta.py.\n", " | \n", " | This process first attempts to convert nested collections from dicts\n", " | or lists to subclasses of PlotlyList/PlotlyDict. This process forces\n", " | a validation, which may throw exceptions.\n", " | \n", " | Then, each of these objects call `strip_style` on themselves and so\n", " | on, recursively until the entire structure has been validated and\n", " | stripped.\n", " | \n", " | to_graph_objs(self, caller=True)\n", " | Walk obj, convert dicts and lists to plotly graph objs.\n", " | \n", " | For each key in the object, if it corresponds to a special key that\n", " | should be associated with a graph object, the ordinary dict or list\n", " | will be reinitialized as a special PlotlyDict or PlotlyList of the\n", " | appropriate `kind`.\n", " | \n", " | update(self, dict1=None, **dict2)\n", " | Update current dict with dict1 and then dict2.\n", " | \n", " | This recursively updates the structure of the original dictionary-like\n", " | object with the new entries in the second and third objects. This\n", " | allows users to update with large, nested structures.\n", " | \n", " | Note, because the dict2 packs up all the keyword arguments, you can\n", " | specify the changes as a list of keyword agruments.\n", " | \n", " | Examples:\n", " | # update with dict\n", " | obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))\n", " | update_dict = dict(title='new title', xaxis=dict(domain=[0,.8]))\n", " | obj.update(update_dict)\n", " | obj\n", " | {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}\n", " | \n", " | # update with list of keyword arguments\n", " | obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))\n", " | obj.update(title='new title', xaxis=dict(domain=[0,.8]))\n", " | obj\n", " | {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}\n", " | \n", " | This 'fully' supports duck-typing in that the call signature is\n", " | identical, however this differs slightly from the normal update\n", " | method provided by Python's dictionaries.\n", " | \n", " | validate(self, caller=True)\n", " | Recursively check the validity of the keys in a PlotlyDict.\n", " | \n", " | The valid keys constitute the entries in each object\n", " | dictionary in INFO stored in graph_objs_meta.py.\n", " | \n", " | The validation process first requires that all nested collections be\n", " | converted to the appropriate subclass of PlotlyDict/PlotlyList. Then,\n", " | each of these objects call `validate` and so on, recursively,\n", " | until the entire object has been validated.\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data descriptors inherited from PlotlyDict:\n", " | \n", " | __dict__\n", " | dictionary for instance variables (if defined)\n", " | \n", " | __weakref__\n", " | list of weak references to the object (if defined)\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data and other attributes inherited from PlotlyDict:\n", " | \n", " | __metaclass__ = \n", " | A meta class for PlotlyDict class creation.\n", " | \n", " | The sole purpose of this meta class is to properly create the __doc__\n", " | attribute so that running help(Obj), where Obj is a subclass of PlotlyDict,\n", " | will return information about key-value pairs for that object.\n", " | \n", " | ----------------------------------------------------------------------\n", " | Methods inherited from __builtin__.dict:\n", " | \n", " | __cmp__(...)\n", " | x.__cmp__(y) <==> cmp(x,y)\n", " | \n", " | __contains__(...)\n", " | D.__contains__(k) -> True if D has a key k, else False\n", " | \n", " | __delitem__(...)\n", " | x.__delitem__(y) <==> del x[y]\n", " | \n", " | __eq__(...)\n", " | x.__eq__(y) <==> x==y\n", " | \n", " | __ge__(...)\n", " | x.__ge__(y) <==> x>=y\n", " | \n", " | __getattribute__(...)\n", " | x.__getattribute__('name') <==> x.name\n", " | \n", " | __getitem__(...)\n", " | x.__getitem__(y) <==> x[y]\n", " | \n", " | __gt__(...)\n", " | x.__gt__(y) <==> x>y\n", " | \n", " | __iter__(...)\n", " | x.__iter__() <==> iter(x)\n", " | \n", " | __le__(...)\n", " | x.__le__(y) <==> x<=y\n", " | \n", " | __len__(...)\n", " | x.__len__() <==> len(x)\n", " | \n", " | __lt__(...)\n", " | x.__lt__(y) <==> x x!=y\n", " | \n", " | __repr__(...)\n", " | x.__repr__() <==> repr(x)\n", " | \n", " | __setitem__(...)\n", " | x.__setitem__(i, y) <==> x[i]=y\n", " | \n", " | __sizeof__(...)\n", " | D.__sizeof__() -> size of D in memory, in bytes\n", " | \n", " | clear(...)\n", " | D.clear() -> None. Remove all items from D.\n", " | \n", " | copy(...)\n", " | D.copy() -> a shallow copy of D\n", " | \n", " | fromkeys(...)\n", " | dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.\n", " | v defaults to None.\n", " | \n", " | get(...)\n", " | D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.\n", " | \n", " | has_key(...)\n", " | D.has_key(k) -> True if D has a key k, else False\n", " | \n", " | items(...)\n", " | D.items() -> list of D's (key, value) pairs, as 2-tuples\n", " | \n", " | iteritems(...)\n", " | D.iteritems() -> an iterator over the (key, value) items of D\n", " | \n", " | iterkeys(...)\n", " | D.iterkeys() -> an iterator over the keys of D\n", " | \n", " | itervalues(...)\n", " | D.itervalues() -> an iterator over the values of D\n", " | \n", " | keys(...)\n", " | D.keys() -> list of D's keys\n", " | \n", " | pop(...)\n", " | D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n", " | If key is not found, d is returned if given, otherwise KeyError is raised\n", " | \n", " | popitem(...)\n", " | D.popitem() -> (k, v), remove and return some (key, value) pair as a\n", " | 2-tuple; but raise KeyError if D is empty.\n", " | \n", " | setdefault(...)\n", " | D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D\n", " | \n", " | values(...)\n", " | D.values() -> list of D's values\n", " | \n", " | viewitems(...)\n", " | D.viewitems() -> a set-like object providing a view on D's items\n", " | \n", " | viewkeys(...)\n", " | D.viewkeys() -> a set-like object providing a view on D's keys\n", " | \n", " | viewvalues(...)\n", " | D.viewvalues() -> an object providing a view on D's values\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data and other attributes inherited from __builtin__.dict:\n", " | \n", " | __hash__ = None\n", " | \n", " | __new__ = \n", " | T.__new__(S, ...) -> a new object with type S, a subtype of T\n", "\n" ] } ], "prompt_number": 11 }, { "cell_type": "code", "collapsed": false, "input": [ "help(ColorBar)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Help on class ColorBar in module plotly.graph_objs.graph_objs:\n", "\n", "class ColorBar(PlotlyDict)\n", " | A dictionary-like object for representing a color bar in plotly.\n", " | \n", " | \n", " | Quick method reference:\n", " | \n", " | ColorBar.update(changes)\n", " | ColorBar.strip_style()\n", " | ColorBar.get_data()\n", " | ColorBar.to_graph_objs()\n", " | ColorBar.validate()\n", " | ColorBar.to_string()\n", " | ColorBar.force_clean()\n", " | \n", " | Valid keys:\n", " | \n", " | title [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | titleside [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | thickness [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | xanchor [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | yanchor [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | ticks [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | nticks [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | len [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | xpad [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | ypad [required=Aw, snap! Undocumented!] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | x [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | y [required=False] (value=Aw, snap! Undocumented!):\n", " | Aw, snap! Undocumented!\n", " | \n", " | Method resolution order:\n", " | ColorBar\n", " | PlotlyDict\n", " | __builtin__.dict\n", " | __builtin__.object\n", " | \n", " | Methods inherited from PlotlyDict:\n", " | \n", " | __init__(self, *args, **kwargs)\n", " | \n", " | force_clean(self, caller=True)\n", " | Attempts to convert to graph_objs and call force_clean() on values.\n", " | \n", " | Calling force_clean() on a PlotlyDict will ensure that the object is\n", " | valid and may be sent to plotly. This process will also remove any\n", " | entries that end up with a length == 0.\n", " | \n", " | Careful! This will delete any invalid entries *silently*.\n", " | \n", " | get_data(self)\n", " | Returns the JSON for the plot with non-data elements stripped.\n", " | \n", " | get_ordered(self, caller=True)\n", " | \n", " | strip_style(self)\n", " | Strip style from the current representation.\n", " | \n", " | All PlotlyDicts and PlotlyLists are guaranteed to survive the\n", " | stripping process, though they made be left empty. This is allowable.\n", " | \n", " | Keys that will be stripped in this process are tagged with\n", " | `'type': 'style'` in the INFO dictionary listed in graph_objs_meta.py.\n", " | \n", " | This process first attempts to convert nested collections from dicts\n", " | or lists to subclasses of PlotlyList/PlotlyDict. This process forces\n", " | a validation, which may throw exceptions.\n", " | \n", " | Then, each of these objects call `strip_style` on themselves and so\n", " | on, recursively until the entire structure has been validated and\n", " | stripped.\n", " | \n", " | to_graph_objs(self, caller=True)\n", " | Walk obj, convert dicts and lists to plotly graph objs.\n", " | \n", " | For each key in the object, if it corresponds to a special key that\n", " | should be associated with a graph object, the ordinary dict or list\n", " | will be reinitialized as a special PlotlyDict or PlotlyList of the\n", " | appropriate `kind`.\n", " | \n", " | to_string(self, level=0, indent=4, eol='\\n', pretty=True, max_chars=80)\n", " | Returns a formatted string showing graph_obj constructors.\n", " | \n", " | Example:\n", " | \n", " | print obj.to_string()\n", " | \n", " | Keyword arguments:\n", " | level (default = 0) -- set number of indentations to start with\n", " | indent (default = 4) -- set indentation amount\n", " | eol (default = '\n", " | ') -- set end of line character(s)\n", " | pretty (default = True) -- curtail long list output with a '...'\n", " | max_chars (default = 80) -- set max characters per line\n", " | \n", " | update(self, dict1=None, **dict2)\n", " | Update current dict with dict1 and then dict2.\n", " | \n", " | This recursively updates the structure of the original dictionary-like\n", " | object with the new entries in the second and third objects. This\n", " | allows users to update with large, nested structures.\n", " | \n", " | Note, because the dict2 packs up all the keyword arguments, you can\n", " | specify the changes as a list of keyword agruments.\n", " | \n", " | Examples:\n", " | # update with dict\n", " | obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))\n", " | update_dict = dict(title='new title', xaxis=dict(domain=[0,.8]))\n", " | obj.update(update_dict)\n", " | obj\n", " | {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}\n", " | \n", " | # update with list of keyword arguments\n", " | obj = Layout(title='my title', xaxis=XAxis(range=[0,1], domain=[0,1]))\n", " | obj.update(title='new title', xaxis=dict(domain=[0,.8]))\n", " | obj\n", " | {'title': 'new title', 'xaxis': {'range': [0,1], 'domain': [0,.8]}}\n", " | \n", " | This 'fully' supports duck-typing in that the call signature is\n", " | identical, however this differs slightly from the normal update\n", " | method provided by Python's dictionaries.\n", " | \n", " | validate(self, caller=True)\n", " | Recursively check the validity of the keys in a PlotlyDict.\n", " | \n", " | The valid keys constitute the entries in each object\n", " | dictionary in INFO stored in graph_objs_meta.py.\n", " | \n", " | The validation process first requires that all nested collections be\n", " | converted to the appropriate subclass of PlotlyDict/PlotlyList. Then,\n", " | each of these objects call `validate` and so on, recursively,\n", " | until the entire object has been validated.\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data descriptors inherited from PlotlyDict:\n", " | \n", " | __dict__\n", " | dictionary for instance variables (if defined)\n", " | \n", " | __weakref__\n", " | list of weak references to the object (if defined)\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data and other attributes inherited from PlotlyDict:\n", " | \n", " | __metaclass__ = \n", " | A meta class for PlotlyDict class creation.\n", " | \n", " | The sole purpose of this meta class is to properly create the __doc__\n", " | attribute so that running help(Obj), where Obj is a subclass of PlotlyDict,\n", " | will return information about key-value pairs for that object.\n", " | \n", " | ----------------------------------------------------------------------\n", " | Methods inherited from __builtin__.dict:\n", " | \n", " | __cmp__(...)\n", " | x.__cmp__(y) <==> cmp(x,y)\n", " | \n", " | __contains__(...)\n", " | D.__contains__(k) -> True if D has a key k, else False\n", " | \n", " | __delitem__(...)\n", " | x.__delitem__(y) <==> del x[y]\n", " | \n", " | __eq__(...)\n", " | x.__eq__(y) <==> x==y\n", " | \n", " | __ge__(...)\n", " | x.__ge__(y) <==> x>=y\n", " | \n", " | __getattribute__(...)\n", " | x.__getattribute__('name') <==> x.name\n", " | \n", " | __getitem__(...)\n", " | x.__getitem__(y) <==> x[y]\n", " | \n", " | __gt__(...)\n", " | x.__gt__(y) <==> x>y\n", " | \n", " | __iter__(...)\n", " | x.__iter__() <==> iter(x)\n", " | \n", " | __le__(...)\n", " | x.__le__(y) <==> x<=y\n", " | \n", " | __len__(...)\n", " | x.__len__() <==> len(x)\n", " | \n", " | __lt__(...)\n", " | x.__lt__(y) <==> x x!=y\n", " | \n", " | __repr__(...)\n", " | x.__repr__() <==> repr(x)\n", " | \n", " | __setitem__(...)\n", " | x.__setitem__(i, y) <==> x[i]=y\n", " | \n", " | __sizeof__(...)\n", " | D.__sizeof__() -> size of D in memory, in bytes\n", " | \n", " | clear(...)\n", " | D.clear() -> None. Remove all items from D.\n", " | \n", " | copy(...)\n", " | D.copy() -> a shallow copy of D\n", " | \n", " | fromkeys(...)\n", " | dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.\n", " | v defaults to None.\n", " | \n", " | get(...)\n", " | D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.\n", " | \n", " | has_key(...)\n", " | D.has_key(k) -> True if D has a key k, else False\n", " | \n", " | items(...)\n", " | D.items() -> list of D's (key, value) pairs, as 2-tuples\n", " | \n", " | iteritems(...)\n", " | D.iteritems() -> an iterator over the (key, value) items of D\n", " | \n", " | iterkeys(...)\n", " | D.iterkeys() -> an iterator over the keys of D\n", " | \n", " | itervalues(...)\n", " | D.itervalues() -> an iterator over the values of D\n", " | \n", " | keys(...)\n", " | D.keys() -> list of D's keys\n", " | \n", " | pop(...)\n", " | D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n", " | If key is not found, d is returned if given, otherwise KeyError is raised\n", " | \n", " | popitem(...)\n", " | D.popitem() -> (k, v), remove and return some (key, value) pair as a\n", " | 2-tuple; but raise KeyError if D is empty.\n", " | \n", " | setdefault(...)\n", " | D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D\n", " | \n", " | values(...)\n", " | D.values() -> list of D's values\n", " | \n", " | viewitems(...)\n", " | D.viewitems() -> a set-like object providing a view on D's items\n", " | \n", " | viewkeys(...)\n", " | D.viewkeys() -> a set-like object providing a view on D's keys\n", " | \n", " | viewvalues(...)\n", " | D.viewvalues() -> an object providing a view on D's values\n", " | \n", " | ----------------------------------------------------------------------\n", " | Data and other attributes inherited from __builtin__.dict:\n", " | \n", " | __hash__ = None\n", " | \n", " | __new__ = \n", " | T.__new__(S, ...) -> a new object with type S, a subtype of T\n", "\n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "my_colorbar = ColorBar(title='Testing some keys',\n", " x=0.5,\n", " y=0.5,\n", " titleside='bottom')\n", "\n", "my_data = ([Heatmap(z=[[1, 20, 30], \n", " [20, 1, 60], \n", " [30, 60, 1]],\n", " colorbar=my_colorbar)])" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 30 }, { "cell_type": "code", "collapsed": false, "input": [ "my_fig = Figure(data= my_data)\n", "py.iplot(my_fig, filename='test-colorbar-keys')" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 31 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 15 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }