Uh oh!
There was an error while loading. Please reload this page.
added option to download an image of the most recent plot - #494
Conversation
Made the inline download method a part of the Note: This can be applied to other methods later on, could also put the script injection into another function similar to The previous method allowed you to download the plot that was most recently plotted and this wouldn't run when the notebook was rerun. |
This reverts commit b2f9db9.
Demo of the functionality (for Issue #483): Right now have I have two ways of downloading the plot: The first way involves adding a few keyword arguments to existing
(offline.download_notebook_image) @jackparmer@cldougl@chriddyp |
yankev
commented
Jun 7, 2016
You can also find some notebooks to test the functionality here: Note: This will only wok in Firefox, the fix for Chrome will come when this fix get's released. |
jackparmer
commented
Jun 7, 2016
Hey @yankev -
|
jackparmer
commented
Jun 7, 2016
We may want to print a message also in Jupyter notebook:
I'm worried we're going to get a lot of complaints that the client-side image export is not sufficiently fully featured, because folks don't realize we have also have a full-blown server just for image export. |
yankev
commented
Jun 11, 2016
@theengineear Addressing some concerns: I have the condition to check whether the page is loaded before injecting the download script, so on page reloads/re-opening the notebook, the confirm and download prompts shouldn't show up. |
theengineear
commented
Jun 13, 2016
Sweet! Taking a peek right now. |
| check_end = '}}' | ||
| elif type == 'plot': | ||
| check_start = '' | ||
| check_end = '' |
There was a problem hiding this comment.
🐄
else:
raise SomeException( .. )
?
theengineear
commented
Jun 13, 2016
Great! Let's do it! 💃 after you've considered my comments. |
…of `get_image_download_script`
@theengineear k, should be good. I put in a neat check to find the the name of the caller of |
| def image_download_script(type): | ||
| def get_image_download_script(caller): | ||
| ''' |
There was a problem hiding this comment.
🐄 We typically use """, not ''' for docstrings.
theengineear
commented
Jun 14, 2016
@yankev sorry to be a party 💩-er, but I think you should stick with the more straight-forward implementation for inferring who called the function. If it makes you feel better, you could use |
… caller of `get_image_download_script`" This reverts commit 0582283.
yankev
commented
Jun 15, 2016
@theengineear k seems to be in working shape. Let me know if there's anything else. |
theengineear
commented
Jun 15, 2016
Beep, boop, 💃. Nice work! |
yankev
commented
Jun 15, 2016
@theengineear thanks man! This was a super messy one, so many avoidable errors. Thanks for reviewing it! |



Uh oh!
There was an error while loading. Please reload this page.