I am trying to plot the shaded uncertainty (upper and lower bounds) along a line. I tried using the fill
function but it is including an area larger than I want. I have an upper error (black), lower error (green), and actual data line (red), like so:
How do I get the area between the green and black lines? I tried the following:
fill([date fliplr(date)], [data_Upper fliplr(data_Lower)], 'r');
But the fill function covers both line areas all the way to the bottom of the plot:
How do I fix this to only shade the area between the lower and upper error line bounds?
date = 1:5;
data_Upper = date;
data_Lower = date-1;
, everything seems to work. Can you a give a minimal reproducible example? – David