I am currently using the latest version of ggplot2 from github.
In version 0.8.9 I could do the following to increase space between axis.title and axis.text:
Before:
ggplot(diamonds, aes(clarity)) + geom_bar() + opts(
axis.title.x = theme_text(vjust=-1.1)
)
Fix:
ggplot(diamonds, aes(clarity)) + geom_bar() + opts(
axis.title.x = theme_text(vjust=-1.1),
plot.margin = unit(c(1, 1, 0.8, 0.5), "lines")
)
and the axis.title becomes fully visible.
In the latest github version of ggplot2 plot.margin has no effect on axis.title:
ggplot(diamonds, aes(clarity)) + geom_bar() + opts(
axis.title.x = theme_text(vjust=-0.2),
plot.margin = unit(c(1, 1, 2, 0.5), "lines"))
(notice the increased bottom margin - I can't get plot.background to work in the latest development version)
It seems that 0.8.9 allows axis.title to move over the extra space created by plot.margin, but this is not allowed in the latest development version.
Is there a new way to accomplish this task (or a quick fix for it) in the latest development version?
Any help appreciated.