ecookbook restoring the folders for testing...
This commit is contained in:
parent
0574702876
commit
9f40a47d30
109 changed files with 0 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
<iframe src="https://trinket.io/embed/pygame/aef3bd845c" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
|
17
docs/eCookbook/matplotlib/matplotlib-plot-browser.md
Normal file
17
docs/eCookbook/matplotlib/matplotlib-plot-browser.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
**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.
|
||||
|
||||

|
||||
|
||||
Slide up the "pane" on the bottom to reveal the source code for the plot you're viewing.
|
||||
|
||||

|
||||
|
||||
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>
|
20
docs/eCookbook/matplotlib/matplotlib-simple-plot.md
Normal file
20
docs/eCookbook/matplotlib/matplotlib-simple-plot.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
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>
|
20
docs/eCookbook/matplotlib/matplotlib-single-plot.md
Normal file
20
docs/eCookbook/matplotlib/matplotlib-single-plot.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
## 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:
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
<iframe src='https://trinket.io/embed/pygame/4c1ecb316a?start=result' width='100%' height='600' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|
Loading…
Add table
Add a link
Reference in a new issue