Fill area between plot and the 0-line?
Mostra commenti meno recenti
Hi,
I want to plot some data to show a difference to a reference value and i want that the curve above zero gets filled red and the area of the plot below zero gets filled with blue.
How do i do that?
Risposta accettata
Più risposte (2)
the cyclist
il 31 Mag 2020
0 voti
3 Commenti
Julozert
il 31 Mag 2020
the cyclist
il 31 Mag 2020
The way I would do it is to use your data points to define polygons that are above zero, and polygons that are below zero, and then use patch or fill, to fill them in.
Julozert
il 31 Mag 2020
Image Analyst
il 1 Giu 2020
0 voti
For a more general situation, see the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_shade_the_region_between_two_curves.3F
Categorie
Scopri di più su Surfaces, Volumes, and Polygons in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
