MATLAB: Errorbar remove tee, 2015

errorbarr2015tee

Hi,
I very very strongly dislike the horizontal bars on errorbar plots. They don't scale properly when you zoom in, and they just clutter up plots. I don't have admin privileges on my machine so I can't modify the errorbar.m file itself. Before 2015 I could find handles to the Data for the tees and remove them, but it doesn't work anymore. In 2015 they seem to have changed the object structure for graphics objects.
Has anyone figured out how to remove the tees yet in Matlab 2015?
Thanks, Dave

Best Answer

You can’t eliminate the terminal crossbars, but you can create your own error bars without the terminal crossbars:
N = 20;
x = linspace(0, 2*pi, N); % Create Data

y = sin(x).^2; % Create Data
erbar = randn(1, N); % Create Error Bars
figure(1)
plot(x, y)
hold on
plot([x; x], [y-erbar; y+erbar], '-r')
hold off
grid
This is likely as good at it gets until MATLAB incorporates an option for them.