简体   繁体   English

在jupyter notebook中使用matplotlib的“下载图”function时图像失真

[英]Distorted images when using the "download plot" function of matplotlib in jupyter notebook

when I am plotting a graph in jupyter with the code below, I can press "download plot" and get the expected png.当我使用下面的代码在 jupyter 中绘制图形时,我可以按“下载图”并获得预期的 png。 However, when I use "pan" or "zoom" before downloading the plot, i get some distorted or even blank images like in the image below.但是,当我在下载 plot 之前使用“平移”或“缩放”时,会出现一些失真甚至空白的图像,如下图所示。

I am using Firefox 84.0, Jupyter 6.03 and Python 3.8.3.我正在使用 Firefox 84.0、Jupyter 6.03 和 Python 3.8.3。

Does anyone know how to fix that?有谁知道如何解决这个问题?

Edit: I reinstalled Anaconda which updated Jupyter to 6.1.4.编辑:我重新安装了 Anaconda,它将 Jupyter 更新到 6.1.4。 Now everything works as it should.现在一切正常。

import matplotlib.pyplot as plt
%matplotlib notebook

x = [1,2,3,4,5,6]
y = [4,2,7,15,17,11]

fig, ax = plt.subplots()
ax.plot(x,y)

The Distorted Image:扭曲的图像:图像失真

I reinstalled Anaconda which updated Jupyter to 6.1.4.我重新安装了 Anaconda,它将 Jupyter 更新到 6.1.4。 Now everything works as it should.现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 jupyter“%matplotlib notebook”没有显示情节 - jupyter “%matplotlib notebook” not showing plot Matplotlib 不会在 Jupyter Notebook 中显示图像 - Matplotlib will not show images in Jupyter Notebook 尝试使用matplotlib内联进行绘图时,为什么在jupyter笔记本中出现NonGuiException? - Why do I get NonGuiException in jupyter notebook when trying to plot using matplotlib inline? 使用魔法时看不到在 Jupyter 笔记本中创建的 plot:%matplotlib 笔记本。 Windows 10 和铬 - Not possible to see the plot created in Jupyter notebooks when using magic: %matplotlib notebook. Windows 10 and Chrome 在 Jupyter Notebook 中使用 matplotlib 绘制动态变化的图形 - Plot dynamically changing graph using matplotlib in Jupyter Notebook 使用 %matplotlib 笔记本时修复 Jupyter 笔记本中的绘图 - Fixing plots in Jupyter notebook when using %matplotlib notebook matplotlib如何创建情节并将其交付给Jupyter Notebook? - how matplotlib create and deliver plot to jupyter notebook? 如何禁用Jupyter笔记本matplotlib内联? - How to DISABLE Jupyter notebook matplotlib plot inline? Jupyter Notebook + Matplotlib; 在plot.show()上冻结 - Jupyter Notebook + Matplotlib; Freeze on plot.show() matplotlib在jupyter笔记本中并排显示图像 - matplotlib show images side by side in jupyter notebook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM