Plot - fill area under curve with specific x-values.
Show older comments
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 Comments
Star Strider
on 20 May 2019
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.
Mepe
on 21 May 2019
KSSV
on 21 May 2019
Pick up the required coordinates..and use patch
Mepe
on 21 May 2019
Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!