On Tue, 15 May 2007 02:40:55 +0000 (UTC)
John Owens wrote:

> Would LOVE to get some help with the "matplot" function.
> 
> > Plot the columns of one matrix against the columns of another.
> > matplot(x, y)
> >  x,y: vectors or matrices of data for plotting.  The number of rows
> >     should match.  If one of them are missing, the other is taken
> >     as 'y' and an 'x' vector of '1:n' is used. Missing values
> >     ('NA's) are allowed.
> 

General rule. Make sure it works first in R

> Here's something that works:
> 
> r.matplot([1,2,3], [4,5,6])

matplot(c(1,2,3),c(4,5,6))

> 
> This plots (1,3), (2,4), (3,5).

NO. 1,4; 2,5; 3,6

> 
> What I want is to plot a second dataset against (1,2,3).
> 
> These things don't work:
> 
> r.matplot([1,2,3], [[4,5,6],[7,8,9]])
>         'x' and 'y' must have same number of rows

matplot((c(1,2,3),cbind(c(4,5,6),c(7,8,9)))

r.matplot([1,2,3], r.cbind([4,5,6],[7,8,9]))

>>> test = r.cbind([4,5,6],[7,8,9])
>>> test
array([[4, 7],
       [5, 8],
       [6, 9]])

HTH

T
-- 
Trevor Wiens 
[EMAIL PROTECTED]

The significant problems that we face cannot be solved at the same 
level of thinking we were at when we created them. 
(Albert Einstein)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to