Ckeck ?matplot. Here's a simple example:
# Data set
x=runif(100) # Axis x1=rnorm(100,25,2) # Variable x_ix2=rnorm(100,10,1)
I hope this helps.
On 2/14/08, tomaschwutz <thomas.wutzler_at_web.de> wrote:
> How do a plot several columns of a matrix at once in a single plot
> versus a single x-variable?
> The default plot.matrix or plot.dataframe commands plot each column
> versus each other column in several sub-plots. I want to plot each
> column versus a single other vector (x) as several lines or points in
> one plot.
> I can do it by hand: get the range of all variables (i.e. columns of
> the matrix or dataframe), initiate an empty plot command, loop through
> all the columns and issue a lines or points command.
> I guess there is a predefined sophisticated function for that,
> however, I was not able to find it.
> Does someone know where I find such a function?
> Best regards
> R-help_at_r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Archive generated by hypermail 2.2.0, at Thu 14 Feb 2008 - 16:30:13 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.
list of date sections of archive