Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving interactive plots #4

Open
jannisborn opened this issue Feb 16, 2022 · 3 comments
Open

Saving interactive plots #4

jannisborn opened this issue Feb 16, 2022 · 3 comments

Comments

@jannisborn
Copy link
Contributor

Thanks for the great package!

It would be fantastic if the interactive plots could be exported/saved. I understand that this is non-trvial in plotly, but other libraries like mpl3d also allow to export as interactive HTML or SVG. See here for an exemplary plot. Also TMAP and Faerun support this natively.
I think it will be a heavily sought-after feature for real usability of this package.

Possible solutions:

@wjm41
Copy link
Owner

wjm41 commented Feb 16, 2022

Thanks for the suggestions! I agree that being able to save plots would make a huge difference - hopefully it's possible to build upon the gist you linked and include the molecule images by generating them all in one go (right now they are created on-the-fly). Will let you know how it goes!

@remseven
Copy link

A way around this limitation which was suitable for our specific application was to set up a multi-user Jupiter Notebook server via JupiterHub server. There, a notebook can be run with the plots of interest using the following mode:

app.run_server(mode='jupyterlab',host='0.0.0.0', port=8050, height=800, debug=False, proxy=None, use_reloader=False)

The plot can then be seen in a new tab at your.server.adress.com:8050

The drawback is that you have to set up a server.

@shortydutchie
Copy link

shortydutchie commented Aug 31, 2023

Love molplotly but flexible integration in user pages would be great!

Could it be integrated along the lines of the plot() functionality of plotly.offline. The plot() function can be used to generate eg. a

html section. This can be easily plugged into a user html page without need for additional servers (I use it with Django a lot - just dump it into a page).

Can see the memory issues, but I'll live with that...

Also - is there documentation of the run_server() function?
Is there a timeout option perhaps - I can start a run_server process but how do I terminate these after a set time if I have multiple users generating multiple plots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants