fig.canvas.set_window_title(window_title)
替换成
fig.canvas.manager.set_window_title(window_title)
原因是matplotlib版本变动,主要是在前面加一个manager,如果有好几个需要替换就加上manger就可以了
FigureCanvas.get_window_title() and FigureCanvas.set_window_title();
use
FigureManagerBase.get_window_title
or FigureManagerBase.set_window_title if using pyplot,
or use GUI-specific methods if embedding.