i’m looking for some help in creating a faceted plot with angeled x-axis tick labels, which is probably best explained by the following example:
require(ggplot2)
df <- data.frame(group=factor(c('sex','sex','race','race')), variable=c('Female','Male','White','African American'), value=1:4)
p <- ggplot(aes(x=variable, y=value), data=df)
p <- p + geom_line()
p <- p + facet_grid(. ~ group, scale="free")
p <- p + opts(axis.text.x=theme_text(angle=45,hjust=1,vjust=1))
ggsave(p, file='faceted.pdf', width=6, height=4)
which produces this figure where the x-ticks on the right are misaligned:

it seems that the problem is introduced when using scale="free" in the facet_grid and is related to the varying tick label length.
any suggestions are greatly appreciated.
Looks like a bug: https://github.com/hadley/ggplot2/issues/221 that has apparently been fixed in ggplot2 0.9 and later.
(Too bad for me!)
Bug reproducible with: