I am trying ti shade the space between an upper and lower limit. Time is a categorical variable so I created 'x' as a numerical array of the same length. But when i plot, it splits the graph into polygons but doesn't fill them. Can someone help with where I'm going wrong?
plot(time,y1);hold on plot(time,y2);x = (1:1:12)';patch([x fliplr(x)].',[y1 fliplr(y2)].','b');
Best Answer