How can I keep my GUI invisible while plotting?

T
techsmith · Sep 2, 2020 · 2.3K views
Question
In my GUI, I run 2 plots on separate axes in OpeningFcn. When The GUI becomes visible, one has been plotted (the first one in the code) but the other axes are blank momentarily while it waits for the plot to finish. This looks very sloppy - how can I make the GUI wait until both plots are finished before it becomes visible?
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 23, 2026

In the opening function

set(handles.figure1,'visible','off');

Then when you're done with all of that plotting stuff:

 

set(handles.figure1,'visible','on');,/pre>

Note: figure1 is the default GUIDE tag; you will have to use whatever tag you defined the figure by.

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!