| 5 | |
| 6 | |
| 7 | class Figure(BaseFigure): |
| 8 | def __init__( |
| 9 | self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs |
| 10 | ): |
| 11 | """ |
| 12 | Create a new :class:Figure instance |
| 13 | |
| 14 | Parameters |
| 15 | ---------- |
| 16 | data |
| 17 | The 'data' property is a tuple of trace instances |
| 18 | that may be specified as: |
| 19 | - A list or tuple of trace instances |
| 20 | (e.g. [Scatter(...), Bar(...)]) |
| 21 | - A single trace instance |
| 22 | (e.g. Scatter(...), Bar(...), etc.) |
| 23 | - A list or tuple of dicts of string/value properties where: |
| 24 | - The 'type' property specifies the trace type |
| 25 | One of: ['bar', 'barpolar', 'box', 'candlestick', |
| 26 | 'carpet', 'choropleth', 'choroplethmap', |
| 27 | 'choroplethmapbox', 'cone', 'contour', |
| 28 | 'contourcarpet', 'densitymap', |
| 29 | 'densitymapbox', 'funnel', 'funnelarea', |
| 30 | 'heatmap', 'histogram', 'histogram2d', |
| 31 | 'histogram2dcontour', 'icicle', 'image', |
| 32 | 'indicator', 'isosurface', 'mesh3d', 'ohlc', |
| 33 | 'parcats', 'parcoords', 'pie', 'sankey', |
| 34 | 'scatter', 'scatter3d', 'scattercarpet', |
| 35 | 'scattergeo', 'scattergl', 'scattermap', |
| 36 | 'scattermapbox', 'scatterpolar', |
| 37 | 'scatterpolargl', 'scattersmith', |
| 38 | 'scatterternary', 'splom', 'streamtube', |
| 39 | 'sunburst', 'surface', 'table', 'treemap', |
| 40 | 'violin', 'volume', 'waterfall'] |
| 41 | |
| 42 | - All remaining properties are passed to the constructor of |
| 43 | the specified trace type |
| 44 | |
| 45 | (e.g. [{'type': 'scatter', ...}, {'type': 'bar, ...}]) |
| 46 | |
| 47 | layout |
| 48 | The 'layout' property is an instance of Layout |
| 49 | that may be specified as: |
| 50 | - An instance of :class:`plotly.graph_objs.Layout` |
| 51 | - A dict of string/value properties that will be passed |
| 52 | to the Layout constructor |
| 53 | |
| 54 | frames |
| 55 | The 'frames' property is a tuple of instances of |
| 56 | Frame that may be specified as: |
| 57 | - A list or tuple of instances of plotly.graph_objs.Frame |
| 58 | - A list or tuple of dicts of string/value properties that |
| 59 | will be passed to the Frame constructor |
| 60 | |
| 61 | skip_invalid: bool |
| 62 | If True, invalid properties in the figure specification will be |
| 63 | skipped silently. If False (default) invalid properties in the |
| 64 | figure specification will result in a ValueError |
no outgoing calls