Supress image showing until called on Live Script
6 visualizzazioni (ultimi 30 giorni)
I essentially want to create figures on the livescript, but not have them show up on the output location until called on later. As in, create and edit all of the plots first, assign figure number/labels to them, but only have them appear on the output line when called on in a "discussion" section at the end of the livescript.
I have tried using what is usually suggested, which I assume works well for normal scripts:
% and later on
However, the figures still show up on the output line. The only solution I have found is using 'close(fig_label)', but it doesn't seem like I can re-open the figure later.
I assume a solution is creating functions for each individual plot, but I was hoping for something a bit more elegant than that.
Maximilian Schönau il 3 Gen 2021
Modificato: Maximilian Schönau il 3 Gen 2021
A quite simple workaround would be, if you save the figure you want to be invisible, then close it and open it again from a file when you need it:
% Example Plot
% do some work
x = 1;
y = 2;
% now open plot again