Skip to content

figure

Create or activate a chart sheet (figure window).

h = figure
h = figure(nFigID)
h = figure(nFigID, name, value, ...)

Creates a new chart sheet (or activates an existing one with id nFigID) and returns a handle. Subsequent plotting commands target the active figure. Trailing name-value pairs set figure properties.

figure % new figure with auto-assigned id
figure(2) % activate or create figure 2
  • axes — Create or activate axes within a figure.
  • subplot — Create or activate one of multiple axes in a grid.
  • clf — Clear the current figure.
  • gcf — Handle to the current figure.