MATLAB Function Reference | Search  Help Desk |
newplot | See Also |
Determine where to draw graphics objects
newplot h = newplot
newplot
prepares a Figure and Axes for subsequent graphics commands.
h = newplot
prepares a Figure and Axes for subsequent graphics commands and returns a handle to the current Axes.
Use newplot
at the beginning of high-level graphics M-files to determine which Figure and Axes to target for graphics output. Calling newplot
can change the current Figure and current Axes. Basically, there are three options when drawing graphics in existing Figures and Axes:
NextPlot
properties determine how nextplot
behaves. The following two tables describe this behavior with various property values.
First, newplot
reads the current Figure's NextPlot
property and acts accordingly: NextPlot |
What Happens |
|
Draw to the current Figure without clearing any graphics objects already present. |
|
Remove all child objects whose HandleVisibility property is set to on and reset Figure NextPlot property to add . This clears the current Figure and is equivalent to issuing the clf command. |
replace |
Remove all child objects (regardless of the setting of the HandleVisibility property) and reset Figure properties to their defaults, except:NextPlot is reset to add regardless of user-defined defaults)
Units , PaperPosition , and PaperUnits are not reset
clf reset command. |
newplot
establishes which Figure to draw in, it reads the current Axes' NextPlot
property and acts accordingly:NextPlot |
Description |
|
Draw into the current Axes, retaining all graphics objects already present. |
|
Remove all child objects whose HandleVisibility property is set to on , but do not reset Axes properties. This clears the current Axes like the cla command. |
|
Removes all child objects (regardless of the setting of the HandleVisibility property) and resets Axes properties to their defaults, except Position and Units This clears and resets the current Axes like the cla reset command. |
axes
, cla
, clf
, figure
, hold
, ishold
, reset
The NextPlot
property for Figure and Axes graphics objects.