matplotlib 使用什么 GUI 库?

pkq*_*xdd 2 python user-interface matplotlib python-3.x

从外观来看matplotlib,我猜它正在使用PyQt;但是当我查看它的代码时,我没有发现它根本导入任何GUI库。那么,到底用什么matplotlib来显示图形(例如,调用时的窗口plt.show())?

Old*_*ide 6

您可以通过以下方法判断 matplotlib 正在使用哪个后端get_backend()

matplotlib.get_backend()
Run Code Online (Sandbox Code Playgroud)

您可以使用以下命令查看所有可用后端的列表rcsetup.all_backends

matplotlib.rcsetup.all_backends
Run Code Online (Sandbox Code Playgroud)