@jheinen Exactly! I mostly work on the repl and your code seems like a good example of my workflow. This code is functional and figure are saved to disk. The only problem I experience now is that if I close the window where my plot is displayed, the next time I use the command plot a new window doesn't show up (with the pyplot backend a new window pop up when I plot something). Yet I can continue plotting and saving figures to disk correctly.