Hello,
I simply want to fill an unbounded section of a plot from an x,y coordinate. For example, the code below creates a vertical line that divides a plot area into two unbounded regions. I would like to fill in the plot area to the left (indicated by the red circle). Is there a simple way to achieve this? Polygons could be a possible solution, but it may get complicated since the line is not always vertical and the data point could be anywhere.
y=0:100;x=ones(size(y));plot(x,y)hold allscatter(0.5,50,'r')axis([0 2 0 100])
Thanks
Best Answer