Skip to content
Prev 313635 / 398513 Next

Plotting from a matrix, where column 1 is your x value

Hello,

There are several ways of doing this, perhaps the easiest is with ?matplot.
You should provide some data example, like the posting guide says. Since 
you haven't, I've made up some.

y <- replicate(3, cumsum(rnorm(10)))
x <- matrix(c(1:10, y), ncol = 4)

matplot(x[, 1], x[, -1], type = "l")


Hope this helps,

Rui Barradas

Em 14-12-2012 11:28, masepot escreveu: