Rev 5216 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{F_2_llines}\alias{llines}\alias{lpoints}\alias{ltext}\alias{llines.default}\alias{lpoints.default}\alias{ltext.default}\alias{lplot.xy}\alias{larrows}\alias{lsegments}\alias{lrect}\alias{lpolygon}\alias{panel.arrows}\alias{panel.lines}\alias{panel.points}\alias{panel.segments}\alias{panel.text}\alias{panel.rect}\alias{panel.polygon}\title{Replacements of traditional graphics functions}\description{These functions are intended to replace common low level traditionalgraphics functions, primarily for use in panel functions. Theoriginals can not be used (at least not easily) because lattice panelfunctions need to use grid graphics. Low level drawing functions ingrid can be used directly as well, and is often more flexible. Thesefunctions are provided for convenience and portability.}\usage{lplot.xy(xy, type, pch, lty, col, cex, lwd,font, fontfamily, fontface,col.line, col.symbol, alpha, fill,origin = 0, \dots)llines(x, ...)lpoints(x, ...)ltext(x, ...)\method{llines}{default}(x, y = NULL, type = "l",col, alpha, lty, lwd, \dots)\method{lpoints}{default}(x, y = NULL, type = "p", col, pch, alpha, fill,font, fontfamily, fontface, cex, \dots)\method{ltext}{default}(x, y = NULL, labels = seq_along(x),col, alpha, cex, srt = 0,lineheight, font, fontfamily, fontface,adj = c(0.5, 0.5), pos = NULL, offset = 0.5, \dots)lsegments(x0, y0, x1, y1, x2, y2,col, alpha, lty, lwd, \dots)lrect(xleft, ybottom, xright, ytop,x = (xleft + xright) / 2,y = (ybottom + ytop) / 2,width = xright - xleft,height = ytop - ybottom,col = "transparent",border = "black",lty = 1, lwd = 1, alpha = 1,just = "center",hjust = NULL, vjust = NULL,\dots)larrows(x0 = NULL, y0 = NULL, x1, y1, x2 = NULL, y2 = NULL,angle = 30, code = 2, length = 0.25, unit = "inches",ends = switch(code, "first", "last", "both"),type = "open",col = add.line$col,alpha = add.line$alpha,lty = add.line$lty,lwd = add.line$lwd,fill = NULL, \dots)lpolygon(x, y = NULL,border = "black", col = "transparent",font, fontface, \dots)panel.lines(\dots)panel.points(\dots)panel.segments(\dots)panel.text(\dots)panel.rect(\dots)panel.arrows(\dots)panel.polygon(\dots)}\arguments{\item{ x, y, x0, y0, x1, y1, x2, y2, xy}{ locations. \code{x2} and\code{y2} are available for for S compatibility. }\item{length, unit}{determines extent of arrow head. \code{length} specifies the lengthin terms of \code{unit}, which can be any valid grid unit as long asit doesn't need a \code{data} argument. \code{unit} defaults toinches, which is the only option in the base version of thefunction, \code{\link{arrows}}. }\item{angle, code, type, labels, srt, adj, pos, offset}{ argumentscontrolling behaviour. See respective base functions for details.For \code{larrows} and \code{panel.larrows}, \code{type} is either\code{"open"} or \code{"closed"}, indicating the type ofarrowhead. }\item{ends}{ serves the same function as \code{code}, usingdescriptive names rather than integer codes. If specified, thisoverrides \code{code}}\item{col, alpha, lty, lwd, fill, pch, cex, lineheight, font,fontfamily, fontface, col.line, col.symbol, border}{ graphicalparameters. \code{fill} applies to points when \code{pch} is in\code{21:25} and specifies the fill color, similar to the \code{bg}argument in the base graphics function \code{\link{points}}. Fordevices that support alpha-transparency, a numeric argument\code{alpha} between 0 and 1 can controls transparency. Be carefulwith this, since for devices that do not support alpha-transparency,nothing will be drawn at all if this is set to anything other than0. \code{font} and \code{fontface} are included in \code{lpolygon}only to ensure that they are not passed down (as\code{\link[grid:gpar]{gpar}} doesn't like them).}\item{origin}{ for \code{type="h"} or \code{type="H"}, the value towhich lines drop down. }\item{xleft, ybottom, xright, ytop}{ see \code{\link{rect}}}\item{width, height, just, hjust, vjust}{ finer control overrectangles, see \code{\link[grid:grid.rect]{grid.rect}} }\item{\dots}{ extra arguments, passed on to lower level functions asappropriate. }}\details{These functions are meant to be grid replacements of the correspondingbase R graphics functions, to allow existing Trellis code to be usedwith minimal modification. The functions \code{panel.*} areessentally identical to the \code{l*} versions, are recommended foruse in new code (as opposed to ported code) as they have more readablenames.See the documentation of the base functions for usage. Not allarguments are always supported. All these correspond to the defaultmethods only.% For \code{ltext}, only values 0, .5 and 1 for \code{adj}% have any effect.}\note{There is a new \code{type="H"} option wherever appropriate, which issimilar to \code{type="h"}, but with horizontal lines.}\seealso{\code{\link{points}}, \code{\link{lines}}, \code{\link{rect}},\code{\link{text}}, \code{\link{segments}}, \code{\link{arrows}},\code{\link{Lattice}}}\author{ Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}}\keyword{dplot}