similar to: ColorRamp different from ColorRampPalette

Displaying 20 results from an estimated 1000 matches similar to: "ColorRamp different from 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
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.
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
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
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
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
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
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 Jul 05
1
Linux-Windows problem
Dear All, I faced the following problem. With the same data.frame the results are different under Linux and Windows. Could you help on this topic? Thanks in advance, Ildiko Linux: > d = read.csv("CRP.csv") > d$drugCode = as.numeric(d$drug) > cor(d, use="pairwise.complete.obs") PATIENT BL.CRP X24HR.CRP X48HR.CRP drug drugCode PATIENT NA
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)) >
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
2018 May 22
2
Bootstrap and average median squared error
I forgot, you should also set.seed() before calling boot() to make the results reproducible. Rui Barradas On 5/22/2018 10:00 AM, Rui Barradas wrote: > Hello, > > If you want to bootstrap a statistic, I suggest you use base package boot. > You would need the data in a data.frame, see how you could do it. > > > library(boot) > > bootMedianSE <- function(data,
2018 May 22
0
Bootstrap and average median squared error
Hello, If you want to bootstrap a statistic, I suggest you use base package boot. You would need the data in a data.frame, see how you could do it. library(boot) bootMedianSE <- function(data, indices){ d <- data[indices, ] fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) ypred <- predict(fit) y <- d$crp median(y - ypred)^2 } dat <-
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
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts, I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ? Here is the reproducible example. ############################# install.packages( "quantreg" ) library(quantreg) crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67) bmi
2018 May 22
1
Bootstrap and average median squared error
Hello, Right! I copied from the OP's question without thinking about it. Corrected would be bootMedianSE <- function(data, indices){ d <- data[indices, ] fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) ypred <- predict(fit) y <- d$crp median((y - ypred)^2) } Sorry, rui Barradas On 5/22/2018 11:32 AM, Daniel Nordlund wrote: > On 5/22/2018
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 <-
2018 May 22
0
Bootstrap and average median squared error
On 5/22/2018 2:32 AM, Rui Barradas wrote: > bootMedianSE <- function(data, indices){ > ???? d <- data[indices, ] > ???? fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) > ???? ypred <- predict(fit) > ???? y <- d$crp > ???? median(y - ypred)^2 > } since the OP is looking for the "median squared error", shouldn't the final line of the
2006 Jan 07
2
Question about graphics in R
Considering the R function/plot shown below, I wonder whether it is possible to do the following changes: (1) Change the color of each point to be picked from list of colors according to its z-value. (The range should be from blue (z=0) to red (z=1).) The grid should then be omitted. [I have seen "terrain.colors", but don't know how to use it for this purpose.] (2) Add two lines to