Plotmonotonic: Difference between revisions
imported>Donal (Created page with "===Purpose=== Plot lines with breaks when the x-value "doubles-back" on itself. ===Synopsis=== : h = plotmonotonic(x,y) ===Description=== Creates an x,y plot in which each c...") |
imported>Donal |
||
Line 29: | Line 29: | ||
===See Also=== | ===See Also=== | ||
[[ | [[plotgui]] |
Revision as of 10:23, 4 October 2012
Purpose
Plot lines with breaks when the x-value "doubles-back" on itself.
Synopsis
- h = plotmonotonic(x,y)
Description
Creates an x,y plot in which each continuously increasing segment of x defines a separate line. When x has a negative slope, the given line segment is not shown.
The PLOTMONOTONIC function is used to create a plot from data which contains multiple segments or "runs" (e.g. batches) of continuous data all within a single vector of y-values and corresponding x-values. That is, the x-values of each segment repeat (or at least overlap).
Such x,y data, when plotted using the traditional PLOT command would result in a single line which "doubles-back" on itself each time the x-values repeated. PLOTMONOTONIC recognizes these splits and shows each as a separate line with separate colors for the lines. These are the "mononically increasing" portions of the data (thus PLOTMONOTONIC).
Inputs
- x = vector of x-values for plot
- y = vector or array of y-values to plot against x.
Outputs
- pclass = the voted closest class, if a majority of nearest neighbors were of the same class, or the class of the closest sample, if no majority was found (Only returned if xtest is supplied).
- h = vector of handles to objects created by plot.