[英]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.