Conditionally colored line plot

Plots (2D line) graph split into two colors above and below a given threshold value

이 제출물을 팔로우합니다

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 (2026). Conditionally colored line plot (https://kr.mathworks.com/matlabcentral/fileexchange/30423-conditionally-colored-line-plot), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 준 파일: Conditionally Colored Plot (CCPLOT)

카테고리

Help CenterMATLAB Answers에서 Line Plots에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.1

Made a quick hack to the input-parsing utility to deal with the change in precedence rules. It should now work in 19b and in previous versions. Hasn't been really thoroughly tested, though, so please report any problems.

1.0.0.1

Updated license

1.0.0.0