FigureCanvasAgg' object has no attribute 'invalidate' ? python plotting

后端 未结 6 863
无人及你
无人及你 2021-02-05 12:19

I\'ve been following \'python for data analysis\'. On pg. 345, you get to this code to plot returns across a variety of stocks. However, the plotting function does not work for

6条回答
  •  无人共我
    2021-02-05 13:09

    Not an answer but I can't figure out how to put code block in comments :)

    So I got to this question because the exact same thing was happening on my Mac

    /Users/briford/myPVE/workbench/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.pyc in draw_if_interactive()
        227         figManager =  Gcf.get_active()
        228         if figManager is not None:
    --> 229             figManager.canvas.invalidate()
        230 
    AttributeError: 'FigureCanvasAgg' object has no attribute 'invalidate'
    

    Anyway I know it's not satisfying but just doing a shutdown of my ipython notebook service and doing a restart cleared it up... shrug...

提交回复
热议问题