Plot a tiled graphical layout

tile For Shiny

tile(tile)R Documentation

Plot a tiled graphical layout

Description

A generic layout function for plotting tiled arrangements of graphic styles found in the tile package, including scatterplots, lineplots, dotplots and more specialized formats. Includes fine control of titles, axes, axis transformation, and rugs for all plots.

Usage

tile(..., RxC = NULL, output = list(), limits = NULL,
xaxis = list(), yaxis = list(), topaxis = list(), rightaxis = list(),
xaxistitle = list(), yaxistitle = list(), topaxistitle = list(), rightaxistitle = list(),
plottitle = list(), maintitle = list(), undertitle = list(), rowtitle = list(), columntitle = list(),
gridlines = list(), frame = FALSE, leeway = 0, width = list(), height = list(),
defaults = list(), layoutonly = FALSE, verbose = FALSE)

Arguments

... Any number of traces, as supplied by tile graphic functions such as lineplot, scatter, ropeladder, nightplot, riceplot, linesTile, pointsTile, textTile, polylinesTile, or polygonTile
RxC A 2-vector giving the number of rows and columns of the tiling of plots. Default is to place all plots in a single row
output A list controlling the output device:
    outfile
    required: Name of the file where the graphic is to be saved; an appropriate extension will be applied automatically
    wide
    required: Width of the output device, in inches
    pointsize
    Default pointsize for the device; default is 12
    family
    Font family for the device; default is Helvetica
    type
    Device type; either pdf (default), postscript, or wmf
limits A vector (or matrix) of limits to the plotting region, similar to usr for base graphics, but generalized to the four axis set-up of tile. The usual case is an 8-vector, (xmin, xmax, ymin, ymax, topmin, topmax, rightmin, rightmax). If no plots have right axes, this could be a 6-vector; if none have right or top axes, it could be a 4-vector, and so on. If an element of limits is NA, then that limit is automatically computed based on the data plotted. If no limits are provided, all limits are computed. To set different limits for each plot, provide a matrix with one row of limits for each plot.
xaxis A list; controls the plotting and format of the x-axes. WHEN IS THIS DRAWN?:
    at
    Vector or matrix of locations to draw ticks (if a matrix, one row for each plot; NAs are ignored). Default is to have tile select at automatically
    labels
    Vector or matrix of labels to apply at tick locations (if a matrix, one row for each plot). Default is to use at
    tick.length
    Length of ticks; default is -0.5
    label.loc
    Location of tick labels relative to axis baseline; default is 1.25
    ticks
    Show tick marks; default is TRUE
    ntics
    If ticks are automatic, how many to draw? Default is 5
    major
    Plot the main axis line? Default is TRUE
    col
    Color for all axis elements; default is black
    lwd
    Line width of axis elements; default is 0.5
    cex
    1
    fontsize
    cfs
    add
    Should this axis be draw? May be a vector, with values for each plot. Default is for tile to automatically determine whether to draw this axis
    log
    Logical or numeric; should this axis be logged? FALSE (default), TRUE, or a positive number (to choose a scale other than the natural log)
    rug
    A list; adds and formats a rug (1-d plot) for this axis:
      data
      NULL
      col
      ???
      lwd
      0.25
      pch
      0.5
      type
      Character string; the type of rug to draw: lines for thin lines marking each datapoint (default); density for a smoothed histogram; dots for a histogram made of dots for each datapoint; jitter for a strip filled with jittered dots for each datapoint
      kernel
      gaussian
yaxis A list; controls the plotting and format of the y-axes; see xaxis for parameters
topaxis A list; controls the plotting and format of the top-axes; see xaxis for parameters
rightaxis A list; controls the plotting and format of the right-axes; see xaxis for parameters
xaxistitle A list; places titles for the x-axes and controls their format:
yaxistitle A list; places titles for the y-axes and controls their format; see xaxistitle for parameters
topaxistitle A list; places titles for the top-axes and controls their format; see xaxistitle for parameters
rightaxistitle A list; places titles for the right-axes and controls their format; see xaxistitle for parameters
plottitle A list; places titles above each plot and controls their format. All parameters may be scalar or vector (if different results are desired for each title):
    labels
    NULL
    cex
    1
    col
    black
    fontsize
    12
    fontface
    plain
    rot
    default varies by type of axis
    x
    0.5
    y
    0.5
    type
    NULL
    add
    FALSE
maintitle A list; places a single title above the entire graphic and control its format. See plottitle for parameters
undertitle A list; places titles below each plot and controls their format. See plottitle for parameters
rowtitle A list; places titles to the left of each row of plots and controls their format. See plottitle for parameters
columntitle A list; places titles above each column of plots and controls their format. See plottitle for parameters
gridlines A list controlling the printing of gridlines in the plotting regions. Each input may be a scalar (to set the parameter globally for all plots) or a vector (to set the parameter plot by plot):
    type
    *A string containing the first letters of each axis which should have gridlines attached to its ticks; e.g., "xy" for gridlines on the x and y axes or "t" for gridlines on the top axis. Default is no gridlines
    lwd
    *Width of gridlines. Default is 0.15
    col
    *Color of gridlines. Default is gray50
    lty
    *Line type of gridlines. Default is solid
frame Logical; draw a frame around plots (use a vector to set for specific plots). Default is FALSE
leeway When finding plot region limits automatically, add a little leeway beyond data limits. Default is 0
width A list of default widths of various plot elements
height A list of default heights of various plot elements
defaults List object with default settings for title heights and widths, and other tile parameters
layoutonly Logical; draw only axes, titles, and frames (default is FALSE)
verbose Logical; display progress report for error checking (default is FALSE)

Details

Explain concept—many of the rec of info vis in one package, with extensive facilities for both EDA and summarizing inference from regression-like models

The tile package operates in two stages. The user first creates one or more traces to be plotted. A trace is a single set of data to be added to the plot, and may be as simple as a text label or a series of line segments, or as complex as a set of points combined with a best fit line and that fit line's various confidence intervals printed as shaded regions. All the parameters affecting the construction and appearance of the trace are set using one of the many functions in the tile package. These include several functions for creating primitives <add table here>

And several functions for constructing complex traces for model or data exploration <add table here>

After creating all the traces you wish to plot, XXX

Explain traces—and note that next thing to read is file for style of interest, including examples (which may involve not only learning how to create traces, but how to generate the data to add to the trace)

Explain role of tile: drawing everything outside the plotting area, and controlling the transformation of the plotting area, axes and rugs, titles

Explain draw-at-once philosophy, including layers and output to file, and grid based graphics

Explain axes, including transformation, attachment, and automatic limits

Explain rugs, and warn some styles may not make sense with logged axes

Explain titles

Explain widths and heights

Explain annotation across plots

Note possibility of extension, and contact

Value

tile is mainly called for the side-effect of saving a graphic to the requested device. However, it does return a list containing all the user inputs, default settings, and numerous internal values. This list contains a copy of the entire plot in the slot grob; to draw this graphical object to the current device, give the grob as input to tileDraw.

Author(s)

Christopher Adolph <[email protected]>

See Also

lineplot, scatter, ropeladder, nightplot, riceplot, linesTile, pointsTile, textTile, polylinesTile, polygonTile


[Package tile version 0.2 Index]