Show Sidebar Hide Sidebar

Embedding Graphs in HTML in Python

How to embed plotly graphs with an iframe in HTML.

Plotly graphs can be embedded in any HTML page. This includes IPython notebooks, Wordpress sites, dashboards, blogs, and more.

For more on embedding Plotly graphs in HTML documents, see our tutorial.

From Python, you can generate the HTML code to embed Plotly graphs with the function.

In [1]:
import as tls

'<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="" height="525" width="100%"></iframe>'