Displaying 20 results from an estimated 7000 matches similar to: "question in value-based color in image()"
2008 Sep 16
2
question in value-based color in image()
Hello,
I have a matrix with value varying from -1 to 1. I hope to use scaled color
based on its value to produce an image of this matrix.
Suppose I hope to label those data in [-1,-0.5] with blue, label those
[-0.5,0.8] with light blue (tone is proportional to its value) and label
those [0.8,1] with white.
How can I use image() and rgb() to achieve this? It would be great if I can
have a
2010 Feb 10
2
color palette heatmap
Hi,
I'm kinda new of the R world.
I need to use the heatmap or heatmap.2 function to plot correlation values.
2 questions:
- how can I specify a color palette? (would like to have a transition from
blue(-1) to white(0) to red(1))
- how can I use heatmap.2 imposing a specific order (like hclust.order)?
I mean, I don't want heatmap.2 to re-cluster/re-order my data but just to
plot them
2007 Jan 04
5
color of opposite sign values in filled.contour
Dear R-helpers,
I'm plotting geophysical data in the form of contours using
"filled.contour". The display would be much more effective if the areas
with negative values could be color coded
by -- say -- "cold colors" in the range of blue to green, and conversely
the areas with positive values got plotted with "warm colors", from yellow
to red.
Right now if I use
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
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]]
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,
2009 Oct 13
2
General means of matching a color specification to an official R color name
Hello List Dwellers:
I?ve looked around quite a bit, but don?t quite see an answer that I
understand.
I?m looking for a way to take any kind of color specification (rgb, hsv,
hcl, hex) and match it to the n-nearest R official color names. Clearly it
is easy to interconvert different specification schemes and color spaces,
but matching to the name seems a bit trickier. Seems like if one has a
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 Nov 04
3
Plotting a grid of directly specified colours
Dear R-help,
Could any of you direct me to a function for plotting a grid of colours,
directly specified by a matrix of hex colour codes? In other words I'm
looking for a heatmap() or image()-like function to which I can specify the
colour of each grid location directly, rather than providing a numerical
matrix and a 1D-colour scale (heatmap, image, levelplots,NeatMap...). I'm
surprised
2008 Jun 06
4
color scale mapped to B/W
In an R graphic, I'm using
cond.col <- c("green", "yellow", "red")
to represent a quantitative variable, where green means 'OK', yellow
represents 'warning'
and red represents 'danger'. Using these particular color names, in B/W,
red is darkest
and yellow is lightest. I'd like to find color designations to replace
yellow and
2012 Oct 04
3
Problem with colors in contour plot
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-values smaller
than the (common) significance threshold, 0.05. The code from this plot is
colored in
2005 Dec 13
4
Ploting graphics using X tints from a color
Hi,
I'm trying to draw a 2D plot using multiple tints of red. The
(simplified) setup is the following: || year | x | y ||
My idea is that each year is plotted with a different tint of red.
Older year (lightest) -> Later year (darkest). I've managed to plot
this with different scales of grays simply by doing:
palette(gray(length(years):0/length(years)))
before the plot and for each
2010 Jul 07
4
Gray level mosaic plot with shading_Friendly
Suppose we start with
data("Titanic")
mosaic(Titanic, shade = TRUE)
How do I combine the dashed box contours of shading_Friendly to indicate negative residuals, with three levels of gray: dark for abs(Pearson Resid) > 4, lighter for 4 > abs(Pearson Resid) > 2, and lightest for bs(Pearson Resid) < 2 ?
Thanks,
Michael
______________________________________________
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
2008 Mar 13
2
Plot contour over filled contour
Dear R-users,
I haven't found a way in the searchable archive to overplot a contour
(lines) over a surface.
I have a (n,m) matrix that represents sea surface temperature that I
have plotted using image.plot(), filled.contour() or image(). I would
like to overplot this image with some contour lines of mixed layer depth
values(same size matrix). How can I do this?
Any help is appreciated,
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all,
I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4.
I don't want to use the heat.colors(n)
2008 Jul 07
2
Drawing a colour wheel - bug in hcl?
Hi All,
I'm trying trying to draw a colour wheel (a slice of hcl space) in R.
Running the code below doesn't give me what I expect - there's some
oddly bright colours of the wrong hue around c(0, 0) and I see three
coloured circles (a small magenta, a medium sized yellow and a large
cyan). Am I doing something wrong or is there a bug in the hcl code?
(Also any suggestions for
2008 Apr 24
2
alternatives to RColorBrewer?
I've found RColorBrewer useful for its qualitative palettes, but wished that
it could generate more than 12 qualitative palettes (e.g. with Set3). Any
suggestions for alternative color palette generators that can handle e.g. 18
distinctive colors? (I'm aware of using rainbow(), but this doesn't
generate enough distinct colors when the number of palettes is large).
Thanks,
Andrew
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
2007 Nov 26
2
2d Joint Density Plot
Hi all,
I'm fairly new to R, so I'm still trying to feel out what is available to
me. I would like to be able to plot joint density in a two dimensional plot
where density is indicated by color or darkness gradients, like a 2d color
coded topographic map. Ideally, the output would be something I could then
plot other points or lines on.
Currently, I'm calculating joint density with