Plotmonotonic

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

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

  • h = vector of handles to objects created by plot.

See Also

plotgui