Conditionally colored line plot

버전 1.1 (3.62 KB) 작성자: Matt Tearle
Plots (2D line) graph split into two colors above and below a given threshold value

다운로드 수: 1.6K

업데이트 날짜: 2020/3/3

라이선스 보기

Plots vectors x & y using one color for when y is greater than a given threshold value, and another color when y is less than the threshold.
You can optionally specify any standard formatting string that PLOT accepts (eg 'rx:' for a red dotted line with cross markers).

The plotting follows the standard MATLAB PLOT approach of linearly interpolating between data values. The coloring/linestyle changes at y = threshold, even on the interpolated line.

인용 양식

Matt Tearle (2022). Conditionally colored line plot (https://www.mathworks.com/matlabcentral/fileexchange/30423-conditionally-colored-line-plot), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!