labeled_curves | R Documentation |
Draws multiple curves, each with a properly-placed label and unique color/linestyle.
labeled_curves( x, y, se = NULL, labels, xtick = names(x), xlab = NULL, ylab, type = "o", group, color.palette = default.colors(6), col, lty.palette = 1:6, lty, lwd = 2, jitter = 0, legend. = NULL, move = T, dryrun = F, cex = 1, horizontal = F, mar, bg = par("bg"), ylim, main = "", xaxt = par("xaxt"), yaxt = par("yaxt"), ... )
x |
a numeric vector giving the horizontal position of each point. |
y |
a matrix or data frame giving the vertical position of each point. Each column defines one curve. |
se |
a matrix or data frame, the same size as |
labels |
a character vector of labels for the lines. Defaults to the
column names of |
xlab, ylab |
axis labels, by default the dimnames of |
type |
indicates whether to draw points, lines, or both. See
|
group |
a numeric vector specifying how to group cases when assigning colors. |
color.palette |
a vector of colors, arbitrary length, or a function
with integer argument which generates a vector of colors. Used if
|
col |
a vector of colors, as in a call to |
lty.palette |
a vector of line styles, arbitrary length. The line style will rotate through these when there aren't enough colors. |
lty |
a vector of line styles, as in a call to |
lwd |
line width. |
jitter |
the amount by which to jitter the error bars, to avoid
overplotting. |
cex |
character expansion factor. |
horizontal |
If |
mar |
a numerical vector giving the lines of margin on the four sides
of the plot (see |
bg |
background color. |
ylim |
desired plotting limits. |
main |
title for the plot. |
... |
extra arguments for low-level plotting commands. |
legend |
If |
Point j
in curve i
is at (x[j],y[j,i])
. Thus all
curves must be the same length, and have points at the same horizontal
positions. If y[i,j]=NA
, then the curve has a break at the previous
point, and resumes at the next non-NA
point.
If se
is given, then an error bar will be placed around each point.
Tom Minka
parallel_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.