similar to: How to get transparent colors to sum to complete opacity?

Displaying 20 results from an estimated 8000 matches similar to: "How to get transparent colors to sum to complete opacity?"

2011 Aug 09
1
Transparent color ramp problem
Hello, I can't seem to add transparency to any color ramp I create using colorRampPalette(). Can someone tell me if it is possible to create transparent colour ramps? I am attempting to map shaded relief under elevation data. I know I can use the terrain.colors() with the alpha option, but I would prefer to create my own colour ramp using more vibrant colours. My most recent attempt at
2008 Nov 04
2
ggplot & annotating charts
Dear "R-listers" I've been trying to figure out how to annotate charts in ggplot (ie add text to line charts, highlighted boxes etc). By and large, I can get close to what i want with base graphics, but would ideally like to use ggplot whenever possible (additionally, i would like to add text labels automatically to the chart). The code is below I suspect I need to use geom_rect,
2011 Feb 11
2
lattice auto.key gives mismatch colors
Hello All, I am using the following code to draw a figure. But the legend given buy auto.key has mismatched colors. Could any one help me? I am using R2.12.1 and most current lattice on windows XP. Thanks John library(lattice) src <- data.frame(t=rep(c('A','B','C','D'), rep(8,4)), s=rep(c(8132,8140,8178,8180,8224,8230,8337,8345), 4),
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
2007 Mar 08
2
alpha parameter in function rgb to specify color
Hi All, In function "rgb", alpha parameter is supposed to set the transparency value. But in my following two examples, it didn't work: plot(1,col = rgb(1,0,0,alpha =0.8)) # as long as alpha < 1, there is no point in the plot. plot(1,col = rgb(0,0,255, alpha=254, maxColorValue=255)) # as long as alpha < 255, there is no point in the plot. Do I use it in the right way? Any
2006 Aug 01
1
R crashes using pdf() windows() or postscript()
Dear HelpeRs, I have a script where I save several thousands of graphics. These are then used in Latex through Sweave. Unfortunately R crashes while making these plots and Windows pops up some message that I run low on virtual memory. I tried to save the plots using pdf(), windows() and postscript() and also tried to run it with R CMD BATCH myscript.R. But after a while R slows down and crashes
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
2004 Sep 17
1
Confused about specifying plot colors as RGB values
Based on reading 'rgb' documentation, I would have thought the following would have produced identical results. Can someone explain how to make this happen? I need to be able to specify an array of rgb values for the 'col' parameter. colnames.col <- c("black", "red", "blue", "green") colnames.rgb <- apply(as.matrix(colnames.col), 1,
2010 Aug 13
1
Lattice: Superimposing histograms with different colors and transparency effects
Dear users, I would like to plot several histograms superimposed on the same panel with different colors, with superimposed polygons appearing with transparency effects. I also want estimated densities to appear on the same plot. For several reasons, including that I like it, I want to use the lattice package. I have several questions regarding the use of the 'histogram' function with a
2008 Aug 15
1
map("state" ...) Is the USA cracking up?
Running R version 2.6.1 under Linux, I'm trying to use the maps and mapdata packages and the state database to produce a thematic map of the USA. My problem is that cracks (white spaces) appear between some states--e.g. between Colorado and Utah and between Michigan and Indiana. The resulting visual impression is that the country is breaking up. This occurs in all the projections I have
2011 Mar 09
1
How does the cex parameter scale circles?
I'm wondering how the cex parameter is used to scale circles (i.e. does it scale the radius, diameter, area, circumference, etc.?). In my case I'm using lattice with filled circles (pch=19). Based on example, it looks like R scales the radius of the circle: library(lattice) dta<-data.frame(x=rep(1,6),y=rep(1,6),sz=c(1,2,4,8,16,32))
2010 Dec 01
1
Font family not found in Windows font database
Dear R Gurus, I have a fairly simple problem, but I haven't been able to find the answer on 'the google' or in the r-help archives. I am generating plots on both Windows and OS X where I need to guarantee that the font used is Arial. In my plot command I specify 'fontfamily="Arial"'. The problem is that on Windows I'm getting the following warning: Warning
2010 Aug 13
1
Polygon Graph in lattice/ lattice extra
Hi, I'd like to draw a polygon graph. I used the package lattice extra which includes a function for that (see: http://latticeextra.r-forge.r-project.org/#panel.xyarea&theme=default). But i don't want the polygon ending with its filled border at the x-axis (like in my code). Instead it should be rotated about 90 degrees and end with its filled border at the y-axis. I'm pleased
2013 Jun 25
1
Correct scaling of axis in persp3d plot
Hi, I want to format my axis in my persp3d plot. With my data, which I attached I created a persp3d plot with the following code, which I summarized from different code snippets I found: library(rugarch)library(rgl)library(fGarch)fd <-as.data.frame(modelfit,which ='density')color <-rgb(85,141,85,maxColorValue=255)x <-seq(-0.2,0.2,length=100)y <-c(1:2318)f
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
2007 May 18
2
displaying intensity through opacity on an image
Dear colleagues, I have an image which I can display in the greyscale using image. On this image, for some pixels, which I know, I want to display their activity based on a third measure. One way to do that would be to color these differently, and use an opacity measure to display the third measure. An example of what I am trying to do is at:
2009 Oct 30
4
opacity under dispersion command under plotrix
Is there anyway to make the lines in the dispersion command come forward in a plot and allow the fill in the dispersion parameter be transparent so all of the lines I am using to note confidence intervals are shown? ------------------------------------------- Joe King, M.A. Ph.D. Student University of Washington - Seattle 206-913-2912 jp@joepking.com
2023 Jul 23
2
col2rgb() function
Hello I have a palette vector of colour blind colours (in hexadecimal) which I?m using for plots, but they are not see-through, and as I wanted to overlay some histograms I wanted to convert these colours to rgb, when you can set the opacity. I have found the function col2rgb(), which works in the sense that it gives a vector of numbers but these don?t work directly in rgb because they are too
2011 Sep 21
0
heatmap.2 with colsep and sepwidth
I am using attributes colsep and sepwidth from heatmap.2 function, however when using larger values for sepwidth the following columns are not moved to the right but the seperator is covering the column(s) with a white bar and the column labels and ColSideColors remain at their positions, is this intended? I expected the following columns to be shifted to the right by sepwidth. Is there a way
2010 Jan 04
0
ggplot2 = bar size
Hi, i am newbie into ggplot and i thow that i have to learn a lot about this package. I am doing this function to draw an graphic: library(ggplot2) posx <- theme_text(angle=45,hjust=1,face='bold',size=12) posy <- theme_text(angle=0,hjust=1,face='bold',size=12) y1 <- c(1,4,6,1,8,10,6,1,5,4) x <-