
Last chance! 50% off unlimited learning
Sale ends in
PlotLinesA(x, y, col = 1:5, lty = 1, lwd = 1, lend = par("lend"),
xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL,
cex = 1, cex.legend = 1, main = NULL, grid = TRUE, mar = NULL)
1:n
is used. Missing values (NAs
) are allowed.par("cex")
. Can be set for matplot and for the legend text independently.matplot
to generate a lines plot and adds a rather sophisticated legend on the right side, while calculating appropriate margins. A grid option is included (as panel.first
does not work in matplot).
As in matplot, the first column of x is plotted against the first column of y, the second column of x against the second column of y, etc. If one matrix has fewer columns, plotting will cycle back through the columns again. (In particular, either x or y may be a vector, against which all columns of the other argument will be plotted.)matplot
, par
m <- matrix(c(3,4,5,1,5,4,2,6,2), nrow = 3,
dimnames = list(dose = c("A","B","C"),
age = c("2010","2011","2012")))
PlotLinesA(m, col=c(PalHelsana()), main="Dose ~ age_grp", lwd=3, ylim=c(1, 10))
Run the code above in your browser using DataLab