

It turned out to be a column vs row vector issue. It's obviously not shading the correct area of the graph, and new near-horizontal lines are being created close to 0 that are messing with the shading. MeanMinusSTD = torqueRnormMean(:,1) - torqueRnormStd(:,1) īut when I try to implement shading just on the lower half of the graph (between mean and meanMinusSTD) by adding the code below, I get a plot that looks like this: fill(, , 'y', 'LineStyle','-') MeanPlusSTD = torqueRnormMean(:,1) + torqueRnormStd(:,1) The variable definitions are a bit complicated but it boils down to this code, and when plotted without shading, I get the screenshot below: x = linspace(0, 100, 101)' I'm trying to shade the area of a graph that represents the mean +/- standard deviation. MATLAB, Filling in the area between two sets of data, lines in one figureīut running into a roadblock.

I'm trying to do something similar to what's outlined in this post:
