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

Home » Public Forums » archive » Displaced errorbars on log-log scale with cgPlot
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: Displaced errorbars on log-log scale with cgPlot [message #90115 is a reply to message #90112] Wed, 28 January 2015 07:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Madhavan Bomidi writes:

>
> Hello David,
>
> Please check the below code and the resulting output:
>
> ---------------------------------
> PRO testerr
>
> xdt = [5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240]
>
>
> ymean = [ 5.7071102e-07, 1.9411492e-07, 2.4366391e-07, 3.9646722e-07, $
> 8.8304703e-07, 3.6161633e-06, 1.5931371e-05, 6.4912913e-05, $
> 0.00019788680, 0.00042545785, 0.00033186864, 0.00031074151 ]
>
> ystd = [ 4.1662774e-07, 2.7208043e-07, 4.5170846e-07, 7.2870838e-07, $
> 1.2310552e-06, 3.6163696e-06, 1.4698943e-05, 6.3878156e-05, $
> 0.00023048977, 0.00053752256, 0.00033514162, 0.00018645177 ]
>
> low_yerr = (ymean - ystd)
> high_yerr = (ymean + ystd)
>
> FigFile = 'testerrplot.ps'
>
> cgPS_Open,FigFile
> cgDisplay
>
> cgPlot,xdt,ymean, Font=-1,/XLOG,XStyle=1,YStyle=1, $
> XRange=[100000,1],YRange=[0.000000001,0.1], /YLOG, $
> CharSize=1.2, ERR_YLow=low_yerr, $
> ERR_YHigh=high_yerr, Psym=-16, $
> ERR_Color='red7',SymColor='red7',Color='red7'
>
> cgPS_Close
>
> ; Create a PNG file
> cgPS2Raster,FigFile,/PNG
>
> END
> --------------------------------------

It appears to me you are giving me numbers that it is impossible to take
the log of:

IDL> print, alog10(low_yerr)
-6.81224 -NaN -NaN -NaN -NaN
-NaN -5.90924 -5.98516 -NaN
-NaN -NaN -3.90556

The "problem" values are those that can't be calculated.

I guess the real problem might be understanding why errors are not being
thrown by cgPlot. I'll look into it.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Contour annotations
Next Topic: Krig2d from point to image

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

Current Time: Wed Oct 08 17:57:16 PDT 2025

Total time taken to generate the page: 0.00387 seconds