Main Content

shg

Show current figure

Syntax

Description

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).

Examples

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

MATLAB desktop with a figure in foreground

See Also

| |

Introduced before R2006a