[R] windrose color ramp issue

MacQueen, Don macqueen1 at llnl.gov
Thu Dec 15 01:50:14 CET 2011

There is also a windrose (though not with that name) function in the
openair package.

Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 12/12/11 1:20 PM, "Adrienne Wootten" <amwootte at ncsu.edu> wrote:

>I'm having an issue with the windrose produced by the windrose
>function from the circular package.  For our weather stations in North
>Carolina I'm helping with a script which takes hourly wind speed and
>direction data to create windroses for our end users.  One of the
>stations in the mountains frequently reaches wind speed of 40 to 60
>mph and in storms can reach wind speed over 80 mph.  This has brought
>up an issue with the color ramp.
>Currently the color ramp works one of two ways:
>#1) Holding the pedal colors fixed:
>incrspeeds = 2 # fills out the increments argument
>pedalcolors =  
>#or 2) Making the pedal colors dynamic based on the increments and the
>max wind speed.
>incrspeeds = 2 # fills out the increments argument
>breaks=seq(0,round(maxwind),incrspeeds) # maxwind is the maximum wind
># In either case the result ends up in the wind rose function
>The issue when there are really large wind speeds in the first case,
>the windrose wraps the color ramp twice in both the legend and the
>windrose itself, and then gives only white for the remaining bands of
>each pedal.  For the second case, when pedalcolors will have the same
>number of colors as numcolors, the legend has the right color ramp,
>but the pedals of the windrose don't have all the colors that are
>passed to it.  Say pedalcolors has 40 colors, which are included in
>the legend, but the windrose only includes the first 16 colors in
>Any thoughts as to why this might be happening in either case?  Thanks!
>Adrienne Wootten
>Graduate Research Assistant
>State Climate Office of North Carolina
>Department of Marine, Earth and Atmospheric Sciences
>North Carolina State University
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list