Re: [R] How to use the function "plot" as Matlab?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 13 Jul 2005 - 13:30:22 EST

On 7/12/05, klebyn <klebyn@yahoo.com.br> wrote:
> Hello,
>
> How to use the function plot to produce graphs as Matlab?
> example in Matlab:
>
> a = [1,2,5,3,6,8,1,7];
> b = [1,7,2,9,2,3,4,5];
> plot(a,'b')
> hold
> plot(b,'r')
>
>
> How to make the same in R-package ?
>
> I am trying something thus:
>
> a <- c(1,2,5,3,6,8,1,7)
> c(1,7,2,9,2,3,4,5) -> b
>
> a;b
>
> plot(a,t="l",col="blue")
> plot(b,t="l",col="red")
>

In addition to the Intro manual and other usual sources (see the posting guide at the end of every post to this list) see:

   http://cran.r-project.org/doc/contrib/R-and-octave-2.txt



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 13 13:34:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:36 EST