Usage
LineChart(x, data=mydata, n.cat=getOption("n.cat"), type=NULL, fill=getOption("fill.bar"),
stroke=getOption("stroke.pt"),
bg=getOption("bg"),
grid=getOption("grid"),
box=getOption("box"),
line=getOption("stroke.pt"),
area=NULL,
shape.pts=21, cex.axis=.75, axes="gray30",
rotate.values=0, offset=.5,
xy.ticks=TRUE, line.width=1,
xlab=NULL, ylab=NULL, main=NULL, sub=NULL, cex=NULL,
time.start=NULL, time.by=NULL, time.reverse=FALSE,
center.line=c("default", "mean", "median", "zero", "off"),
show.runs=FALSE, quiet=getOption("quiet"),
width=4.5, height=4.5, pdf=FALSE,
…)
lc(…)
Arguments
x
Variable(s) to analyze. Can be a single numerical variable,
either within a data frame or as a vector in the user's workspace,
or multiple variables in a data frame such as designated with the
c
function, or an entire data frame. If not specified,
then defaults to all numerical variables in the specified data
frame, mydata
by default. data
Optional data frame that contains the variable(s) of interest,
default is mydata
.
n.cat
For the analysis of multiple variables, such as a data frame,
specifies the largest number of unique values of variable of a numeric
data type for which the variable will be analyzed as a categorical.
Default is 0.
type
Character string that indicates the type of plot, either "p"
for
points, "l"
for line, or "b"
for both. The default is
"b"
for both points and lines.
fill
For plotted points, the interior color of the point. For a
scatterplot the default value is "transparent"
or "off"
.
For a run chart the default value is
the color of the point's border, stroke
.
stroke
Color of the lines. Remove with stroke="off"
.
bg
Color of the plot background. Remove with bg="off"
.
grid
Color of the grid lines. Remove with grid="off"
.
box
Color of border around the plot background, the box, that encloses
the plot. Remove with box="off"
.
line
Color of the plotted line.
area
Color of area under the plotted line segments, which by default is not
applied, equivalent to a color of "transparent"
.
shape.pts
The standard plot character, with values defined in help(points). The
default value is 21, a circle with both a border and filled area, specified here as
stroke
and fill
. fill
defaults to
stroke
.
cex.axis
Scale magnification factor, which by defaults displays the axis values to be
smaller than the axis labels.
axes
Color of the font used to label the axis values.
rotate.values
Degrees that the axis values are rotated, usually to accommodate
longer values, typically used in conjunction with offset
.
offset
The amount of spacing between the axis values and the axis. Default
is 0.5. Larger values such as 1.0 are used to create space for the label when
longer axis value names are rotated.
xy.ticks
Flag that indicates if tick marks and associated values on the
axes are to be displayed.
line.width
Width of the line segments.
xlab
Label for x-axis. For two variables specified, x and y, if xlab
not
specified, then the label becomes the name of the corresponding variable. If
xy.ticks
is FALSE
, then no label is displayed. If no y variable is specified,
then xlab
is set to Index unless xlab
has been specified.
ylab
Label for y-axis. If not specified, then the label becomes the name of
the corresponding variable. If xy.ticks
is FALSE
, then no label displayed.
main
Label for the title of the graph. If the corresponding variable labels exist,
then the title is set by default from the corresponding variable labels.
sub
Sub-title of graph, below xlab.
cex
Magnification factor for any displayed points, with default of cex=1.0.
time.start
Optional starting date for first data value. Format must be
"%Y-%m-%d" or "%Y/%m/%d". If using with x.reverse
, the first date is after
the data are reverse sorted. Not needed if data are a time series with
ts
function. time.by
Accompanies the time.start
specification, the interval to increment the
date for each sequential data value. A character string, containing one of "day"
,
"week"
, "month"
or "year"
. This string can optionally be preceded by
a positive or negative integer and a space, or followed by "s", as specified in
seq.Date
. Not needed if data are a time series. time.reverse
When TRUE
, reverse the ordering of the dates, particularly when the
data are listed such that first row of data is the newest. Accompanies the time.start
specification.
center.line
Plots a dashed line through the middle of a run chart. The two
possible values for the line are "mean"
and "median"
. Provides a centerline
for the "median"
by default when the values randomly vary about the mean. A
value of "zero"
specifies the center line should go through zero.
show.runs
If TRUE
, display the individual runs in the run analysis.
quiet
If set to TRUE
, no text output. Can change system default
with theme
function. width
Width of the plot window in inches, defaults to 4.5.
height
Height of the plot window in inches, defaults to 4.5.
pdf
If TRUE
, the pdf file is to be redirected to a pdf file.
…
Other parameters such as from par
, col.lab
,
sub
, color.sub
, color.ticks
to set the color of the
ticks used to label the axis values, and
srt
to rotate the axis value labels.