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
matplotlib + jupter notbook: %matplotlib notebook failed to download figures. #9117
Comments
I see a similar problem when using
I believe this is due to this change in Chrome: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/GbVcuwg_QjM Some relevant version information:
|
It is very odd that IPython is trying to import Qt. I could not reproduce this with a fresh installation, do you have any configuration on the IPython side that would be trying to use qt? attn @Carreau |
Hum I'm unsure why it would start the qt eventloop as well, and can't reproduce here either. |
@wjt - I am experiencing the exact same problem. Have you found an easy workaround for this issue? My current workaround is to close the figure using the X button on the top right and then saving the non-interactive image. matplotlib==1.5.3 |
I'm getting the same problem. I'm on windows 10 and using chrome 62. installed everything with conda. |
I am still experiencing this issue with
I also have this error in the about:blank page when looking at the chrome developer tools console:
|
I have the same, windows 10 |
The current download button can't work anymore in Chrome since they removed the ability for pages to open "data:" URIs: https://developers.google.com/web/updates/2017/03/chrome-58-deprecations#remove_content-initiated_top_frame_navigations_to_data_urls https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/js/nbagg_mpl.js#L34 does exactly what is not allowed by Chrome and calls |
And Firefox specifically allows opening |
I've created a button in my Jupyter Notebook to save figures. Is there anyway I could replace the backend function for the Matplotlib's "Download" button with my own save figure function? This would get around having to use Firefox for save figures with the built-in "Download" button. This is my current button and save function code. import matplotlib.pyplot as plt
from ipywidgets import widgets
from tkinter import Tk
from tkinter import filedialog as fd
%matplotlib notebook
fig, ax = plt.subplots()
ax.plot([1,2,3],[4,5,6])
button = widgets.Button(description="Save Figure")
display(button)
def save_figure(b):
Tk().withdraw() # create and withdraw root window
save_name = fd.asksaveasfilename()
if save_name:
fig.savefig(save_name)
button.on_click(save_figure) |
This issue still persists. I run Jupyter in Pycharm and I cannot download my figures. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Bug report
Bug summary
Using jupter notebook with matplotlib, (%matplotlib notebook), the bottom "Download" under the figure frame does not work.
Code for reproduction
Then a frame with bottoms like "Zoom", "Download" appears in the notebook. But I push the "Download", there is not figure out and the errors in the terminal are:
Actual outcome
Expected outcome
As before, a new web page will open and the figure should be appears in it.
Matplotlib version
The text was updated successfully, but these errors were encountered: