Make background of half plot red
Mostrar comentarios más antiguos
I have the following plot

I want the plot background over the yellow line to have a color, e.g. red, to show that this is the "bad" region.
Thanks for any suggestions!
Respuestas (1)
Star Strider
el 26 de Ag. de 2019
Try this:
figure
plot(rand(3)*0.3, rand(3)*0.3, 'x') % Plot Points
hold on
plot([0 5], [0 5], 'Color',[0.8 0.5 0.1]) % Plot Line
patch([0 5 5 0], [0 5 5 5], 'r', 'FaceAlpha',0.25, 'EdgeColor','none') % Plot Region Above Line
hold off
Experiment to get the result you want.

Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!