newplot

Purpose

Graphics M-file preamble to complement the NextPlot property.

Synopsis

h = newplot

Description

h = newplot is a standard command for the beginning of any graphics M-file function that uses low-level object creation commands to draw graphs. newplot uses the NextPlot property of figures and axes to determine where to place the graph. For the figure NextPlot property:

  • If NextPlot is 'new', open a new figure.
  • If NextPlot is 'replace', clear and reset the current figure.
    For the axes NextPlot property:

  • If NextPlot is 'new', open a new axes.
  • If NextPlot is 'replace', clear and reset the current axes.
    newplot returns a handle to the appropriate axes.

    See Also

     axes, figure, hold, ishold
    

    (c) Copyright 1994 by The MathWorks, Inc.