plot based on a value
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
Accepted Answer
1 vote
Share a link to this answer

30 Comments
Share a link to this comment
Share a link to this comment


Share a link to this comment
Share a link to this comment
Share a link to this comment
- Extending the lower limit of y axis = -1 and that I am marking as green, red or grey squares on the x axis based on 3 conditions mentioned below:
- The table from which I am using is of size (100x5) which has 2 columns across which I am making a comparison first and then the values:
- If column D < column E then mark x where y=-1 as grey
- If column D >= column E then make additional check if any of A,B,C pointer above 1(limit), then mark x where y=-1 as red
- If column D >= column E then make additional check if any of A,B,C pointer not above 1(limit), then mark x where y=-1 as green
- Trying to add the red,green,grey squares to legend as well

Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment

Share a link to this comment
Share a link to this comment
- Getting away from the y=-1 axis, setting a limit as y=0 (which means removing the points on that axis as well)
- Conditions still are the same but instead of adding a separate color coding on the y=-1 axis I am now trying to color all A,B,C in those colors based on the conditions (moving away from blue and orange) based on the limit at y=1 (Example: if the condition for D<E is satisfied then color A,B,C all in grey instead of the earlier implementation where y=-1 being grey and A,B,C having color (blue,orange) based on above or below y=1)

Share a link to this comment
- If column D < column E then mark all points A,B,C in grey
- If column D >= column E then make additional check if any of A,B,C pointer above 1(limit), then mark all A,B,C as red
- If column D >= column E then make additional check if any of A,B,C pointer not above 1(limit), then mark A,B,C as green

Share a link to this comment
- The above plot is let's say plot 1
- There is a plot 2 with same x axis as plot 1
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
More Answers (0)
Categories
Find more on Model Building and Assessment in Help Center and File Exchange
Products
Tags
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)