cgWindRose has error producing legend? [message #89472] |
Mon, 20 October 2014 09:59  |
BLesht
Messages: 89 Registered: March 2007
|
Member |
|
|
Hi - I am using cgWindRose for a little exploratory work. My input data are straightforward, hourly observations from a NDBC buoy. I just remove the missing data and call cgWindRose:
;
good = WHERE(wd NE 99.00, ngood) ; Missing wind data have value 99.00
cgWindRose, wspd[good], wd[good], TITLE = buoyName+STRING(year, FORMAT='(I5)')
;
I do get a wind rose, but two things are strange. First, it looks like the rose isn't sized correctly for the window - the "East" label is cut off - and second, I get a legend heading "Wind Speed (m/s") but no legend with the error message:
Traceback Report from CGLEGENDITEM::INIT:
% CGLEGENDITEM::INIT: Number of COLORS elements not equal to the number of legend items.
% Execution halted at: CGLEGENDITEM::INIT 234 /Users/blesht/IDLStuff/coyote/cglegenditem__define.pro
% CGLEGEND 200 /Users/blesht/IDLStuff/coyote/cglegend.pro
% CGWINDROSE 363 /Users/blesht/IDLStuff/coyote/cgwindrose.pro
% LSUP_WIND_STRESS 35 /Users/blesht/IDLWorkspace82/Default/lsup_wind_stress.pro
% $MAIN$
I'm running IDL8.2.3 on MacOSX10.8.5 and my Coyote library is current through revision 1494. I don't have any other graphics calls (e.g. color tables, etc.) before the call to cgWindRose.
I haven't seen any other posts reporting this (or any other issues with cgWindRose), so I'm probably doing something wrong, but I haven't figured out what it could be. Any help much appreciated.
Thanks, Barry
|
|
|
Re: cgWindRose has error producing legend? [message #89476 is a reply to message #89472] |
Mon, 20 October 2014 12:20   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Barry Lesht writes:
> observations from a NDBC buoy. I just remove the missing data and call cgWindRose:
> ;
> good = WHERE(wd NE 99.00, ngood) ; Missing wind data have value 99.00
> cgWindRose, wspd[good], wd[good], TITLE = buoyName+STRING(year, FORMAT='(I5)')
> ;
> I do get a wind rose, but two things are strange. First, it looks like the rose isn't sized correctly for the window - the "East" label is cut off - and second, I get a legend heading "Wind Speed (m/s") but no legend with the error message:
>
> Traceback Report from CGLEGENDITEM::INIT:
>
> % CGLEGENDITEM::INIT: Number of COLORS elements not equal to the number of legend items.
> % Execution halted at: CGLEGENDITEM::INIT 234 /Users/blesht/IDLStuff/coyote/cglegenditem__define.pro
> % CGLEGEND 200 /Users/blesht/IDLStuff/coyote/cglegend.pro
> % CGWINDROSE 363 /Users/blesht/IDLStuff/coyote/cgwindrose.pro
> % LSUP_WIND_STRESS 35 /Users/blesht/IDLWorkspace82/Default/lsup_wind_stress.pro
> % $MAIN$
>
> I'm running IDL8.2.3 on MacOSX10.8.5 and my Coyote library is current through revision 1494. I don't have any other graphics calls (e.g. color tables, etc.) before the call to cgWindRose.
>
> I haven't seen any other posts reporting this (or any other issues with cgWindRose), so I'm probably doing something wrong, but I haven't figured out what it could be. Any help much appreciated.
Don't know. When I tried to run the example WindowRose program in the
Coyote Gallery, I had some problems. First, it was calling a retired
Coyote Library routine, and then it was having problems with cgPlotS.
Plus, the link in the internal documentation was wrong.
I have had a few problems with cgPlotS, since I modified it 10 October
to allow a vector of symbol types. I really didn't fully appreciate the
number of strange ways PlotS could be called! So, more effort to fix
these problems.
I didn't see anything like the problems you report, though. :-)
I guess I would get these two new programs and see if anything anything
changes for you. If not, we can go from there.
http://www.idlcoyote.com/programs/cgwindrose.pro
http://www.idlcoyote.com/programs/cgplots.pro
The windrose example code can be found here:
http://www.idlcoyote.com/gallery/windrose.zip
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.")
|
|
|
|
|