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

Home » Public Forums » archive » Re: Displaying error bars
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: Displaying error bars [message #24740] Thu, 12 April 2001 19:14
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
This is a situation where I would say that you might as well roll your own -
it's not as hard as it sounds. Something like the following, after you plot
your data (x,y):

for i=0,n_elements(x) do begin
plots, [x[i]-err[i],x[i]+err[i]] , [y[i],y[i]] , color=0,thick=2 ; draw the
horiz. error bar
plots, [x[i]-err[i],x[i]-err[i]] ,
[y[i]+0.02*!c.yrange,y[i]-0.02*!c.yrange] , color=0,thick=2 ;make some little
tick marks on the ends if you want
plots, [x[i]+err[i],x[i]+err[i]] ,
[y[i]+0.02*!c.yrange,y[i]-0.02*!c.yrange]] , color=0,thick=2

endfor

(Not sure if the !c.yrange part is correct.) You also should probably use
Postscript output, that way you have more control over the final result's
format and appearance.

- Med

"Miklos Z. Kiss" wrote:

> Is there an easy way to create horizontal error bars in IDL plots? Also, I
> recently discovered that the IDL routine ERRPLOT does not allow you change
> the color of the error bars. I typically do plots in black on a white
> background (so I can copy the image into documents, etc.), rendering the
> error bars invisible. Is there a way around this too?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 5.4 last one for WIN95
Next Topic: IDL VIP

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

Current Time: Wed Oct 08 19:13:04 PDT 2025

Total time taken to generate the page: 0.00380 seconds