search for: e41a1c

Displaying 3 results from an estimated 3 matches for "e41a1c".

2009 Jun 26
1
gradient fill of a grid.polygon
...npc",TRUE) new.xy <- matrix(c(x.center, y.center), ncol=2) %*% matR editGrob(g, x=unit(new.xy[,1],"npc") + gravity.x, y=unit(new.xy[,2],"npc") + gravity.y) } gradient.polygon <- function(g, n=100, cols=colorRampPalette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3"))(n), alpha=0.5, stripe=FALSE, angle=0){ vp = viewport(angle = angle) g = rotate.polygon(g, - angle) gx <- grobWidth(g) gy <- grobHeight(g) dx <- unit(convertX(gx, "npc", valueOnly = TRUE)/(n-1), "npc...
2008 Aug 25
1
lattice : using both strip and strip.left
...rame(x=x, one=y1, two=y2, condition1=factor(c("a", > "b")), condition2=factor(c("1","1", "2", "2"))), > id=c("x", "condition1", "condition2")) > > # custom colors > myColors <- c( "#E41A1C", "#377EB8") > > # here is the ggplot2 version > p <- qplot(x,value, data=df, facets = condition1 ~ condition2, > colour=variable) > p <- p + scale_colour_manual(values = myColors) > print(p) > > # lattice version > lattice.options(default.theme = c...
2008 Aug 01
0
standardize ggplot and lattice themes
...ste > library(ggplot2) > library(lattice) > > # example data > x <- seq(0, 10, len = 100) > y1 <- jitter(sin(x), 1000) > y2 <- 0.5*jitter(cos(x), 1000) > > # custom colors > greyDark <- grey(0.5) > greyLight <- grey(0.9) > myColors <- c( "#E41A1C", "#377EB8") > palette(myColors) > > # here is the ggplot2 version > df <- melt(data.frame(x=x, one=y1, two=y2), id="x") > p <- qplot(x,value, data=df,colour=variable, linetype=variable, > main="ggplot2 (almost) defaults") > p <- p...