Remove Figure window from appearing at all in program
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ian Bunker
am 13 Mai 2021
Beantwortet: Walter Roberson
am 13 Mai 2021
Hi,
I (beginner in matlab) have a loop that plots multiple graphs and then saves them as png's in my code. I have looked at other answers and they mention code such as
fig1 = figure(1, 'Visible', 'off');
The loop I have eventually generates around 100 graphs for my data set. My concern is that by displaying or attempting to display each plot it unneccsarily slows down the code.
Does setting the visible to off keep it from wasting processing time generating these figures to the screen/at all?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/617083/image.png)
Any simplification advice on the code would be great, I am still learning about matlab and coding in general.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 13 Mai 2021
Correct, if you set a figure visibility off, then the sequence of code you use will not display it to the screen but will save it to the file.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!