molplotly
molplotly copied to clipboard
Saving interactive plots
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:
- separate integration building on top of
mpl3d
(seems overkill, might be the last resort) - Building upon this gist to export the Dash as HTML: https://gist.github.com/exzhawk/33e5dcfc8859e3b6ff4e5269b1ba0ba4
- Faerun-style solution, see here: https://github.com/reymond-group/faerun-python
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!
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.
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
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.