function hh = errorxy(x, y, l,u)

% ERRORXY Simple errorbar plot for x and y 
%    ERRORXY(x,y,l,u) takes a very simplistic approach to plotting
%    errorbars. It adds only line errorbars to your existing plot just
%    as simple crosses.

% Bilge Demirkoz
% Mon Nov 25 16:09:35 EST 2002

hold_state = ishold;

hold on
for i = 1: length(x) 
  line([x(i)-l(i),x(i)+l(i)],[y(i),y(i)])
  line([x(i),x(i)],[y(i)-u(i),y(i)+u(i)])
end

if ~hold_state, hold off; end
