You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在Chapter09的MatplotlibWidget.py文件运行报错,信息如下: File "C:\Users\bisho\Downloads\Compressed\PyQt5-master\PyQt5-master\Chapter09\MatplotlibWidget.py", line 27, in init self.axes.hold(False) # 每次绘图的时候不保留上一次绘图的结果 AttributeError: 'AxesSubplot' object has no attribute 'hold'。
这是matplotlib的问题吗?请问具体怎么解决?
---原始邮件---
发件人: "Xenon-Xu"<notifications@github.com>
发送时间: 2020年6月5日(周五) 下午5:24
收件人: "cxinping/PyQt5"<PyQt5@noreply.github.com>;
抄送: " 《Python 数据分析:基于 Plotly 的动态可视化绘图》源代码"<1535327967@qq.com>;"Comment"<comment@noreply.github.com>;
主题: Re: [cxinping/PyQt5] Chapter09的MatplotlibWidget.py文件运行报错 (#13)
self.axes.hold(False) 将这句话去掉
每次绘图前调用 self.axes.clear() 清除上一次绘图就行
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Activity
sunshe35 commentedon Sep 16, 2019
你的matplotlib版本太新了,我用2.1.2的版本没有问题。
这种bug一般是版本问题,时间长了就能自动排除。
Xenon-Xu commentedon Jun 5, 2020
self.axes.hold(False) 将这句话去掉
每次绘图前调用 self.axes.clear() 清除上一次绘图就行
sunshe35 commentedon Jun 5, 2020