Learn R Programming

microplot (version 1.0-45)

microplotAttrDisplay: Specify how to display the microplots for x.axis, y.axis, xlab, ylab, and key.

Description

Specify how to display the microplots for x.axis, y.axis, xlab, ylab, and key.

Usage

microplotAttrDisplay(ii,
                     y.axis=unname(attr(ii, "axis.names")["y"]),
                     x.axis=unname(attr(ii, "axis.names")["x"]),
                     ylab=unname(attr(ii, "lab.names")["y"]),
                     xlab=unname(attr(ii, "lab.names")["x"]),
                     key=attr(ii, "key.name"),
                     columnKey=NULL,
                     label.x.axis="", ## empty, nchar=0
                     label.y.axis=" " ## one space, nchar=1
                     )

Arguments

ii

A "microplotMatrix" or "includegraphicsMatrix" of filenames of graphics files each containing one panel of an array of plots. There may be up to three attributes containing additional filenames.

x.axis, y.axis

Vector of filenames containing graphic files of axes.

label.x.axis, label.y.axis

Labels that will used in the column name of the y.axis and the y.axis column for the x.axis row in the 'latex' display of the graphic.

xlab, ylab

Vector of filenames containing graphic files of axis labels.

key

Filename containing a graphics file containing a key (legend).

columnKey

If the key is non-null, then place its filename as a new last value in the specified columns. The column numbering is with respect to the input ii before the y.axis or ylab are evaluated.

Value

Revised version of the input ii, possibly augmented with additional rows for the x.axis, xlab, and key, and additional columns for the ylab and y.axis. The xlab is ignored unless the x.axis is also specified. The ylab is ignored unless the y.axis is also specified.

See Also

microplot

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
latexSetOptions()

filenames <-
  structure(c("tt010.pdf", "tt007.pdf", "tt004.pdf", "tt001.pdf",
              "tt011.pdf", "tt008.pdf", "tt005.pdf", "tt002.pdf",
              "tt012.pdf", "tt009.pdf", "tt006.pdf", "tt003.pdf"),
            .Dim = c(4L, 3L),
            .Dimnames = structure(list(
              rr = c("d", "c", "b", "a"),
              cc = c("E", "F", "G")),
              .Names = c("rr", "cc")),
            axis.names = structure(c("tt013.pdf", "tt014.pdf"), .Names = c("x", "y")),
            lab.names = structure(c("tt015.pdf", "tt016.pdf"), .Names = c("x", "y")),
            key.name = "tt017.pdf",
            class = c("microplotMatrix", "matrix"))

filenames

as.includegraphics(filenames, wd=".")

as.includegraphics(filenames, wd=".", as.attr=FALSE) ## default

as.includegraphics(filenames, wd=".", as.attr=TRUE)

as.includegraphics(filenames, wd=".", columnKey=1)

as.includegraphics(filenames, wd=".", columnKey=1:3)

as.includegraphics(filenames, wd=".", xlab=TRUE, ylab=TRUE)

as.includegraphics(filenames, wd=".",
                   label.x.axis="X tick values", label.y.axis="Y tick values")

tt <- data.frame(x=1:4, y=c(2,3,4,1), group=c("A","A","B","B"))
latex(lattice::xyplot(y ~ x | group, data=tt))
latex(lattice::xyplot(y ~ x | group, data=tt),
      label.x.axis="X Range", label.y.axis="Y Range")

demo("AEdotplot", package="microplot", ask=TRUE)

# }

Run the code above in your browser using DataLab