Re: [R] Problem with colors in contour plot

2012-10-05 Thread Loukia Spineli
Thank you very much Jim!!! Your function achieves to color the grid tha way I want, but it can handle only one variable, if I have understood correctly the details of this function.The plot must display in the axes percentages and in the grids pvalues. I have incorporated 3 different variables in

Re: [R] Problem with colors in contour plot

2012-10-05 Thread Jim Lemon
On 10/04/2012 10:25 PM, Loukia Spineli wrote: Dear R users, I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to present graphically this matrix in a plot (filled contour plot) where both axes represent probabilities. I have also added a grid in this plot. I want to highlight in

Re: [R] Problem with colors in contour plot

2012-10-04 Thread Loukia Spineli
The contpour plot is very impressive!!! The contour plot I want to display should have only 2 colors: white a grey. I have created this plot for only one trial (see, ppts) and now I am attempting to do the same for many trials. On Thu, Oct 4, 2012 at 3:51 PM, Rui Barradas wrote: > Hello, > > So

Re: [R] Problem with colors in contour plot

2012-10-04 Thread Rui Barradas
Hello, Something like this? myRamp <- colorRampPalette(c("lightblue", "darkblue")) mypal <- myRamp(20) mypal[1] <- rgb(1, 1, 1) #?filled.contour ## Persian Rug Art: x <- y <- seq(-4*pi, 4*pi, len = 27) r <- sqrt(outer(x^2, y^2, "+")) filled.contour(cos(r^2)^2, frame.plot = FALSE,

[R] Problem with colors in contour plot

2012-10-04 Thread Loukia Spineli
Dear R users, I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to present graphically this matrix in a plot (filled contour plot) where both axes represent probabilities. I have also added a grid in this plot. I want to highlight in white the cells of the grid that represent p-val

Re: [R] problem with colors

2010-10-09 Thread ANJAN PURKAYASTHA
Hi Phil and Thomas, Thanks for your helpful feedback. I must admit my solution to creating the vector of colors lacked your elegance. In brief, I saved the output of colors() into a text file, saved all but 47 colours in that file and read it back as a data frame and used the first column of the d

Re: [R] problem with colors

2010-10-07 Thread Thomas Stewart
I would be helpful if you provided a more complete, reproducible example. Consider the following code. It colors the boxes according to the first 47 colors listed in the color() vector. -tgs data<-as.data.frame(matrix(rnorm(47*23),ncol=47)) boxplot(data,col=colors()[1:47]) On Thu, Oct 7, 20

Re: [R] problem with colors

2010-10-07 Thread Phil Spector
Anjan - I think you'll need to give us more information -- I can't reproduce the problem. For example, dat = data.frame(matrix(rnorm(47000),100,47)) cols = sample(colors(),47) boxplot(dat,col=cols) doesn't repeat any of the colors in cols. -

[R] problem with colors

2010-10-07 Thread ANJAN PURKAYASTHA
Hi, I have a data set of 47 columns. I would like to create a boxplot for each column, each boxplot of a different colour. So I created a vector "col1". This vector has a subset of the colors returned by color()- "red", "cyan", "green" etc. Now I use the command: boxplot(dataset, col= col1) expecti