Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/panelet_group.R
Given ordered class labels, make a row of colors grouped by the categories of class. This is the first plot in makepanel
. All subsequent panelets should follow this ordering of class labels.
1 2 | panelet_group(gr, gr.col,gr.name="group",border=FALSE,
border.col="black", legend=FALSE, ...)
|
gr |
a vector, of class labels in the form of character or integer |
gr.col |
a vector of colors specified for each class in |
gr.name |
a string, name of your group labels |
border |
logical. default is |
border.col |
default is |
legend |
logical. default is |
... |
pass optional arguments here |
...
can pass other parameters. Use it for controlling names and colors of panelets via cex, col
. border line type and thickness can be controlled via lty
and lwd
respectively.
A colored panelet
ordered by class labels is plotted.
key |
if legend = |
Arshi Arora
1 2 3 4 5 6 7 8 9 | #adjust margins and number of panelet values
par(mfrow=c(6,1),mar=c(0,8,0,14))
#sort the entire data frame according to the group solution you are interested in
mtcars.sort = mtcars[order(mtcars$cyl),]
#plot group
tt=panelet_group(gr=mtcars.sort$cyl, gr.col=c("red","blue","green"),
gr.name="cyl",cex=1, border=FALSE, legend=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.