Hi Phong,
This is a common problem with using color to represent numeric values.
What you want is a reference scale. Whenever you call color2D.matplot,
use the "cellcolors" argument to specify the colors of each cell. You
can directly call "color.scale" in this argument, using the "xrange"
argument
Hello Jim,
I have a several matrices stored in allGrid <- list()
I am using:
color2D.matplot(grid, extremes = c("green", "red"), vcol = "black",
nslices = 60, show.legend=TRUE,axes=FALSE,show.values=TRUE,
xlab="Columns",ylab="Rows")
for each of "grid" in "allGrid". Each "grid" is a matrix
On 12/13/2011 02:15 AM, jalfaro wrote:
Hi Jim,
Thanks so much for your help. I have read several of your responses on this
mailing list and they have helped me out quite a bit as I have gotten more
and more used to R.
I am still a little confused here by your response.
I think you understood my
Hi Jim,
Thanks so much for your help. I have read several of your responses on this
mailing list and they have helped me out quite a bit as I have gotten more
and more used to R.
I am still a little confused here by your response.
I think you understood my requirements correctly.
In your words
Hi jalfaro,
Apologies for the typo in the last message, the first two lines in the
second example should read:
cellcolors[d<1]<-
color.scale(c(0,1,d[d<1]),cs1=c(0,0,1),cs2=c(0,0,1),cs3=1)[-1:2]
That is, minus the first two values returned.
Jim
__
On 12/12/2011 02:48 PM, jalfaro wrote:
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
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 automatica
On 03/07/2010 05:23 AM, david hilton shanabrook wrote:
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, r
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=10
MeMooMeM wrote:
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
Looking into the color2D.matplot code showsthat this is by design. You
might want to contact the package maintainer and send suggestions how to
patch the function (or better, send the patch itself) in order to show
appropriate labels.
Of course, for a worksround, disable axes
color2D.matplot(
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"
Hi Jim,
Thanks for the suggestion I will try it as I do find color2D.matplot
is a bit more versatile.
I have however, since pasting my message, carried on playing and
found out that that doing the following actually works as well:
> fg = read.table("flagenes.txt", row.names=1)
> fg1=as.mat
wragbag wrote:
> 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 ma
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
15 matches
Mail list logo