I've noticed when I use the capped axis lines, it moves the labels closer to the ticks, and I can't figure out how to move them back. Is there some argument I can't find? Here's some reproducible code.
library(ggplot2)
library(lemon)
dat1 <- data.frame(
gp = factor(rep(c('F','T','Z'), each = 10)),
y = rnorm(30))
my.theme <- theme_light() +
theme(panel.border=element_blank(),
axis.line = element_line(),
axis.ticks = element_line(colour='black'))
p <- ggplot(dat1, aes(gp, y)) + geom_point() + my.theme
##############
#### Notice how the FTZ is closer to the tick marks in the capped version
p
p + coord_capped_cart(bottom='right')
##############
#### Normally you could bump the margin, but that doesn't work here
p + theme(axis.text.x = element_text(margin=margin(t=10)))
p + theme(axis.text.x = element_text(margin=margin(t=10))) +
coord_capped_cart(bottom='right')
Aaron R. wrote: