Description Usage Arguments Details Author(s) See Also Examples
Similar to stars
function, but drawn in grid viewport:
Draw star plots or segment diagrams of a multivariate data set.
With one single location, also draws 'spider' (or 'radar') plots.
1 2 3 4 5 |
x |
vector, matrix or data frame of data. One star or segment plot
will be produced for each row of |
radius |
logical flag: in |
locations |
Either two column matrix with the x and y coordinates used
to place each of the segment plots; or numeric of length 2
when all plots should be superimposed (for a |
draw.segments |
logical. If |
scale |
logical flag: if |
full |
logical flag: if |
qx |
matrix or data frame of data for quantiles in background |
quantile |
logical. If |
col.segments |
colour vector (integer or character, see |
col.stars |
colour vector (integer or character, see |
draw.labels |
logical. If |
key |
logical. If |
lwd |
line width, passed to |
lty |
line type, passed to |
cex |
numerical value, giving the amount by which plotting text
and symbols should be magnified relative to the default,
passed to |
Missing values are treated as 0.
Each star plot or segment diagram represents one row of the input
x
. Variables (columns) start on the right and wind
counter-clockwise around the circle. The size of the (scaled)
column is shown by the distance from the center to the point on
the star or the radius of the segment representing the variable.
Only one page of output is produced.
Ingo Voglhuber
gbarplot
, gmatplot
,
gpie
, gsymbols
, gbxp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | data(USJudgeRatings)
grid.newpage()
## example
gstars(USJudgeRatings)
grid.newpage()
## no radii
gstars(USJudgeRatings,radius=FALSE)
grid.newpage()
## no labels
gstars(USJudgeRatings, draw.labels=FALSE)
grid.newpage()
## segments of a circle
gstars(USJudgeRatings,draw.segments=TRUE)
grid.newpage()
## spiderplot, no labels
gstars(USJudgeRatings,radius=FALSE, locations="spider",
draw.labels=FALSE)
grid.newpage()
## spiderplot with quantiles in background
gstars(USJudgeRatings,radius=FALSE, locations="spider",
quantile=TRUE)
grid.newpage()
## spiderplot with quantiles in background
gstars(USJudgeRatings,radius=FALSE, locations="spider",
qx=apply(USJudgeRatings,2,quantile,probs=seq(0,1,0.25)) ,
quantile=TRUE,
draw.labels=FALSE)
grid.newpage()
## draw only labels
gstars(USJudgeRatings, key=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.