+ 1
How to output matplotlib plots? [Solved]
My code has animated plot in Python. However, it seems that plots don't show here. I saw people using PLT.savefig("name") to plot a regular plot. https://code.sololearn.com/c47q4TPxZww0/?ref=app
4 ответов
+ 5
On Sololearn if you create a .png file during runtime it will get displayed after your program runs. Almost any image type will get recognized as long as you name it with a .png extension.
Here is a simple demo that displays an animated GIF. (It was the first user-written Python program to do so on Sololearn).
https://code.sololearn.com/c10iqZtr0FJw/?ref=app
+ 3
Juan You only have one option, save the animation as a gif and rename it to png
https://code.sololearn.com/cWrQTiGVB73R
+ 2
Juan With plt.savefig(), you can save and show the graph/plot. All other graphics, including animations, are not supported in Sololearn
+ 1
Thanks! I mostly fixed it now.