plot
Plot timeseries
Description
plot(
plots the ts,LineSpec)timeseries data using a line graph and applies the
specified specs to lines, markers, or both.
You can also specify name-value arguments to define Line Properties.
p = plot(___) returns a Line
object or an array of Line objects. Use p to
modify properties of the plot after creating it. For a list of properties, see
Line Properties.
Examples
Input Arguments
Tips
The
plotfunction generates titles and axis labels automatically. These labels are:Plot Title —
'Time Series Plot: <name>'where
<name>is the string assigned tots.Name, or by default,'unnamed'X-Axis Label —
'Time (<units>)'where
<units>is the value of thets.TimeInfo.Unitsfield, which defaults to'seconds'Y-Axis Label —
'<name>'where
<name>is the string assigned tots.Name, or by default,'unnamed'
You can place new time series data on a time series plot (by setting
hold on, for example, and issuing anothertimeseries/plotcommand). When you add data to a plot, the title and axis labels become blank strings to avoid labeling confusion. You can add your own labels after plotting using thetitle,xlabel, andylabelcommands.Time series events, when defined, are marked in the plot with a circular marker with red fill. You can also specify markers for all data points using a
linespecor name/value syntax in addition to any event markers your data defines. The event markers plot on top of the markers you define.The value assigned to
ts.DataInfo.Interpolation.Namecontrols the type of interpolation theplotmethod uses when plotting and resampling time series data. Invoke thetimeseriesmethodsetinterpmethodto change default linear interpolation to zero-order hold interpolation (staircase). This method creates a newtimeseriesobject, with which you can overwrite the original one if you want. For example, to cause time serieststo use zero-order hold interpolation, type the following:ts = ts.setinterpmethod('zoh');
Version History
Introduced before R2006a




