Re: [R] rainbow function

2012-01-01 Thread David Winsemius
On Jan 2, 2012, at 1:31 AM, 王琦 wrote: hello: I am trying to use R to draw a 3D picture, then color the picture according to the value of z , how could I do this job? this is my exalple x<-y<-seq(-50,50,2) m<-function(x,y) x^3+y^3-x^2*y-x*y^2 z<-outer(x,y,m) persp(x,y,z,theta=-60,phi=30) I

[R] rainbow function

2012-01-01 Thread 王琦
hello: I am trying to use R to draw a 3D picture, then color the picture according to the value of z , how could I do this job? this is my exalple x<-y<-seq(-50,50,2) m<-function(x,y) x^3+y^3-x^2*y-x*y^2 z<-outer(x,y,m) persp(x,y,z,theta=-60,phi=30) I want to draw the Zmax in red and Zmin in b

Re: [R] rainbow function

2008-01-07 Thread Greg Snow
[EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Wang, > Zhaoming (NIH/NCI) [C] > Sent: Sunday, January 06, 2008 8:56 PM > To: r-help > Subject: [R] rainbow function > > Hello > I'm using rainbow function to generate 10 colors for the plot > and it is di

Re: [R] rainbow function

2008-01-07 Thread Achim Zeileis
On Mon, 7 Jan 2008, Barry Rowlingson wrote: > rainbow() is great - for drawing rainbows - but the palettes from the > RColorBrewer package are much better for statistical plots as someone > else suggested. When I write code for plots I try and use RColorBrewer > if it's there: ...additionally, th

Re: [R] rainbow function

2008-01-07 Thread Barry Rowlingson
Wang, Zhaoming (NIH/NCI) [C] wrote: > Hello > I'm using rainbow function to generate 10 colors for the plot and it is > difficult to tell the neighboring colors from each other. How can I make > the colors more differently. > If all you want is for neighbouring colours to be distinguishable yo

Re: [R] rainbow function

2008-01-07 Thread Richard . Cotton
> I'm using rainbow function to generate 10 colors for the plot and it is > difficult to tell the neighboring colors from each other. How can I make > the colors more differently. Using 10 colours is always going to be difficult, but take a look at ColorBrewer (http://www.personal.psu.edu/cab38/

Re: [R] rainbow function

2008-01-06 Thread jim holtman
Specify them exactly if there are only 10. On Jan 6, 2008 10:55 PM, Wang, Zhaoming (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote: > Hello > I'm using rainbow function to generate 10 colors for the plot and it is > difficult to tell the neighboring colors from each other. How can I make > the colors more

[R] rainbow function

2008-01-06 Thread Wang, Zhaoming (NIH/NCI) [C]
Hello I'm using rainbow function to generate 10 colors for the plot and it is difficult to tell the neighboring colors from each other. How can I make the colors more differently. Thanks Zhaoming [[alternative HTML version deleted]] __ R-help