radial.plot {plotrix} | R Documentation |
radial.plot
displays a plot of radial lines, polygon(s),
symbols or a combination of these centered at the midpoint of
the plot frame, the lengths, vertices or positions corresponding
to the numeric magnitudes of the data values. If show.centroid
is TRUE, an enlarged point at the centroid of values is displayed.
radial.plot(lengths,radial.pos,labels,label.pos,rp.type="r", label.prop=1.1,main="",xlab="",ylab="",line.col=par("fg"),mar=c(2,2,3,2), show.grid=TRUE,show.radial.grid=TRUE,grid.col="gray",grid.bg="transparent", point.symbols=NULL,point.col=NULL,show.centroid=FALSE,radial.lim=NULL,...)
lengths |
A numeric data vector or matrix. If lengths
is a matrix, the rows will be considered separate data vectors. |
radial.pos |
A numeric vector or matrix of positions in radians.
These are interpreted as beginning at the right (0 radians) and moving
counterclockwise. If radial.pos is a matrix, the rows must
correspond to rows of lengths . |
labels |
character strings to be placed at the outer ends of the lines. If set to NULL, will suppress printing of labels, but if missing, the radial positions will be used. |
label.pos |
the positions of the labels as distance from the
'center' of the plot. If missing, they will be placed at 1.1
times the maximum of lengths . |
rp.type |
whether to draw (r)adial lines, a (p)olygon, (s)ymbols or some combination of these. |
label.prop |
the label position radius as a proportion of the maximum line length. |
main |
The title for the plot. |
xlab,ylab |
Normally x and y axis labels are suppressed. |
line.col |
The color of the radial lines or polygons drawn. |
mar |
Margins for the plot. Allows the user to leave space for legends, etc. |
show.grid |
Logical - whether to draw a circular grid. |
show.radial.grid |
Whether to draw radial lines to the plot labels. |
grid.col |
Color of the circular grid. |
grid.bg |
Fill color of above. |
point.symbols |
the symbols for plotting (as in pch). |
point.col |
colors for the symbols. |
show.centroid |
whether to display a centroid. |
radial.lim |
the range of the grid circle. Defaults
to range(pretty((lengths))) . |
... |
additional arguments are passed to plot . |
The radial.plot family of plots is useful for illustrating
cyclic data such as wind direction or speed (but see oz.windrose
for both), activity at different times of the day, and so on. While
radial.plot
actually does the plotting, another function is usually
called for specific types of cyclic data. Note that if the observations
are not taken at equal intervals around the circle, the centroid may not
mean much.
nil
Jim Lemon
testlen<-rnorm(10)*2+5 testpos<-seq(0,18*pi/10,length=10) testlab<-letters[1:10] radial.plot(testlen,testpos,main="Test Radial Lines",line.col="red",lwd=3) if(dev.interactive()) par(ask=TRUE) testlen<-c(sin(seq(0,1.98*pi,length=100))+2+rnorm(100)/10) testpos<-seq(0,1.98*pi,length=100) radial.plot(testlen,testpos,rp.type="p",main="Test Polygon",line.col="blue") radial.plot(testlen,testpos,rp.type="s",main="Test Symbols",point.symbols=16, point.col="green",show.centroid=TRUE) par(ask=FALSE)