PLOT_WINDROSE Procedure
Creates a Wind Rose plot.
Usage
PLOT_WINDROSE, startDate, endDate, dateArray, scalarArray, directionArray[, locationString]
Input Parameters
startDate — A Date/Time structure, which is the beginning date of the dateArray to plot.
endDate — A Date/Time structure, which is the final date of the dateArray to plot.
dateArray — A Date/Time structure array, which is the observation dates and times
scalarArray — A float array, usually the observed wind speeds, but can be any scalar (for example, pollutant concentration).
directionArray — A float array, which is the observed wind directions.
locationString — (optional) A string, which is the location.
Keywords
ScalarBins — An integer. This is the number of scalar bins. (Default = 6)
DirBins — An integer. This is the number of direction bins. (Default = 16)
NumCircles — An integer. This is the number of radial axis lines. (Default = 2)
NumSpokes — An integer. This is the number of axis lines around the plot. (Default = 12)
Titles — If nonzero, title strings (locationString, startDate and endDate) are drawn on the plot.
Legend — If nonzero, a wind speed legend is plotted.
CLegend — If nonzero, a scalar concentration legend is plotted.
Charsize — A float. This is the character size to use. (Default = !P.Charsize)
Format — A string. This is a FORTRAN format string for the legend values. (Default = '(F4.1)')
Foreground — An integer. This is the color to use for the axes. (Default =15, grey)
Backcolor — An integer. This is the background color. (Default = 0, black)
Textcolor — An integer. This is the color of the text. (Default = 1, white)
Outline — An integer. This is the color of the polygon outlines. (Default =1, white)
Color — An integer array, the colors to use for the scalar bins. It must have the "scalarBins" number of elements. (Default = [2,3,4,5,6,12])
Units — A string. This is the units for the legend. (Default = 'mph' for /Legend, 'ppm' for /CLegend)
XMax — A float, the value of duration percentage to use as the maximum radius of the plot. (Default = 1.1*largest bin).
Procedure
A circular axis is drawn and POLYFILL is used to create what is essentially a stacked polar bar chart.
Example 1
A traditional wind rose:
data = READ_AIRS(!Dir + '/demo/gallery3/data/wd_demo35.dat')
startdate = STR_TO_DT('1/1/99', Date_fmt=1)
enddate = STR_TO_DT('12/31/99', Date_fmt=1)
TEK_COLOR
l = (data('LOCATIONS'))(0)
PLOT_WINDROSE, startdate, enddate, data(l, 'DATE'), data(l, 'R S'), $
data(l, 'R D'), data(l, 'LOCATION'), /Legend, /Titles, Charsize=1.2
Example 2
A pollution rose:
data = READ_AIRS(!Dir + '/demo/gallery3/data/wd_demo35.dat')
startdate = STR_TO_DT('1/1/99', Date_fmt=1)
enddate = STR_TO_DT('12/31/99', Date_fmt=1)
l = (data('LOCATIONS'))(0)
LOADCT, 8
clr = BYTSCL(INDGEN(6))
PLOT_WINDROSE, startdate, enddate, data(l, 'DATE'), $
data(l, 'R S')*RANDOMU(seed, N_ELEMENTS(data(l, 'R S'))), $
data(l, 'R D'), data(l, 'LOCATION'), /CLegend, /Titles, $
Color=WoColorConvert(clr), Textcolor=WoColorConvert(clr(5)), $
Foreground=WoColorConvert(clr(5)), Units='ppm', Charsize=1.2
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.