clplot( x, y, cutval, cols, varargin )

version (4.97 KB) by Carl Witthoft
Creates a line plot whose color depends on which 'slice' of the y-range the y-value falls into.


Updated Fri, 15 Jan 2016 16:01:49 +0000

View License

clplot allows one to highlight the regions of a curve or dataset which fall into different ranges such as quantiles or critical performance levels. Unlike cheap imitations :-), clplot changes colors at exactly the range limits selected, rather than at the next actual data point. The latest version allows for multiple plots on the same graph.
Note: this is a clean, but not optimal implementation. See "clplot.r" in the Plotrix R-packagae for a better, but more complicated version (disclaimer: I wrote that as well).

Cite As

Carl Witthoft (2022). clplot( x, y, cutval, cols, varargin ) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!