## errorbar without the line

### errorbar without the line

Is there an easy way to make errorbar only plot the points
and not the interconnecting line?

--
Cliff Stamp

### errorbar without the line

In article

> Is there an easy way to make errorbar only plot the points
> and not the interconnecting line?

> --
>  Cliff Stamp

Yes, use a linesyle of '.'.

x = 1:10;
y = sin(x);
e = std(y)*ones(size(x));
errorbar(x,y,e,'.')

- Clay

24 Prime Park Way                http://www.mathworks.com
Natick, MA 01760-1500                   ftp.mathworks.com
==== Tel: 508-647-7000 ==== Fax: 508-647-7001 =====================

Per,
Simply make a new vector which is a "duplicate" of the error vector, zero
out the elements that you don't want error bars for, and use that as the
"new" error vector.

For example, the following creates a really messy graph (adapted from the
help for ERRORBAR):

% Set up all of the data...
x = 1:.1:10;
y = sin(x);
e = std(y)*ones(size(x));
% Plot it.  The graph is kind of messy.
errorbar(x,y,e);

To make a less messy graph, create a new error vector, zero out most of its