Displaying 20 results from an estimated 10000 matches similar to: "Howto fix colors in colorRampPalette?"
2013 Jul 24
1
Alpha channel in colorRamp() and colorRampPalette()
Hi all,
I had the need to create a colorbar considering the alpha channel of the colors, but colorRamp() and colorRampPalette() ignored the alpha argument in rgb(). So I performed some minor modifs. in their codes, as to support the interpolation using the alpha channel.
I guess that those simple modifications might be useful for other people, so perhaps it would be worth to add them to
2011 Jun 09
0
How to shift the heat map
Hi, what i need is as the example i attached in the box plot. As you can
see, the boxplot have margins and it kind
of follow the coding I've added, but, it does not happen for the heat
map. Could you help me with this.. Thanks in advance.
the following is the coding i've used:
# Draw the heatmap
# heatmap.r
#
# Purpose: Create a heatmap
#
# Input: Data matrix as
2005 Aug 04
0
FW: color palette
Try:
n = 100;
x = matrix(seq(-10, 30, length.out=500), ncol=1)
col = colorRampPalette( c("green", "white", "red"), space="rgb")(n) breaks =
c(seq(-10, 0, length.out=n/2)-0.5, 0, seq(0, 30, length.out=n/2)+0.5)
image(x, col=col, breaks=breaks)
See also today's discussion on R-Help about "red-black-green color palette",
since most of the
2006 Jan 09
0
need palette of topographic colors similar to topo.colors ()
I will second Roger's suggestion, colorRampPalette is a great function for
creating your own palettes. For example, Matlab's jet palette (also
available in fields package under peculiar name 'tim.colors') can be defined
by:
jet.colors = colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan",
"#7FFF7F", "yellow",
2005 Aug 03
3
red-black-green color palette?
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to create one?
Thanks,
Jake
2009 Sep 12
0
consistent results with heatmap.2
Hi,
I am trying to create a heatmap with some specific requirements. Specifically,
I need to be able to center the color-scale around 0, and I need to truncate the
data so that a few extreme values do not cause the rest of the heatmap to appear
black (on a red/green scale).
After reading through and experimenting with heatmap, heatmap.2, heatmap_plus,
and heatmap_2, I believe heatmap.2 will
2013 Feb 20
1
Problem with levelplot() in a loop
Dear R users,
I am trying to print heatmaps in a loop (with a pause). Idea is to
visualize changing correlations over time and for testing I wrote this
simple (reproducible) code below.
My problem is that levelplot() does not produce any output when I run the
code (though heatmap does). Ideally I would like to use levelplot() as it
produces a neat index on the side indicating the color and the
2009 Nov 30
1
Continuous legend colors
Dear List,
I am trying to get a basic plot to show a continuous range of fill colors. It is probably easiest to demonstrate. I would like a legend like in the following example:
Satellite.Palette <-colorRampPalette(c("blue3","cyan","aquamarine","yellow","orange","red"))
require(fields)
image.plot(volcano, col = Satellite.Palette
2005 Oct 04
1
heatmap ordered list
Hi,
another problem on heatmaps... after generating the graph with
myBlRd <- colorRampPalette(c("blue", "red"))
heatmap(dataHeat[Top100, ], col=myBlRd(15))
i need to retrieve the row names' list ordered by the dendrogram.
I tried with "rownames(data)[Top100]" but the list is not ordered
(as i can see in the generated picture). Any tips?
Tnx
AZ
--
2005 Aug 04
2
color palette
Hi, I have a matrix with both positive and negative
numbers, I would like to use image() to draw a
heatmap. How can I can design a palette (or is there a
function already available) that treat negative
numbers in a blue gradient and positive numbers in a
red gradient and treat 0 as white?
Thanks
2010 Oct 08
2
Heatmap/Color Selection(Key)
Hi
I made heatmap of QTL based on Lod score. Where I have traits in columns and
marker data (rows). I can not cluster both column and rows as I need the
right order for marker data.
Can someone suggest me better way of generating heatmaps especially the
colour key I want to select to visualize the results which are more
interesting to look at.
> library(gplots)
>
2008 Aug 06
2
Attempting to make a custom color spectrum to use in heatmap.2
Hello there! I'd just like to say in advance, "Thank you," for any help
and/or advice.
My problem is as follows:
I have a dataset that is made up of percentages. I've assigned my
"error" percentages a value of '-100', my "non-existent" percentages a
value of '0', and all my other percentages are normal values that range
from the high
2012 Sep 28
1
Heatmap Colors
Hello R-Users!
I'm using a heatmap to visualize a matrix of values between -1 and 3.
How can I set the colors so that white is zero, below zero is blue of
increasing intensity towards -1 and above zero is red of increasing
intensity towards red?
I tried like this (using the marray and gplots packages from bioconductor):
mcol <- maPalette(low="blue", mid="white",
2016 Apr 16
1
Mean of hexadecimal numbers
Hm...,
Should these two versions produce the same solution? Unfortunately and
shame to confess, I don't know much about the colors in R:
myColors <- c("#FF7C00","#00BF40","#FFFF00")
Colors=rgb2hsv(col2rgb(myColors))
apply(Colors,1,mean)
h s v
0.2122974 1.0000000 0.9163399
* * * * *
# Average the 1st two by taking the middle colour
2009 Apr 17
1
ColorRamp different from ColorRampPalette
I try to use ColorRamp as ColorRampPalette (i.e. with the same gradient), but
it seems there is a nuance that I've missed.
pal.crp<-colorRampPalette( c("blue", "white", "red"), space = "rgb")
plot(rep(0,40),pch=16,col=pal.crp(40))
# is great
But, using the same gradient with colorRamp is giving erratic colors.
pal.cr<-colorRamp(
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 Aug 23
1
figure-definition and heatmap question
Hello,
I have two questions. I'd like to visualize data with a heatmap and I have the
following testcase:
x <- rnorm(256)
nx <- x + abs(min(x))
nnx <- 255/max(nx) * nx
x <- matrix(nnx, 16, 16)
rownames(x) <-
2016 Apr 16
0
Mean of hexadecimal numbers
On 16/04/2016 12:33 PM, Atte Tenkanen wrote:
> Hm...,
>
> Should these two versions produce the same solution?
I wouldn't expect them to.
Duncan Murdoch
Unfortunately and
> shame to confess, I don't know much about the colors in R:
>
> myColors <- c("#FF7C00","#00BF40","#FFFF00")
> Colors=rgb2hsv(col2rgb(myColors))
>
2019 Apr 01
2
New grDevices::hcl.colors()
Hi everyone,
I wanted to draw your attention to a new post on the
developer.R-project.org blog:
https://developer.R-project.org/Blog/public/2019/04/01/hcl-based-color-palettes-in-grdevices/
A new function grDevices::hcl.colors() greatly extends the color palette
functionality available in base R. Also, the defaults in the heatmap
functions image() and filled.contour() have been adapted
2011 Aug 31
1
unequal bins in filled.contour
Hello,
I am trying to plot SADIE red-blue plots of cluster indicies using
filled.contour. I want a plot which only has three bins for the data:
<-1.5, -1.5 - 1.5, >1.5, but I am having trouble getting there.
example
X1 X2 X3 X4 X5
1 -5 -4.5 1.0 4.5 6
2 -3 -2.0 1.2 -1.0 3
3 0 0.0 0.0 -0.5 -1
4 -2 -3.0 1.0 1.5 3
5 -6 -2.0 0.5 3.0 2
example<-as.matrix(example)