Description Usage Arguments See Also Examples
Drawing categorized axis used with overdraw()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
main |
Main category, this is given as vector (e.g. c("S", "R")) or column name of data |
sub |
Sub category, this is given as vector (e.g. c("1", "10", "100")) or column name of data |
data |
a data.frame |
main.axis.at |
Drawing position of main axis |
main.axis.length |
Bar length of main axis |
sub.axis.at |
Drawing position of sub axis |
lwd |
sub axis lwd, default is 1. |
bar.lwd |
main axis lwd, default is 1. |
cex.axis |
axis cex, default is 1.1. |
las.main |
las of main category |
las.sub |
las of sub category |
x.intsp |
Inter space of main axis bar, defauit is 0.6. |
y.intsp |
Inter space of main and sub axis, default is 1.8, |
horizontal |
horizontal, default is "F". |
[plotn::overdraw]
1 2 3 4 5 6 7 8 9 10 11 | d <- data.frame(x = c(1:10, 11:20, 21:30, 31:40),
group = rep(c("A","B","A", "B"), each = 10),
treatment = rep(c("X","Y"), each = 20))
boxplotn(x ~ group + treatment, data = d, xaxt = "n",
xlab = "", mar = c(3.8, 3.8, 1, 1))
overdraw(category_axis(main = "treatment", sub = "group",
data = d))
boxplotn(x ~ group + treatment, data = d, xaxt = "n",
xlab = "", mar = c(3.8, 3.8, 1, 1))
overdraw(category_axis(main = c("X", "Y"), sub = c("A", "B")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.