Saved Matplotlib plot not displayed or detected
According to the Repl.it documentation it’s possible to save a Matplotlib plot to a file from Python with code such as
plt.savefig('plot.png') so that the environment detects the file and displays it in a preview pane. However, this doesn’t seem to work with other Matplotlib-based libraries such as Poliastro.
Poliastro is an astrodynamics Python package that uses Matplotlib’s plotting features. In a fresh Python 3 REPL I install Poliastro from the package manager. Then I evaluate in the REPL the following lines of code on the home page of Poliastro’s documentation site, one after the other:
Finally I evaluate:
From the shell I can see the saved
molniya.png plot file with
However, the plot is not displayed in a preview pane and the file is missing from the file tree, which doesn’t make it possible to save it locally or otherwise export it from Repl.it.
What am I doing wrong? Is this a Repl.it issue?