I am using directlabels for the first time today and as this is a new package the documentation is pretty sparse still. I have created a faceted density plot similar to this data and the labels could all be moved up and slightly right.
If this were mtext I could use adj
and padj
to move the text around. How would I do the same to the labels below. Move every label slightly up and slightly right?
library(directlabels); library(ggplot2)
g <- ggplot(CO2, aes(x=conc, group=Type))
h <- g + geom_density(aes(colour=Type)) +facet_grid(Treatment~.)
direct.label(h)
This is the last bit until I have a figure ready for publication and so help here would be much appreciated.
EDIT The top.bumptwice
doesn't move the text up quite enough. I would like more control over the move.
I asked the author and you can pass the moves to
direct.labels
as a list: