Downloading thousands of plots from a server sage notebook?

asked 2020-12-01 19:28:27 +0200

TheHiggsBozo gravatar image

updated 2020-12-02 21:24:42 +0200

Hello! I made a few thousand 2D plots on an online sage notebook (legacy notebook, not jupyter). They are stored in a list. The computation took over a week and I'd like to avoid having to rerun.

What's the best way to download all of these plots as PNG files?

In the past, I have hacked it by looping over the list and .show()'ing the plots, downloading the notebook's HTML file, and cutting the plots from the directory (don't laugh). Usually showing a few hundred plots takes a while to show and I'm worried it may run out of memory and crash in this case.

Thanks in advance!

Edit: I should also mention I am not an admin on the server.

edit retag flag offensive close merge delete

Comments

Suggestion : find in which directory your notebook files lives, and un-archive them (they are just compressed archives). You may see the pictures there.

FrédéricC gravatar imageFrédéricC ( 2020-12-02 19:08:59 +0200 )edit

Thanks for the reply. Unfortunately I am not an administrator on the server. Is there a way around this?

TheHiggsBozo gravatar imageTheHiggsBozo ( 2020-12-02 21:24:02 +0200 )edit

In what format do you have the plots? Is it something like L = [plot(sin(x), (x, 0, 10)), plot(cos(x), (x, 0 10)), ...]? If so, you could try the save or save_image methods for plots. Test with p = L[0] and then p.save(...) or p.save_image(...).

John Palmieri gravatar imageJohn Palmieri ( 2020-12-04 01:41:28 +0200 )edit