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.
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 (2024). condplot - Conditional line plot (https://www.mathworks.com/matlabcentral/fileexchange/111225-condplot-conditional-line-plot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2016a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.