Hi Mark,
>Is it the case that in ggplot2 2.1.0, margins can be used to move
>"axis.title.x" up or down, but not left or right?
See ?element_text and ?margin
I'm going to make a mess of this; but my understanding of margins, which
is minimal, is that they define a clear space around the element's
container. This may result in a shift in the element/change in other bits
of the plot to facilitate that. If you look at ?element_text it says:
"When creating a theme, the margins should be placed on the side of the
text facing towards the center of the plot."
Which would imply that the left and right margins are not relevant for
axis.title.x. Do they act if set to a really big value? Or if something
else is placed at the same horizontal level (i.e. something to keep clear
of?)? I don't know, but I can see that the margin is not the way to move
the axis.title.x about.
To move the element within it's container (grid object?) you'd want to be
using hjust and vjust (hjust to shift axis.title.x left or right). If
using vjust, you might need to specify the lineheight in the theme call
too.
Hope this helps a bit.
Ron.