similar to: Alpha channel in colorRamp() and colorRampPalette()

Displaying 20 results from an estimated 1000 matches similar to: "Alpha channel in colorRamp() and colorRampPalette()"

2018 Oct 03
1
grDevices::convertColor and colorRamp(space='Lab') Performance Improvements
`grDevices::convertColor` performance can be improved by 30-300x with small changes to the code. `colorRamp(space='Lab')` uses `convertColor` so it too benefits from substantial performance gains. `convertColor` vectorizes explicitly over the rows of the input color matrix using `apply`. The level-1 patch [1] illustrates a possible minimal set of changes to achieve this with just R
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 Mar 26
0
ColorRamp different from ColorRampPalette
Try the rgb function in the grDevices library. pal.cr<-colorRamp( c("blue", "white", "red"), space = "rgb") plot(rep(0,40),pch=16,col=rgb(pal.cr((0:40)/40),max=255)) Troy -- View this message in context: http://n4.nabble.com/ColorRamp-different-from-ColorRampPalette-tp889372p1692642.html Sent from the R help mailing list archive at Nabble.com.
2018 Sep 14
1
Possible bug with chromatic adaptation in grDevices::convertColor
It appears that the chromatic adaptation feature of `grDevices::convertColor`is broken, and likely has been for many years.? While a little surprising, it is an obscure enough feature that there is some possibility this is actually broken, as opposed to user error on my part.? If it turns out to the latter, I apologize in advance for spamming this list. Consider: ??? rgb.in <-
2016 Apr 16
0
Mean of hexadecimal numbers
On 16/04/2016 8:47 AM, Atte Tenkanen wrote: > Hi, > > How would you calculate the "mean colour" of several colours, for > example c("#FF7C00","#00BF40","#FFFF00")? > Bert answered your subject line question. Your text is asking something else: if those are colours, you don't want to treat each of them as a single integer. A
2013 Jun 12
2
grDevices::convertColor XYZ space is it really xyY?
grDevices::convertColor has arguments 'from' and 'to' which can take on value 'XYZ'. Can someone confirm that 'XYZ' is the same as the CIE chromaticity coordinates that are also sometimes refered to as 'xyY' in the literature? Or are these the CIE tristimulus values? It looks to me like the first case is true, but I would appreciate hearing from one of
2010 Sep 21
1
Colorramp in Maptools, how to choose min and max values for the fg= argument
Hello, I am using maptools for plooting geographical data. The colour of the region indicates some region dependent value (population for example). I pass the colours of the regions to the plot.Map function by defining the foreground colour: jet.colors = colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow",
2016 Apr 16
5
Mean of hexadecimal numbers
Hi, How would you calculate the "mean colour" of several colours, for example c("#FF7C00","#00BF40","#FFFF00")? Yours, Atte Tenkanen
2007 Dec 06
1
[R] color palette from red to blue passing white (shifted from R-help)
Hi, The move to sRGB is nice, is there any interest in adding an interface to lcms, http://www.littlecms.com, to allow gamut matching? I can think of a lot of instances where I would like to render a figure as it would appear on my printer. This is probably best done as a separate package though, at least at first. Nicholas Martin Maechler wrote: >>>>>> "Paul" ==
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
2020 Apr 30
4
problem with `viridis` on Ubuntu 20.04
Il 30/04/20 03:14, Dirk Eddelbuettel ha scritto: > > On 30 April 2020 at 03:05, Samuele Carcagno wrote: > | Il 30/04/20 01:39, Dirk Eddelbuettel ha scritto: > | > Keep. It. Simple. And. Concise. > | > > | > And reproducible. > | > | I've attached a script that triggers the bug on my system. It's just two > | lines, one to load `viridisLite`, and one to
2011 Apr 22
1
Dual colour ramps based on pos/neg values
Hi Everyone: I'm going a little nuts here and am hoping someone might have some ideas to help out. Here is my problem: I am using the calendarHeatMap function (http://blog.revolutionanalytics.com/2009/11/charting-time-series-as-calendar-heat-maps-in-r.html) to plot some values of percentages above or below a watermark. In other words, I have a time series whose data can range arbitrarily
2008 Oct 27
1
Problem with script
Hello :-) I am trying to run the next script, it generates "random areas" inside a map of the american continent, and then plot it, it?s suppose that every frame gives you the evolution of the program but at some point it stops with the weirdest of the errors I?ve ever seen in R, I don?t even have a line like that :-| Error in if (random_matrix[x_list[random_sq] - 1,
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
2005 Oct 03
5
heatmap
Hi, i created a graph with heatmap(sma) function: heatmap(dataHeat(x)) and I wish to change the gradation of colors from blue to red, how could i do? Using "heatmap(dataHeat(x), col=c(2,4))" i will use only 2 colors without gradation. Ty so much Andrea
2009 May 20
4
Functions returning functions
Dear All: I have a question regarding the behavior of functions. Say I define a function that returns another function : A <- function(parameters) { # calculations w/ parameters returning 'y' tmpf <- function(x) { # function of 'y' } return(tmpf) } The value of the parameters are stored in an environment local to the function. Then I call x<- something
2010 Nov 20
1
Setting a Red->Yellow->Green Color Transition in Image(...) with yellow corresponding with the Mean Value...
In the following example I would like to have the color transition from Red->yellow->green in the image(...) function, and if possible have the yellow be set to correspond with the mean value (for the below 75). ? I was able to figure something like out when using filled.contour(...), e.g. filled.contour(ak.fan, levels = c(70, 73, 76,?80, 90), color = terrain.colors) (I still
2009 Mar 27
3
color vectors other than gray()
I'm trying to create a graph where different cells of a grid (a shapefile) will be painted with a color share scale, where the most easy way is to use gray(). Can I somehow get a vector (gradient) of colors, a vector of colors with other methods but gray()? I'm doing this until now quad_N_sp <-
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)) >
2012 Jul 13
4
R-squared with Intercept set to 0 (zero) for linear regression in R is incorrect
Hi, I have been using lm in R to do a linear regression and find the slope coefficients and value for R-squared. The R-squared value reported by R (R^2 = 0.9558) is very different than the R-squared value when I use the same equation in Exce (R^2 = 0.328). I manually computed R-squared and the Excel value is correct. I show my code for the determination of R^2 in R. When I do not set 0 as the