how can I divide x-axis background into different colored zones?
Show older comments
I want to divide x-axis background into different colored\grid zones
to have a shape like this:

I use:
plot(A,B,'k');
hold on;
area(A(1:13),B(1:13),'basevalue',0,'FaceColor','g');
area(A(13:end),B(13:end),'basevalue',0,'FaceColor','r');
but it produced this shape:

I am only want to have three separate zones.
HOW CAN I DO THIS ?
Accepted Answer
More Answers (0)
Categories
Find more on Title 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!