Flattened ecookbook.... nothing official... testing some things out...

This commit is contained in:
PySimpleGUI 2022-06-30 15:43:56 -04:00
parent 05fd8ca891
commit 0574702876
109 changed files with 0 additions and 0 deletions

View file

@ -1 +0,0 @@
<iframe src="https://trinket.io/embed/pygame/aef3bd845c" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

View file

@ -1,17 +0,0 @@
**Browse Matplot Examples - Click on list, See the Plot**
This Demo Program was adapted to run on Trinket by shrinking down the size of the display window from 650,650 to 500,500. Shrinking the area makes the plots look a little crowded.
These screenshots are from Windows. Click on the list on the left to view a plot.
![SNAG-0634.jpg](/api/files/5e0a152992f24fc47d8b9ed9/snag-0634.jpeg "SNAG-0634.jpg")
Slide up the "pane" on the bottom to reveal the source code for the plot you're viewing.
![SNAG-0635.jpg](/api/files/5e0a153192f24fc47d8b9eed/snag-0635.jpeg "SNAG-0635.jpg")
Your application doesn't have to be this fancy. You could display your raw data in the hidden pane so that you can slide it up and view the underlying data.
<iframe src='https://trinket.io/embed/pygame/5585dc51c4?start=result' width='100%' height='600' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>

View file

@ -1,20 +0,0 @@
This demo program shows how to create a single Matplotlib graph and show it in a GUI window.
Note the it lacks an "Event Loop".
Normally instead of:
```python
event, values = window.read()
```
You would see an event loop:
```python
while True:
event, values = window.read()
if event is None:
break
```
If you wanted to show multiple graphs or have other GUI elements, then you would replace that line of code with the event loop above and you'll have a "Normal" PySimpleGUI window.
<iframe src="https://trinket.io/embed/pygame/4602ef03b1" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

View file

@ -1,20 +0,0 @@
## 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>