library('ggplot2') # version 0.8.9 loads 'reshape' package, too
m <- matrix(rnorm(25), nrow = 5, dimnames = list(1:5, paste('V', 1:5,
sep = '')))
dm <- melt(m)
str(dm)
'data.frame': 25 obs. of 3 variables:
$ X1 : int 1 2 3 4 5 1 2 3 4 5 ...
$ X2 : Factor w/ 5 levels "V1","V2","V3",..: 1 1 1 1 1 2 2 2 2 2 ...
$ value: num 0.795 1.291 -0.343 -1.092 1.106 ...
ggplot(dm, aes(X1, value, colour = X2)) + geom_point() + geom_path()
If you don't need to distinguish colors (and with 60 columns you may
not), replace colour with group in the last aes() term. The qplot()
version is
qplot(X1, value, data = dm, group = X2, geom = c('point', 'path'))
Adapt to your needs.
HTH,
Dennis
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2