The R Project SVN R

Rev

Rev 59039 | Rev 78848 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 16... Line 16...
16
          just = "centre", hjust = NULL, vjust = NULL,
16
          just = "centre", hjust = NULL, vjust = NULL,
17
          default.units = "npc", name = NULL,
17
          default.units = "npc", name = NULL,
18
          gp=gpar(), draw = TRUE, vp = NULL)
18
          gp=gpar(), draw = TRUE, vp = NULL)
19
rectGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
19
rectGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
20
         width = unit(1, "npc"), height = unit(1, "npc"),
20
         width = unit(1, "npc"), height = unit(1, "npc"),
21
         just = "centre", hjust = NULL, vjust = NULL, 
21
         just = "centre", hjust = NULL, vjust = NULL,
22
         default.units = "npc", name = NULL,
22
         default.units = "npc", name = NULL,
23
         gp=gpar(), vp = NULL)
23
         gp=gpar(), vp = NULL)
24
}
24
}
25
\arguments{
25
\arguments{
26
  \item{x}{A numeric vector or unit object specifying x-location.}
26
  \item{x}{A numeric vector or unit object specifying x-location.}
27
  \item{y}{A numeric vector or unit object specifying y-location.}
27
  \item{y}{A numeric vector or unit object specifying y-location.}
28
  \item{width}{A numeric vector or unit object specifying width.}
28
  \item{width}{A numeric vector or unit object specifying width.}
29
  \item{height}{A numeric vector or unit object specifying height.}
29
  \item{height}{A numeric vector or unit object specifying height.}
30
  \item{just}{The justification of the rectangle 
30
  \item{just}{The justification of the rectangle
31
    relative to its (x, y) location.  If there are two values, the first
31
    relative to its (x, y) location.  If there are two values, the first
32
    value specifies horizontal justification and the second value specifies
32
    value specifies horizontal justification and the second value specifies
33
    vertical justification.  Possible string values are: \code{"left"},
33
    vertical justification.  Possible string values are: \code{"left"},
34
    \code{"right"}, \code{"centre"}, \code{"center"}, \code{"bottom"},
34
    \code{"right"}, \code{"centre"}, \code{"center"}, \code{"bottom"},
35
    and \code{"top"}.  For numeric values, 0 means left alignment
35
    and \code{"top"}.  For numeric values, 0 means left alignment
Line 39... Line 39...
39
    If specified, overrides the \code{just} setting.}
39
    If specified, overrides the \code{just} setting.}
40
  \item{vjust}{A numeric vector specifying vertical justification.
40
  \item{vjust}{A numeric vector specifying vertical justification.
41
    If specified, overrides the \code{just} setting.}
41
    If specified, overrides the \code{just} setting.}
42
  \item{default.units}{A string indicating the default units to use
42
  \item{default.units}{A string indicating the default units to use
43
    if \code{x}, \code{y}, \code{width}, or \code{height}
43
    if \code{x}, \code{y}, \code{width}, or \code{height}
44
    are only given as numeric vectors.}  
44
    are only given as numeric vectors.}
45
  \item{name}{ A character identifier. }
45
  \item{name}{ A character identifier. }
46
  \item{gp}{An object of class \code{gpar}, typically the output
46
  \item{gp}{An object of class \code{gpar}, typically the output
47
    from a call to the function \code{gpar}.  This is basically
47
    from a call to the function \code{gpar}.  This is basically
48
    a list of graphical parameter settings.}
48
    a list of graphical parameter settings.}
49
  \item{draw}{A logical value indicating whether graphics output
49
  \item{draw}{A logical value indicating whether graphics output
Line 52... Line 52...
52
}
52
}
53
\details{
53
\details{
54
  Both functions create a rect grob (a graphical object describing
54
  Both functions create a rect grob (a graphical object describing
55
  rectangles), but only \code{grid.rect}
55
  rectangles), but only \code{grid.rect}
56
  draws the rectangles (and then only if \code{draw} is \code{TRUE}).
56
  draws the rectangles (and then only if \code{draw} is \code{TRUE}).
57
  
57
 
58
}
58
}
59
\value{
59
\value{
60
  A rect grob.  \code{grid.rect} returns the value invisibly.
60
  A rect grob.  \code{grid.rect} returns the value invisibly.
61
}
61
}
62
\author{Paul Murrell}
62
\author{Paul Murrell}