Running matplotlib in tkinter

前端 未结 1 970
刺人心
刺人心 2020-12-13 09:59

I have this beautiful sphere I made in matplotlib. How would I go about putting it in a tkinter frame widget? It\'d be nice to be able to integrate it into an existing tkint

相关标签:
1条回答
  • 2020-12-13 10:29

    Have a look at the examples for embedding plots in a tk GUI, it should be enough to get you started in the right direction.

    user_interfaces example code: embedding_in_tk.py

    user_interfaces example code: embedding_in_tk2.py

    As for removing the toolbar, it's a case of not adding it when you are embedding plots in a GUI.

    If you are using matplotlib.pyplot the toolbar will be created automatically for every figure. If you are writing your own user interface code, you can add the toolbar as a widget.

    0 讨论(0)
提交回复
热议问题