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

Home » Public Forums » archive » Re: Help, somebody! Error Bars in both X and Y directions.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help, somebody! Error Bars in both X and Y directions. [message #1505] Fri, 03 December 1993 07:32
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
shah@spot.Colorado.EDU (SSS) writes:


> Hello there,

> I have been fruitlessly trying to implement an IDL code to
> create errorbars in both x and y directions. However, my data
> on the ordinate (y axis) is at a very different range than the abcissae
> (x axis). For example, xrange=[0.75,1.25]; yrange=[0.01,0.05]. The
> following procedure, obviously wrong, is able to produce the
> correct x,y mapping but, alas, the errorbars do not correspond to
> their respective x and y scales.

> Can a kind soul help me in this adventure? Oh, I would
> appreciate a non-widget solution. Both, pwidget of RSI and
> pubplot of Joel Offenberg were unable to run on my Solaris
> machine because of some problem. And, no time to spare...

(rest deleted)

I think your mistake is in trying to use USERSYM to accomplish what you want to
do. You'd be better off just using OPLOT with PSYM=0, e.g.

for i=0,9 do begin
xx= x(i) + [1,-1]*xerrbar(i) ;x-coordinates
yy= y(i) + [1,-1]*yerrbar(i) ;y-coordinates
oplot, xx, y(i), psym=0, linestyle=0
oplot, x(i), yy, psym=0, linestyle=0
xyouts, x(i), y(i), xytitle(i)
endfor

It should also work with PLOTS instead of OPLOT, if you prefer.

Bill Thompson

P.S. You might prefer to adjust the minimum and maximum values to include the
error bars, e.g.

xmin=min(x-xerrbar) & xmax=max(x+xerrbar)
ymin=min(y-yerrbar) & ymax=max(y+yerrbar)
plot, x, y,/nodata, xrange=[xmin,xmax],yrange=[ymin,ymax]
[Message index]
 
Read Message
Previous Topic: Re: Ghostscript & Ghostview as IDL Manual Br
Next Topic: IDL Image Processing Package from COBE

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

Current Time: Sun Oct 12 02:04:05 PDT 2025

Total time taken to generate the page: 0.79979 seconds