I\'m hoping I can combine the spiffy importing and drawing powers of grImport with the awesome graphing power of ggplot2, but I simply don\'t under
For a single panel, it is fairly straight-forward to extract information from the x axis grob, and replace it with your own. I'm not sure how this could be extended cleanly to automatic, multi-panel axes.
library(grid)
library(ggplot2)
p <- qplot(1:12, rnorm(12))
grid.newpage()
g <- ggplotGrob(p)
grid.draw(g)
g0 <- getGrob(g, gPath("axis.text.x"), grep=TRUE)
grid.set(gPath("axis.text.x"),
pointsGrob(x = g0$x, y=0*g0$x + unit(0.5,"npc"),
pch=19, gp=gpar(col=seq_along(g0$x)),
name = g0$name), grep = TRUE)
