在Pycharm中使用Matplotlib中的pyplot时,运行代码报错:
MatplotlibDeprecationWarning: Support for FigureCanvases without a required_interactive_framework attribute was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
解决方法
File -> Settings -> Tools -> Python Scientific -> 取消 Show plots in tool window
代码后面加上 plt.show()
取消 Show plots in tool window,后,将以弹框的形式展示