Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/plotg.circular.R
Creates a plot of circular data points on the current graphics device. Data points are either plotted as points on the unit circle, or the range of the circle is divided into a specified number of bins, and points are stacked in the bins corresponding to the number of observations in each bin. For geographic data, bins are shifted 1/2 arc to stack data points at cardinal directions, instead of between them. For example, with bins=4, each arc=90 degrees, and plotg bins points between 315 and 45 degrees to stack at 0/360 (i.e. N), whereas plot.circular bins points between 0 and 90 degrees to stack at 45.
1 2 3 4 5 6 7 8 9 | ## S3 method for class 'circular'
plotg(x, pch = 16, cex = 1, stack = FALSE,
axes = TRUE, start.sep=0, sep = 0.025, shrink = 1,
bins = NULL, ticks = FALSE, tcl = 0.025, tcl.text = 0.125,
col = NULL, tol = 0.04, uin = NULL,
xlim = c(-1, 1), ylim = c(-1, 1), digits = 2, units = NULL,
template = NULL, zero = NULL, rotation = NULL,
main = NULL, sub=NULL, xlab = "", ylab = "",
control.circle=circle.control(), ...)
|
x |
a vector, matrix or data.frame. The object is coerced to class |
pch |
point character to use. See help on |
cex |
point character size. See help on |
stack |
logical; if |
axes |
logical; if |
start.sep |
constant used to specify the distance between the center of the point and the axis. |
sep |
constant used to specify the distance between stacked points,
if |
shrink |
parameter that controls the size of the plotted circle. Default is 1. Larger values shrink the circle, while smaller values enlarge the circle. |
bins |
if |
ticks |
logical; if |
tcl |
length of the ticks. |
tcl.text |
The position of the axis labels. |
col |
color of the points. The values are recycled if needed. |
tol |
proportion of white space at the margins of plot. |
uin |
desired values for the units per inch parameter. If of length 1, the desired units per inch on the x axis. |
xlim, ylim |
the ranges to be encompassed by the x and y axes. Useful for centering the plot. |
digits |
number of digits used to print axis values. |
main, sub, xlab, ylab |
title, subtitle, x label and y label of the plot. |
units |
the units used in the plot. |
template |
the template used in the plot. |
zero |
the zero used in the plot. |
rotation |
the rotation used in the plot. |
control.circle |
parameters passed to |
... |
futher parameters passed to |
When there are many closely distributed observations, stacking is
recommended. When stacking the points, if there are many points in a particular bin, it may be necessary to shrink the plot of the circle so that all points fit. This is controlled with the parameter shrink. Generally the parameter sep does not need adjustment, however, when shrinking the plot, or for a very large number of observations, it may be helpful. Since version 0.3-9 the intervals are on the form [a,b).
A list with information on the plot: zero, rotation and next.points.
some codes from eqscplot in MASS is used.
Claudio Agostinelli and Ulric Lund
axis.circular, ticks.circular, points.circular, lines.circular, rose.diag, windrose and curve.circular.
1 2 3 4 5 6 7 8 9 10 11 12 | # Generate sample data of 1 observation every 10 degrees
# as circular data, 'geographics' sets 0 up with clockwise rotation
data.g <- circular(seq(0,350,10),units="degrees",template="geographics")
# Plot data set. with 8 bins, stacked at cardinal compass points
plotg.circular(data.g, stack=TRUE, bins=8)
# Compare default plot.circular behavior which stacks between compass points
plot.circular(data.g, stack=TRUE, bins=150, shrink=1.5)
# add tick marks every 22.5 degrees to show major compass points
ticks.circular(circular(seq(0,360,22.5),units="degrees",template="geographics"), tcl=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.