microplot | R Documentation |
Take a trellis or ggplot object, or graphicsList object (list of trellis or ggplot objects), and generate a set of graphics files, one per panel of a multi-panel display. Additional files are generated for the axes, the axis labels, and the key.
This help file documents the microplot
function. See
microplot-package
for information on the entire microplot package.
microplot(object, ...) ## complete for an array of lattice panels ## S3 method for class 'trellis' microplot( object=stop("trellis object is required", call. = FALSE), ## object must have class "trellis" figPrefix=first.word(deparse(substitute(object))), vectorgraph.colname=figPrefix, device=c("pdf","postscript","ps","png"), res=600, type=getOption("bitmapType"), ## used by png height.panel=1, width.panel=1, ## numeric in inches collapse=layoutCollapse, ## Zero out unwanted ## layout.heights and layout.widths. ## See below for example. height.x.axis=height.panel[1], axis.line=list(col="black"), xaxis.line=axis.line, par.settings.x.axis= list(layout.heights=list(panel=0, axis.bottom=1, axis.xlab.padding=0, xlab=0), axis.line=xaxis.line), width.y.axis=width.panel[1], yaxis.line=axis.line, par.settings.y.axis= list(layout.widths=list(ylab=0, ylab.axis.padding=0, axis.left=1, panel=0), axis.line=yaxis.line), height.xlab=height.panel[1], par.settings.xlab= list(layout.heights=list(panel=0, axis.bottom=0, axis.xlab.padding=0, xlab=1), axis.line=list(col="transparent")), width.ylab=width.panel[1], par.settings.ylab= list(layout.widths=list(ylab=1, ylab.axis.padding=0, axis.left=0, panel=0), axis.line=list(col="transparent")), key=FALSE, ## FALSE or a list of arguments defining a key height.key=height.panel[1], width.key=width.panel[1], ...) ## needed to match generic. ignored in the trellis method ## S3 method for class 'ggplot' microplot(object, ## object has class "ggplot" collapse=theme_collapse(), ## theme_collapse(...) ? figPrefix=first.word(deparse(substitute(object))), vectorgraph.colname=figPrefix, height.panel=1, ## inch width.panel=1, ## inch height.x.axis=height.panel, width.y.axis=width.panel, height.xlab=height.panel, width.ylab=width.panel, height.key=height.panel, width.key=width.panel, tick.text.size=7, key=FALSE, ## FALSE, or a ggplot object which is a valid key device=c("pdf","postscript","ps","png"), res=600, type=getOption("bitmapType"), ## used by png ...) ## S3 method for class 'graphicsList' microplot(object, ## an array of identically structured, ## single-panel, graphics objects (trellis or ggplot) ## with dim and dimnames figPrefix=first.word(deparse(substitute(object))), device=c("pdf","postscript","ps","png"), res=600, type=getOption("bitmapType"), ## used by png height.panel=1, width.panel=1, ## numeric in inches key=FALSE, ## FALSE, or a trellis or ggplot object which is a valid key height.key=height.panel, width.key=width.panel, ## valid arguments for microplot.trellis or microplot.ggplot ...)
object |
|
collapse |
Function that zeros out unwanted |
figPrefix |
Character string used as prefix for the generated files.
The 'latex' macro |
vectorgraph.colname |
Character string used as column name when a vector of filenames is converted to a column matrix of filenames. |
height.panel, width.panel |
Height and width in inches of the generated graphics files. |
height.x.axis, width.y.axis |
Dimensions for axis graphics files—usually smaller than for panel contents. |
height.xlab, width.ylab |
Dimensions for graphics files containing axis labels—usually smaller than for panel contents. |
par.settings.x.axis, par.settings.y.axis, par.settings.xlab,
par.settings.ylab |
|
axis.line, xaxis.line, yaxis.line |
|
key |
Logical or list (for lattice) or ggplot object (for ggplot).
If logical and |
height.key, width.key |
Height and width in inches of key graphics file. Defaults to same height and width as the panels. |
device |
Function used to construct the graphics files. For For For |
res, type |
|
tick.text.size |
Text size of the tick labels in the x and y axes
( |
... |
Arguments to panel function, i.e., |
Matrix of filenames with same dim
and dimnames
as the
argument object
. The result has class "microplotMatrix"
.
There may be one or more attributes.
|
contains filenames for the x and y axes. |
|
contains filenames for the xlab and ylab. |
|
contains the filename for key (legend). |
Richard M. Heiberger <rmh@temple.edu>
latex.trellis
, as.includegraphics
,
latex
, msWord
## See demos
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.