Is there a way to tell matlab that set(gcf,'Visible','off') actually means don't show figures?
Show older comments
Unfortunately my code is sufficiently complex that I can't provide an MWE, but when I turn gcf Visibility off, using `set(gcf,'Visible','off') ` and then create a patch object, the patch object flashes on for an instant then turns off again. This is a problem, since I'm creating a large number of patch objects. Is there some command that actually turns Visibility off rather than flashing the patch on and off?
Thanks!
4 Comments
Ameer Hamza
on 23 Oct 2020
I tried it on R2020b on mac and didn't see this problem. Try using software opengl; maybe that will fix the issue
opengl software
Walter Roberson
on 23 Oct 2020
set(gcf,'Visible','off')
would flash every time it got executed. You should record the figure handle as early as you can and provide the recorded value. Search also for tag:always-parent in the Search Answers box.
Leo Simon
on 23 Oct 2020
Bruno Luong
on 23 Oct 2020
Edited: Bruno Luong
on 23 Oct 2020
Can't reproduce what you post, I don't see any flash with this code
clear
close all
h=figure;
fprintf('Type Ctrl C when you have enough\n')
set(h,'Visible','off')
ax=axes(h);
while true
surf(ax,peaks);
pause(0.1);
end
What is your minimal working example code? It leads nowhere if you can't provide MWE.
Answers (0)
Categories
Find more on Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!