Skip to content

plotly.offline.iplot - Option to save to a file and embed link in notebook #1469

Closed
@Nikolai-Hlubek

Description

@Nikolai-Hlubek

Dear all

The following use case:
I use jupyter with plotly. In some notebooks we plot large amount of data > 1e6 points. Embedding the plot directly in the notebook causes the notebooks to get very large > 100Mb.
This causes issues with

The following solution seems to solve these issues for me:

filename = 'results/foo.html'
plotly.offline.plot(fig, filename=filename)
IPython.display.display(IPython.display.IFrame(src=filename, width=1200, height=800))

This saves the picture to an external file and embeds the contents of this file in Jupyter, therefore bypassing all issues mentioned above. Since googling showed that other users sometimes have similar issues maybe it is a good idea to add the above code to plotly.offline.iplot and make it available via a option?

Best regards
Nikolai

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions