Hello together,
I am quite new to Matlab and tried to plot a stairplot with a shaded, symmetric error envelope. The x,y data and the error come in 20x1 double array and are extracted from bigger ones in a loop. Now I wanted to draw shaded bars above and under each bar with fill, however it did not give me the desired result. Here is my code:
fill([x;flipud(x)],[y-dy;flipud(y+dy)], color_err, 'linestyle', 'none','HandleVisibility','off');
I also played around with leaving out or changing the
function but this code is always drawing triangles around the bars of the stairplot. the stairplot itself looks like the following and should have rectangular shaded regions around single bars that are assigned with an error.
Does someone have an idea how to do this? Would be very grateful since I am stuck with this problem for quite a while.
Kind regards,
Philipp