Show current figure
shg
example
shg makes the current figure visible and places it in front of all other figures on the screen. This is identical to using the command figure(gcf).
figure(gcf)
collapse all
From the Command Window, create a figure with a plot. The figure appears on the screen.
plot(1:10)
Add a title to the axes. Notice that the figure goes behind the Command Window. To bring the figure forward and make it visible, call shg.
title('My Plot') shg
figure | gca | gcf
figure
gca
gcf