similar to: col2rgb() function

Displaying 20 results from an estimated 300 matches similar to: "col2rgb() function"

2023 Jul 23
2
col2rgb() function
Thanks That works nicely Nick On Sun, 23 Jul 2023 at 19:26, Ben Bolker <bbolker at gmail.com> wrote: > Does adjustcolor() help? > > cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", > "#D55E00", "#CC79A7") > plot(0,0,xlim=c(1,8),ylim=c(0,1)) >
2023 Jul 23
1
col2rgb() function
Does adjustcolor() help? cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", "#D55E00", "#CC79A7") plot(0,0,xlim=c(1,8),ylim=c(0,1)) points(1:8,rep(0.5,8),col=cb8,pch=19,cex=2) points(1:8,rep(0.75,8),col=adjustcolor(cb8, alpha.f = 0.3), pch=19,cex=2) On 2023-07-23 2:15 p.m., Nick Wray
2023 Jul 23
1
col2rgb() function
Just one addition which may or may not be useful: The color palette you use is also known as "Okabe-Ito" and it is the default set of colors in the palette.colors() function. This function also has an optional alpha argument. So if you want to generate these colors with an alpha of 0.3 you can also do: palette.colors(8, alpha = 0.3) or more explicitly palette.colors(8, palette =
2023 Jul 23
1
col2rgb() function
Nick, I've also made colors transparent by pasting the hex equivalent of, say, 0.3*256 = 76.9 to the hex color code. e.q. for black it might be "#0000004d" and the 4d is 77 in hex. That way you don't need to convert back and forth so much. If col is "#000000" the transparent version is tcol <- paste0(col,"4d") This would work in one step on a whole
2023 Aug 02
2
Choosing colours for lines in ggplot2
Hello - I am trying to plot flows in a number of rivers within the same plot, and need to colour the lines differently, using a colour-blind palette. Code beneath works but has colours assigned by the program I have made some simple dummy data: ## code 1 cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
2017 Jul 12
1
Problem for installing cbPlatte on R Version 3.4.1
On 12.07.2017 12:35, Shanu Singh wrote: > Hi John, > > Thanks for reply ! Sorry It was my mistake. It is *cbPalette. *Basically > its a R package. Come on. - Where do you want to get thsi from? - What have you tried to do so? Please re-read the posting guide that helps to ask good questions. Best, Uwe Ligges > > > Shanu > > On Wed, Jul 12, 2017 at 3:57 PM, John
2017 Jun 30
0
Multiple "scale_color_manual" statements in one plot (ggplot2, flexible legend challenge)
Dear list, I am facing an unusual situation where I need to create two sets of legends based on the color mapping. Can't get exactly what I want and really appreciate any advice from ggplot experts. Let's say I have the first dataset "df1" that draws some points and based on which a "loess" line with confidence interval is added. Then the second dataset
2013 Jun 07
1
col2rgb, factors & documentation
Hello Core Folk. Quite by accident I discovered today that col2rgb, when fed factors, acts on the integer representation of those factors: td <- as.factor(rainbow(5)) # not how I discovered the issue! td res <- col2rgb(td) res # but col2rgb("#FF0000FF") # this is td[1] but does not produce the same answer res[,1] # moreover as.integer(td) col2rgb(5) # the integer value of the
2006 Aug 01
2
rgb and col2rgb color conversion/modification/shading
I want to get a lighter shade of a color...I have a lot of colored objects and want each one printed as a foreground against a slightly lighter background. I thought I could try something like changing the alpha channel by first converting it to rgb. But prior to trying that, I'm stuck with how to get the color after converting using col2rgb() to be interpreted again as a color, rather than
2008 Mar 18
1
How to reverse colors in filled.contour?
Hi, I am plotting values of log(hazards ratio) as a function of two predictors, using the plotting function filled.contour(). Here is a simple simulated example of this: x <- seq(0,1, length=20) y <- seq(0,1, length=20) z <- outer(x,y, function(x,y) x^2 + y^2 ) zmat <- matrix( rexp(n=400, rate = z+0.001), 20, 20) filled.contour(x, y, log(zmat),
2010 Jun 06
2
Color scale graphic
Hello Recently, I've been dealing with a seemingly simple problem. I have a table with two columns filled with values from a test I made (say, amount of precipitation and Months measured). Now, instead of plotting a typical linear graphic with precipitation on the y-axis and the months in the x-axys, I would like to "convert" the values of precipitation in a color gradient,
2009 Apr 07
1
extract values from summary
Hi: # How can I extract the 'Forecasts' from the 'summary(predicted)' from the example below? library(forecast) weightData <- data.frame(weight = c(2.1,2.4,2.8,3.6,4.1,5.2,6.3),week= 1:7) weight <- as.numeric(weightData$weight) predicted <- forecast(weight,h=3,level=95) # see the predicted summary(predicted) # I would like to extract the three predicted values and #
2008 Dec 03
1
reduce limit number of arguments in methods:::cbind
Dear all, As far as I understand, the number of arguments in methods:::cbind is limited by the "self recursive" construction of the function which generates nested loops. A workaround could be to use the internal cbind function on blocks of non S4 objects. The limitation would then be reduced to the number of consecutive S4 objects. ##### R code ##### dfr <- data.frame(matrix(0,
2010 Dec 15
1
Using Metafor package: how to backtransform model coefficients when Freeman Tukey double arcine transformation is used
Hello, I am performing a meta-analysis using the metafor package. My data are proportions and I used the Freeman Tukey double arcine (FT) transformation to fit the random effects model. Now I want to create a forest plot with my estimates backtransformed to the original scale of proportions. Can this be done? Regards, Patricia
2009 Feb 15
3
conditions on association include, hacky but more or less solved
Hi all, I just finally figured out how to get 2.2.2 to do this, and thought I''d share in case others run into the same thing. The situation is a find with associations, but the tricky part is that the association shouldn''t always be loaded. This is similar to putting a condition on a has_many association in a model, but the condition is dynamic rather than predefined. The
2010 Jun 09
0
fitting t copula
Hi r-users, I try to fit the t copula using the gamma marginals.  But I got error message which I don't really understand. Thank you for any help given. myCop.t <- ellipCopula(family = "t", dim = 2, dispstr = "toep", param = 0.5, df = 8) myCop.t myMvd <- mvdc(copula = myCop.t, margins = c("gamma", "gamma"), paramMargins = list(list(mean = 0, sd
2009 Nov 30
4
Is there a way to convert rgb/hex value to a (nearest) color name?
Hi all, I'm trying to convert a series of rgb codes into a color name. What is my easiest option? So far I'm stuck with just converting to hex using rgb() and I know R knows a number of colours() but a mapping of the two has failed me. Any help in this regard will be highly appreciated. Regards, George
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
2003 Aug 29
2
Lattice plot questions
Win2k, R1.7.1: I am currently working with some growth curve data from a biotoxicology experiment. Each of 12 subjects had their blood drawn at 0, 2, 4, 6, 8, and 10 weeks. For the purposes of the project, it would be helpful if I were able to do the following: a. Produce 12 panels, each displaying the *same* data, with the "strip" at the top of a particular panel showing
2016 Apr 16
0
Mean of hexadecimal numbers
Since these are color strings, you can use functions in the grDevices package (other others) to manipulate them. E.g., you can convert them to various color spaces and perhaps use the mean in one of those spaces as your 'average color'. > myColors <- c(One="#FF7C00",Two="#00BF40",Three="#FFFF00") > col2rgb(myColors) One Two Three red