Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

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

klebyn

2005-07-12

Replies:

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")

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.