Using stem, I want display (x,y) values with all the y values above a tolerance using red color and the all the rest using green. Exactly I want to display from the tolerance to maximum value using red and from the tolerance to zero using green. On the final display I want to see all the graph bellow the tolerance green, and above the tolerance red.
This is a bit of a hack that does the job. I have created arbitrary data for x and y, and a tolerance of 2.0:
The
ax.axhline
is not required, but I added it to show the value of the tolerance. The result of this code looks like this: