search for: polygongrob

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

2009 Jun 26
1
gradient fill of a grid.polygon
...rlap well height=gy, just="bottom") if(stripe){ if(ii%%2)# plotting only every other slice grid.draw(editGrob(g, gp=gpar(fill=cols[ii], col=cols[ii], alpha=alpha))) }else{ grid.draw(editGrob(g, gp=gpar(fill=cols[ii], col=cols[ii], alpha=alpha))) } } } g <- polygonGrob(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(fill=NA, col="grey90")) g2 <- polygonGrob(x=c(0, 0.5, 1), y=c(0.5, 0, 0.5), gp=gpar(fill=NA, col="grey90")) grid.rect(gp=gpar(fill="black")) grid.rect(y=1, gp=gpar(fill="white")) gradient.polygon(g) gradient.polyg...
2010 May 30
2
geom_ribbon removes missing values
Hi everyone, it looks like geom_ribbon removes missing values and plots a single ribbon over the whole interval of x values. However, I'd rather want it to act like geom_line, that is, interrupt the ribbon for the interval of missing values and continue once there are new values. Here's an example: library(ggplot2) df <- data.frame( date = seq(from = as.Date("2010-05-15"),
2012 Feb 16
2
Defining a viewport scale in {Grid}
Am just feeling my way into the grid library, and cannot figure out how to define the plot limits. 3/5 of the example polygons below plot in the default 0-1 range viewport. But when I try to redefine the viewport the polygons plot in the same places. I also get the same result without employing push/pop. (As you can see from the scale I'm trying to introduce, I want to plot map polygons.)