繁体   English   中英

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

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

当我使用下面的代码在 jupyter 中绘制图形时,我可以按“下载图”并获得预期的 png。 但是,当我在下载 plot 之前使用“平移”或“缩放”时,会出现一些失真甚至空白的图像,如下图所示。

我正在使用 Firefox 84.0、Jupyter 6.03 和 Python 3.8.3。

有谁知道如何解决这个问题?

编辑:我重新安装了 Anaconda,它将 Jupyter 更新到 6.1.4。 现在一切正常。

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)

扭曲的图像:图像失真

我重新安装了 Anaconda,它将 Jupyter 更新到 6.1.4。 现在一切正常。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM