comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: plot stddev bars for each data point
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: plot stddev bars for each data point [message #61724] Wed, 30 July 2008 06:37 Go to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On the other hand, if you like using direct graphics,
there's nothing like doing the job yourself...

x=[1,2,3,5,6,7]
y=[2,3,5,4,1,2]
yerr=[0.4,0.8,1.2,1.0,0.3,0.4]

plot,x,y,psym=6,yrange=[0,8]
FOR i=0,n_elements(x)-1 DO oplot,x[i]*[1,1],y[i]+yerr[i]*[-1,1]

Ciao,
Paolo

julia.waltersp...@gmail.com wrote:
>>
>> If you search "error bar plots" in IDL 6.4 it gives you a nice example
>> using
>> iPlot. �Just plug your stddev(dataset) where it has "err".
>
> sweet, I saw the error bar plot but was convinced there was something
> written just for stddev.
> thanks a lot
Re: plot stddev bars for each data point [message #61725 is a reply to message #61724] Wed, 30 July 2008 06:32 Go to previous messageGo to next message
julia.walterspiel is currently offline  julia.walterspiel
Messages: 35
Registered: July 2008
Member
>
> If you search "error bar plots" in IDL 6.4 it gives you a nice example
> using
> iPlot.  Just plug your stddev(dataset) where it has "err".

sweet, I saw the error bar plot but was convinced there was something
written just for stddev.
thanks a lot
Re: plot stddev bars for each data point [message #61728 is a reply to message #61725] Wed, 30 July 2008 05:26 Go to previous messageGo to next message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jul 30, 7:43 am, julia.waltersp...@gmail.com wrote:
> hi folks
>
> i'm pretty sure it can't be that hard, but i haven't found anything
> helpful on the net that could answer my question.
>
> I have a time series of data and I need to plot the stddev for each
> data point as little (vertical) bars over the regular time series
> plot.
> does anybody know where to find a program to do so?
> cheers!!
> juls

If you search "error bar plots" in IDL 6.4 it gives you a nice example
using
iPlot. Just plug your stddev(dataset) where it has "err".
Re: plot stddev bars for each data point [message #61818 is a reply to message #61724] Wed, 30 July 2008 08:53 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
pgrigis@gmail.com wrote:
> On the other hand, if you like using direct graphics,
> there's nothing like doing the job yourself...
>
> x=[1,2,3,5,6,7]
> y=[2,3,5,4,1,2]
> yerr=[0.4,0.8,1.2,1.0,0.3,0.4]
>
> plot,x,y,psym=6,yrange=[0,8]
> FOR i=0,n_elements(x)-1 DO oplot,x[i]*[1,1],y[i]+yerr[i]*[-1,1]
>

IDL has a built-in routine to do this:

x=[1,2,3,5,6,7]
y=[2,3,5,4,1,2]
yerr=[0.4,0.8,1.2,1.0,0.3,0.4]

ploterr,x,y,yerr

It will never look as nice as doing it yourself but slightly easier to
type if you just want a quick look.

Thanks,

Allan

> Ciao,
> Paolo
>
> julia.waltersp...@gmail.com wrote:
>
>>> If you search "error bar plots" in IDL 6.4 it gives you a nice example
>>> using
>>> iPlot. �Just plug your stddev(dataset) where it has "err".
>>
>> sweet, I saw the error bar plot but was convinced there was something
>> written just for stddev.
>> thanks a lot
Re: plot stddev bars for each data point [message #61819 is a reply to message #61724] Wed, 30 July 2008 08:48 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
pgrigis@gmail.com wrote:
> On the other hand, if you like using direct graphics,
> there's nothing like doing the job yourself...
>
> x=[1,2,3,5,6,7]
> y=[2,3,5,4,1,2]
> yerr=[0.4,0.8,1.2,1.0,0.3,0.4]
>
> plot,x,y,psym=6,yrange=[0,8]
> FOR i=0,n_elements(x)-1 DO oplot,x[i]*[1,1],y[i]+yerr[i]*[-1,1]

Or let the ploterr or oploterr, errplot routines do it for you.



cheers,

paulv
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Point of intersection
Next Topic: plot stddev bars for each data point

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:25:59 PDT 2025

Total time taken to generate the page: 0.00458 seconds