Re: BarCoords- cgBarplot [message #88330 is a reply to message #88329] |
Tue, 15 April 2014 07:38   |
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.")
|
|
|