[R] using color palette in persp

David Winsemius dwinsemius at comcast.net
Tue Aug 17 18:06:24 CEST 2010


On Aug 17, 2010, at 10:35 AM, szisziszilvi wrote:

>
> I am using persp to get a plot of a 32x48 matrix.
> data <- as.matrix(read.table(file="mySample.dat"))
> persp(data)
>
> And I'm having trouble with trying to give a z-dependent palette to  
> it like
> rainbow (or any built in one would do). How to combine that with the  
> "col"
> argument?

Have you made the effort to work through the examples on the help  
page? The fourth example shows exactly how to do what you are  
requesting.
>
> nice day
> Szilvi
>
> -- 
> View this message in context: http://r.789695.n4.nabble.com/using-color-palette-in-persp-tp2328464p2328464.html
> Sent from the R help mailing list archive at Nabble.com.
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list