plotn_arrange: Make figure with multiple panels

Description Usage Arguments See Also Examples

View source: R/plotn.R

Description

Make figure with multiple panels

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotn_arrange(
  ...,
  row = NULL,
  column = NULL,
  panel.label = "A)",
  cex.panel.lab = 1.3,
  col.panel.lab = "#000000",
  x.panel.pos = 0,
  y.panel.pos = 0,
  label.sp = 2
)

Arguments

...

plotn object by plotn_object()

row

number of row, matrix of row x column plots

column

number of column, matrix of row x column plots

panel.label

panel label, "n","n)","(n)"(number), "A","A)","(A)"(upper case), "a","a)","(a)"(lower case) or character vevtor are able to selected.

cex.panel.lab

panel label cex

col.panel.lab

panel label color

x.panel.pos

panel label position on x axis

y.panel.pos

panel label position on y axis

label.sp

space for panel label

See Also

[plotn::plotn_object]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
n1 <- plotn_object(plotn(1:50),
                   overdraw(abline(v = 30), abline(h = 20),
                            points(1:10 + 1, 10:1))
      )

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))
n2 <- plotn_object(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))
      )

n3 <- plotn_object(barplotn(x ~ group + treatment, data = d, xaxt = "n",
                            xlab = "", mar = c(3.8, 3.8, 1, 1))
      )

plotn_arrange(n1, n2, n3, column = 2, panel.label = "a)")
n <- plotn_object(plotn_arrange(n1, n2, n3, column = 2, panel.label = "a)"))
n

bugplant/plotn documentation built on June 23, 2021, 1:18 a.m.