-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Offline way to programmatically save graph as PNG? #483
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
Comments
@evrenkutar Currently the procedure in which we turn plots into static images requires communication with our servers. |
@evrenkutar @yankev If you're using Jupyter notebook, you should be able to access this toImage() routine programmatically in Python: |
Chrome under Windows 10 is not working with image download (both programmatically and using mouse to click the camera thumbnail) |
@hyliu1989 Thanks for the reminder. We should be pushing a new version up on |
docs of offline image exporting can be found here: https://plot.ly/python/static-image-export/#export-static-image-offline |
@cldougl This currently opens a web browser which requests to safe the picture. If you try to export multiple PNGs this is not really a usable way. It would be nice to directly export as PNG file from python. Could you please reopen this issue? As a workaround I found this post which converts the data into matlab. However this did not work for me with the latest plotly version. |
yes, please!! I need to programmatically create heatmaps from 2000+ Pandas data frames. having each open up in a browser is not tractable, in my opinion. thanks! |
Since this has the most unique users of issues requesting this (there are several), would anyone here be capable to implement something if the plotly team sketched a possible method? As all of the closed issues suggest, they probably aren't going to do this... but perhaps we could. This was my pitch in the newest incantation of this request, #880 . Perhaps if you show your support via programming chops we can get a direction to take and collaborate? |
@jwhendy I hope something comes off this. I'm definitely willing to help, but I don't have any previous experience of contributing source code even in Python. JavaScript is something I've just started learning. So, may be limited in what I can do! I do think this is a key feature that plotly is lacking, potentially even one that prevents a large population of data analysts from adopting plotly. I use plotly to probe all of my data since it's interactive, and then I have to use matplotlib to save them as plots to share with my colleagues because I'm generating hundreds of plots at a time!! |
@bluprince13 see the most recent post at #880. I was able to make some progress on two potential methods. Feel free to try them out! I'm hoping @cldougl suggests a place one of them could fit in the library, and I'll make a pull request. Likely this will require someone more advanced than me to take a look and give input. |
Update on this issue from Plotly: #880 (comment) |
FYI this is now possible with one line after setting your data and figure: edit [051518]: actually this doesn't work :/ data = Data([tasks, tasks2, tasks3]) It saves to the /Downloads directory. https://gist.github.com/eagleEggs/c441ffa88a90a8a360d771fae3ba2d8e Looking for a way to change that default directory currently... |
Really need this |
Update: Offline programmatic static image export support has been released in 3.2.0: See https://medium.com/@plotlygraphs/plotly-py-end-of-summer-updates-5422c98b9058 |
Hi, i am using plotly and like it.
I need to save graphs i created at server side as PNG images using plotly offline. Is there a way to do it?
The text was updated successfully, but these errors were encountered: