errorbar without the line

errorbar without the line

Post by Cliff Stam » Fri, 27 Jun 1997 04:00:00



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

--
 Cliff Stamp                  

 
 
 

errorbar without the line

Post by Clay M. Thomps » Sat, 28 Jun 1997 04:00:00


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 =====================

 
 
 

1. ERRORBAR: How to only plot every X errorbar?



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
elements, and display that instead.
% Make a copy of e with only every fifth element nonzero.
e2 = e;
for i = 1:length(e2), if rem(i, 5), e2(i) = 0; end; end
% Plot using that one instead.
errorbar(x,y,e2)

Hope this helps,
--
Bob Gilmore, Software Engineer,
The MathWorks, Inc.

2. Phone Tech Support West Coast

3. Errorbar: length of the horizontal lines in error bars

4. Asm support

5. thick lines for errorbar ?

6. DM 1: Rock Monsters

7. Line type of errorbar ?

8. No dutch hyphenation patterns

9. Length of lines from errorbar??

10. A Matlab-question: Line & errorbars simultaneously

11. contourf without lines

12. formated out put without new line

13. formated out put without new line 2nd