Plot - fill area under curve with specific x-values.

Hello,
The goal is to color the areas in the curve areas where the values of the black dashed line are negative. The data are available as measurement results. The first problem is certainly the different areas to read, then the coloring of the various curves. In the appendix an example is to be found, as I imagine (from powerpoint).
Does anyone have an idea to implement this as automated as possible?
Thanks a lot!

댓글 수: 4

This assumes that all the curves in the plot are the same size as the x-axis (independent variable) vector.
First, determine the index values defining the regions where the dashed black line is negative.
Then loop over each of those regions with a series of patch calls to fill the respective regions. The dark blue areas would be filled first, then the red areas, then the cyan areas.
That’s how I would approach it, anyway.
Note: Duplicate of: Fill Area in plot
Mepe
Mepe 2019년 5월 21일
Thanks for the answer.
How can I use the patch command exactly?
My measurement contains 10000 values (X1, Y1) and between two index values of this curve the area up to the x-axis should be filled.
How can I transfer this restriction to the patch command?
Thank you very much!
KSSV
KSSV 2019년 5월 21일
Pick up the required coordinates..and use patch
Mepe
Mepe 2019년 5월 21일
how exactly do I have to integrate the basic function and the limits in the patch command?Unfortunately, my previous attempts have failed ....

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2019년 5월 20일

댓글:

2019년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by