Draw plotly graphs inside an IPython or Jupyter notebook figure_or_data -- a plotly.graph_objs.Figure or plotly.graph_objs.Data or dict or list that describes a Plotly graph. See https://plot.ly/python/ for examples of graph
(
figure_or_data,
show_link=False,
link_text="Export to plot.ly",
validate=True,
image=None,
filename="plot_image",
image_width=800,
image_height=600,
config=None,
auto_play=True,
animation_opts=None,
)
| 291 | |
| 292 | |
| 293 | def iplot( |
| 294 | figure_or_data, |
| 295 | show_link=False, |
| 296 | link_text="Export to plot.ly", |
| 297 | validate=True, |
| 298 | image=None, |
| 299 | filename="plot_image", |
| 300 | image_width=800, |
| 301 | image_height=600, |
| 302 | config=None, |
| 303 | auto_play=True, |
| 304 | animation_opts=None, |
| 305 | ): |
| 306 | """ |
| 307 | Draw plotly graphs inside an IPython or Jupyter notebook |
| 308 | |
| 309 | figure_or_data -- a plotly.graph_objs.Figure or plotly.graph_objs.Data or |
| 310 | dict or list that describes a Plotly graph. |
| 311 | See https://plot.ly/python/ for examples of |
| 312 | graph descriptions. |
| 313 | |
| 314 | Keyword arguments: |
| 315 | show_link (default=False) -- display a link in the bottom-right corner of |
| 316 | of the chart that will export the chart to |
| 317 | Plotly Cloud or Plotly Enterprise |
| 318 | link_text (default='Export to plot.ly') -- the text of export link |
| 319 | validate (default=True) -- validate that all of the keys in the figure |
| 320 | are valid? omit if your version of plotly.js |
| 321 | has become outdated with your version of |
| 322 | graph_reference.json or if you need to include |
| 323 | extra, unnecessary keys in your figure. |
| 324 | image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets |
| 325 | the format of the image to be downloaded, if we choose to download an |
| 326 | image. This parameter has a default value of None indicating that no |
| 327 | image should be downloaded. Please note: for higher resolution images |
| 328 | and more export options, consider using plotly.io.write_image. See |
| 329 | https://plot.ly/python/static-image-export/ for more details. |
| 330 | filename (default='plot') -- Sets the name of the file your image |
| 331 | will be saved to. The extension should not be included. |
| 332 | image_height (default=600) -- Specifies the height of the image in `px`. |
| 333 | image_width (default=800) -- Specifies the width of the image in `px`. |
| 334 | config (default=None) -- Plot view options dictionary. Keyword arguments |
| 335 | `show_link` and `link_text` set the associated options in this |
| 336 | dictionary if it doesn't contain them already. |
| 337 | auto_play (default=True) -- Whether to automatically start the animation |
| 338 | sequence on page load, if the figure contains frames. Has no effect if |
| 339 | the figure does not contain frames. |
| 340 | animation_opts (default=None) -- Dict of custom animation parameters that |
| 341 | are used for the automatically started animation on page load. This |
| 342 | dict is passed to the function Plotly.animate in Plotly.js. See |
| 343 | https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js |
| 344 | for available options. Has no effect if the figure |
| 345 | does not contain frames, or auto_play is False. |
| 346 | |
| 347 | Example: |
| 348 | ``` |
| 349 | from plotly.offline import init_notebook_mode, iplot |
| 350 | init_notebook_mode() |
no test coverage detected