Re: [R] Plot matrix as many lines

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Fri, 06 Jun 2008 16:31:11 -0300

Try this:

matplot(t(m), type='l', lty = 'solid', col='black')

On 6/6/08, Alberto Monteiro <albmont_at_centroin.com.br> wrote:
>
> Suppose that I have a matrix like:
>
> m <- rbind(c(1,2,3,4), c(2,3,2,1))
>
> Is there any way to efficiently plot the _lines_ as if
> I was doing:
>
> plot(m[1,], type="l")
> points(m[2,], type="l", col="red")
>
> (of course, in the "real world" there much more than
> just 2 lines and 4 columns...)
>
> Alberto Monteiro
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Fri 06 Jun 2008 - 19:46:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 Jun 2008 - 20:31:40 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