condplot - Conditional line plot

version 1.0.2 (2.79 KB) by Yang Liu
Condplot draws a line that changes color depending on given thresholds.


Updated 6 May 2022

View License

Condplot draws a line that changes color (or other line styles) depending on user defined thresholds. The threshold could apply to both x and y axes and could be defined by multiple values. All regular Name-Value arguments for function plot are acceptable. This function returns two arrays of Line Objects which could be used to modify properties of lines and markers, respectively, after creating them.
This function requires Mapping Toolbox. If you do not have it installed, please add intersections.m to your path for replacement.

Cite As

Yang Liu (2022). condplot - Conditional line plot (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
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!