similar to: add a color band

Displaying 20 results from an estimated 2000 matches similar to: "add a color band"

2010 Mar 06
1
color2D.matplot not giving colors
I am using color2D.matplot to plot a matrix about 400 by 200. The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green) #example motifx <- matrix(NA, nrow=100,ncol=20) motifx[,1:5] <- 1 motifx[,6:10] <- 2 motifx[,11:15] <- 3 motifx[,15:19] <- 4
2011 Feb 07
1
color2d.maplot error
Dear all I am using color2D.maplot to map some matrixes to plot. everything works fine. It seems that when my matrix contains only the same value color2D.maplot returns the following error: color2D.matplot(estimatedsr,redrange=c(0,1),greenrange=c(0,.5),bluerange=c(0,.5),xlab="x",ylab="y",main=sprintf('Estimated'),show.legend=TRUE,show.values=TRUE) Error in rgb(reds,
2008 Jun 17
2
color2D.matplot axis names
Hi, I finally came up with a nice colored matrixplot, using the color2D.matplot function of the plotrix package. But I can't assign xtics and ytics to this plot. I made sure that the matrix has correct colnames() and rownames(). Here's what I do: a=matrix(1:16, 4, 4) colnames(a) <- c("X1", "X2", "X3", X4) rownames(a) <- c("Y1",
2011 Apr 03
3
Error in "color2D.matplot" : "Error in plot.new() : figure margins too large"
Hi, I am using color2D.matplot (...) function of "plotrix" package. I used a matrix of size around 20*20 However, apparently it failed to visualize the matrix and gave the following exception, which I don't have any idea about possible source of this error. "Error in plot.new() : figure margins too large" It would be appreciated if someone points me to the right origin
2007 Nov 06
1
color2D.matplot
I am a true R novice aonly using it for this function ;) I am trying to use color2D.matplot to form a image of my data using the following conditions color2D.matplot(fi1, c(dr), c(dg), c(db), nslices=7, ylab='Species', xlab="gene", show.legend=TRUE) where fi1 is my matrix. I have a matrix with 36 columns and 130 rows. most entries are 1 or 0 and I am trying to get this
2011 Jul 21
1
How to set Color scale for color2D.matplot()
Hello, everyone. I am trying to show the correlation matrix using color2D.matplot(). And I want to map (0,1) to (dark red to dark green). But by default color2D.matplot() will map(min element of given matrix, max element of given matrix) to (dark red to dark green). Can anyone help me with this issue? Thanks a lot! Youcheng Lin ____________ [[alternative HTML version deleted]]
2010 Mar 09
3
Fine Tuning Plotrix
Dear All, Please see the code snippet at the end of the email. I am using the color2D.matplot in Plotrix to plot a matrix. It works great, but there are a few things I cannot figure out (1) the value of cex.axis in the code snippet does not seem to affect the final pdf at all (at least on my system, Ubuntu 9.10, plotrix and Cairo installed from cran). How do I specify the size of the axis ticks
2007 Mar 22
2
Colored boxes with values in the box
Hi all, I have a x, y matrix of numbers (usually ranging from 0 to 40). I need to group these numbers and assign a color to each group (for example 0 to 15 - Blue, 16-30- Yellow, and 31-40- Red). Then I need to draw a rectangular matrix which contains X x Y boxes and each box has the corresponding value from the input matrix and is also colored according to which group (i.e red, yellow,
2009 May 13
4
plotting a grid with color on a map
Hi all, I have posted similar questions regarding this topic, but I just can't seem to get over the hump and find a straightforward way to do this. I have attached my file as a reference. Basically, the attached file is a 5 degree by 5 degree grid of the the world (2592 cells), most of them are NA's. I just want to be able to plot this grid over a world map and color code the cells. For
2009 Oct 20
3
Transparent Bands in R
Hello All, My question is regarding the attached plot. I would like to have multiple transparent green bands running the length (yaxis) of the plot the width of which is determined by the green lines at y=0 in the plot. Can you suggest a way to do it? For those who can't or are unwilling to download the file the plot is at http://www.twitpic.com/ma8w0 Thanks!
2008 Apr 15
4
heavy graphs
Dear R community, I am creating large graphs with hundreds of thousands of datapoints. My usual way for output was pdf, but now I am getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is there a way to reduce the resolution or get rid of overlaying datapoints? Any other idea is also warmly welcome! Thank you and wishing you a good day! Georg. **********************
2010 Jun 23
5
Plotrix Trick
Dear All, I am using the plotrix library to plot some matrices. I have a problem: some of my data are outliers, hence using a linear color scale does not work very well (you would see too many cells having a similar, indistinguishable color). See the code snipped at the end of the email. Plotting the logarithm of the data gets the job done, but my problem is that I would like to write in every
2011 Aug 05
3
plotting many unique colors with categorical data
Hi- I am trying to plot a matrix of categorical values across time using color to represent each individual factor. For example: 1982 1983 1984 1985 1986 1987 1 19 19 68 68 19 19 68 2 68 68 19 19 68 68 19 3 26 26 34 34 26 26 26 4 57 34 57 57 34 57 34 5 34 57 26 26 57 34 57 6 28 28 28 28 28 58
2010 Apr 14
4
how to draw multiple vertical bands
hi R gurus I saw some graphs with vertical band like this one: http://pragcap.com/wp-content/uploads/2010/04/GS.png how to draw the blue band in R, can't find any clue to do this,any ideas? thanks in advance [[alternative HTML version deleted]]
2011 Dec 12
2
Color2D.matplot uniform color range
Hi all. I am having a problem using color2D.matplot I am trying to visualize several different matrices under two color ranges. One color range corresponds to values less than 1 and the second color range for values greater than 1. However, the minimum value of each matrix differs and is automatically set to have the smallest value in the color range. Similarly, the maximum value of each matrix
2007 Feb 09
2
heatmap color specification
hi, I have a positive integer matrix like: test<-matrix(c(1,2,2,2,2,1,1,2,3),3) and based on the distant function I made like this: generateDistMat<-function (target) { n <- nrow(target) rn <- rownames(target) distM <- matrix(NA, n, n) diag(distM) <- 0 for (i in 1:(n - 1)) for (j in (i + 1):n) { distM[i, j] <- length(which(target[i, ] !=
2009 Oct 14
1
rect function
Dear all, I have a question about how to load data or (entering data )to each cell of a rectangle created by rect . e.g. I have a matrix rbind(1:2,1:2) I have created a 2x2 rectangle by using: a<-0:1/10 b<-0:1/10 kk<-expand.grid(a,b) plot.new() rect(kk[, 1], kk[, 2], kk[, 1] + .1,kk[, 2] + .1) so how do we put the value of rbind(1:2,1:2) into the relevant
2008 Oct 15
2
Help with matplot
Hi, I apologise in advance for the na?ve question. I have large matrices that I want to plot. I currently use color2D.matplot. However, these matrices contain many values of no interest (i.e. where there is no data, the figure -999 is automatically displayed). Is there any way of removing these from the matrices to be plotted by matplot? An obvious possibility is setting them all to 0, but that
2011 Jul 29
2
problems with image.plot()
Hi all, I used image.plot() to create a heat map of a matrix: as.matrix(read.table("Matrix.txt", sep="\t"))->x HeatBrk<-seq(5,25,2.5) MyCol= gray((7:0)/7) library(fields) image.plot(x, col=MyCol, breaks=HeatBrk, legend.shrink=0.3) dev.copy(device=pdf, file="HEAT4!.pdf", height=8, width=8) dev.off() There are a few things that I would like to do that I
2006 Nov 24
2
axis in an image() plot
Hi all, I've found quite usefull colored-grid created by image() but I'm facing a doubt I am not able to solve. Given the following data rectangle... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 12 22 0 7 2 1 0 2 0 2 6 -3 0 3 2 0 -1 0 9 3 -4 0 0 0 0 3 0 0 0 3 29 45 6 12 16 85 -2 0 -3 -4 89 -1 -1 1 4 2 9 3 6 17 3 -2 -9 -2 8