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

Home » Public Forums » archive » BarCoords- cgBarplot
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
BarCoords- cgBarplot [message #88329] Tue, 15 April 2014 07:14 Go to next message
limiqt is currently offline  limiqt
Messages: 27
Registered: October 2013
Junior Member
Hi everyone,
I took the example bellow from http://www.idlcoyote.com/cg_tips/barplot.php

Pro baranderror

data = RandomU(-45L, 5) * 10.0
labels = ['Exp 1', 'Exp 2', 'Exp 3', 'Exp 4', 'Exp 5']
cgLoadct, 33, Clip=[10,245]
colors = ['cornflower blue','sea green','orange red','goldenrod','dark orchid']
cgBarPlot, data, BarNames=labels, Colors=colors, BarCoords=xlocs
lowErrs = RandomU(seed, 5)*0.75
highErrs = RandomU(seed, 5)*0.5
cgPlot, xlocs, data, Err_YLow=lowErrs, Err_YHigh=highErrs, /NoData, /Overplot, $ Err_Color='charcoal', Err_Thick=2

End

However Im getting the error message: CGPLOT-->Variable in undefined: X. I also followed the next example using cgwindow and I got the same error.

I was expecting to get xlocs automatically but it is not happening.

I wonder if someone knows how to get the xlocs

Thanks

Lim,
Re: BarCoords- cgBarplot [message #88330 is a reply to message #88329] Tue, 15 April 2014 07:38 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lim writes:

> I took the example bellow from http://www.idlcoyote.com/cg_tips/barplot.php
>
> Pro baranderror
>
> data = RandomU(-45L, 5) * 10.0
> labels = ['Exp 1', 'Exp 2', 'Exp 3', 'Exp 4', 'Exp 5']
> cgLoadct, 33, Clip=[10,245]
> colors = ['cornflower blue','sea green','orange red','goldenrod','dark orchid']
> cgBarPlot, data, BarNames=labels, Colors=colors, BarCoords=xlocs
> lowErrs = RandomU(seed, 5)*0.75
> highErrs = RandomU(seed, 5)*0.5
> cgPlot, xlocs, data, Err_YLow=lowErrs, Err_YHigh=highErrs, /NoData, /Overplot, $ Err_Color='charcoal', Err_Thick=2
>
> End
>
> However Im getting the error message: CGPLOT-->Variable in undefined: X. I also followed the next example using cgwindow and I got the same error.
>
> I was expecting to get xlocs automatically but it is not happening.
>
> I wonder if someone knows how to get the xlocs

Yeah, don't know when those coordinates went on walk-about. They have
been restored now. Thanks for the heads-up.

http://www.idlcoyote.com/programs/cgbarplot.pro

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.")
Re: BarCoords- cgBarplot [message #88333 is a reply to message #88330] Tue, 15 April 2014 10:24 Go to previous message
limiqt is currently offline  limiqt
Messages: 27
Registered: October 2013
Junior Member
On Tuesday, April 15, 2014 10:38:50 AM UTC-4, David Fanning wrote:
> Lim writes:
>
>
>
>> I took the example bellow from http://www.idlcoyote.com/cg_tips/barplot.php
>
>>
>
>> Pro baranderror
>
>>
>
>> data = RandomU(-45L, 5) * 10.0
>
>> labels = ['Exp 1', 'Exp 2', 'Exp 3', 'Exp 4', 'Exp 5']
>
>> cgLoadct, 33, Clip=[10,245]
>
>> colors = ['cornflower blue','sea green','orange red','goldenrod','dark orchid']
>
>> cgBarPlot, data, BarNames=labels, Colors=colors, BarCoords=xlocs
>
>> lowErrs = RandomU(seed, 5)*0.75
>
>> highErrs = RandomU(seed, 5)*0.5
>
>> cgPlot, xlocs, data, Err_YLow=lowErrs, Err_YHigh=highErrs, /NoData, /Overplot, $ Err_Color='charcoal', Err_Thick=2
>
>>
>
>> End
>
>>
>
>> However Im getting the error message: CGPLOT-->Variable in undefined: X. I also followed the next example using cgwindow and I got the same error.
>
>>
>
>> I was expecting to get xlocs automatically but it is not happening.
>
>>
>
>> I wonder if someone knows how to get the xlocs
>
>
>
> Yeah, don't know when those coordinates went on walk-about. They have
>
> been restored now. Thanks for the heads-up.
>
>
>
> http://www.idlcoyote.com/programs/cgbarplot.pro
>
>
>
> 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.")



Thanks David.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Trying to create a plot with strings as x-values...
Next Topic: Help converting MATLAB to IDL

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

Current Time: Wed Oct 08 09:13:55 PDT 2025

Total time taken to generate the page: 0.00780 seconds