12 lines
637 B
Markdown
12 lines
637 B
Markdown
|
This demonstration shows how to use PySimpleGUI's Graph Element's drawing primitives to create a simple animation.
|
||
|
|
||
|
In this case a Bubble Sort and an Insert Sort are shown. Other sorting algorithms can be easily added. You can adjust the speed in realtime by using the slider.
|
||
|
|
||
|
This is how it looks on Windows:
|
||
|
|
||
|
![sorting faster.gif](/api/files/5de69342320e694563d5136a/sorting-faster.gif "sorting faster.gif")
|
||
|
|
||
|
Here on Trinket the animation may not be as smooth
|
||
|
|
||
|
<iframe src='https://trinket.io/embed/pygame/91808cb432?start=result' width='100%' height='800' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|