21 lines
825 B
Markdown
21 lines
825 B
Markdown
|
## Single Matplotlib Plot
|
||
|
|
||
|
This is your basic simple Matplotlib example
|
||
|
|
||
|
What's nice about this demo is that it shows all of the parts required and each section is tiny
|
||
|
|
||
|
You will paste your Matplotlib code at the top. The important thing to do is leave your drawing in a variable named `fig`
|
||
|
|
||
|
There is a "helper" function in the middle.
|
||
|
|
||
|
The bottom portion of the file is your GUI. There is only 1 line of code needed to take your Matplotlib drawing and place it into your GUI window. It is the call to `draw_figure`.
|
||
|
|
||
|
This is how your window looks on Windows:
|
||
|
|
||
|
|
||
|
![SNAG-0785.jpg](/api/files/5eb32cdb9af9c00e0b885f62/snag-0785.jpeg "SNAG-0785.jpg")
|
||
|
|
||
|
|
||
|
|
||
|
<iframe src='https://trinket.io/embed/pygame/4c1ecb316a?start=result' width='100%' height='600' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|