threshold_plot¶
- threshold_plot(x, y, threshes, colors)¶
THRESHOLD_PLOT Plot a curve with shaded regions below each threshold
- Usage:
area_handles = threshold_plot(x, y, threshes) area_handles = threshold_plot(x, y, threshes, colors)
- Inputs:
x : 1xN double - x-axis values – required y : 1xN double - y-axis values – required threshes : 1xK double - threshold levels to shade under – required colors : Kx3 double or char - colors for shaded regions
(default: repmat(get(gca,’ColorOrder’),5,1))
- Outputs:
area_handles : 1xK array of handles to the shaded area patches
Example
x = linspace(0, 10, 100); y = sin(x).^2; threshold_plot(x, y, [0.75 0.5 0.25]);
See also: area, sort, colormap
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿