Help on class Figure in module plotly.graph_objs.graph_objs: class Figure(PlotlyDict) | A dictionary-like object representing a figure to be rendered in plotly. | | This is the container for all things to be rendered in a figure. | | For help with setting up subplots, run: | `help(plotly.tools.get_subplots)` | | | Quick method reference: | | Figure.update(changes) | Figure.strip_style() | Figure.get_data() | Figure.to_graph_objs() | Figure.validate() | Figure.to_string() | Figure.force_clean() | | Valid keys: | | data [required=False] (value=Data object | dictionary-like): | A list-like array of the data that is to be visualized. | | For more, run `help(plotly.graph_objs.Data)` | | layout [required=False] (value=Layout object | dictionary-like): | The layout dictionary-like object contains axes information, gobal | settings, and layout information related to the rendering of the | figure. | | For more, run `help(plotly.graph_objs.Layout)` | | Method resolution order: | Figure | PlotlyDict | __builtin__.dict | __builtin__.object | | Methods defined here: | | __init__(self, *args, **kwargs) | | ---------------------------------------------------------------------- | Methods inherited from PlotlyDict: | | force_clean(self) | 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. | | 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) | 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`. | | to_string(self, level=0, indent=4, eol='

', 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 | | 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) | 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