When using axis.ticks.margin in ggplot2 2.0, I got a Warning message:
axis.ticks.marginis deprecated. Please setmarginproperty ofaxis.textinstead.
I thought I could try axis.text.margin but I got another warning saying it was an invalid function. The release notes say:
The theme setting
axis.ticks.marginhas been deprecated: now use the margin property of axis.ticks.
So where is the margin setting now?
See the ggplot 2.0 doc on theme:
axis.text
tick labels along axes (element_text; inherits from text)
This should be in an element_text element. Its doc points to function margin. Something along those lines should work:
+ theme(axis.text.x = element_text(margin=margin(5,5,10,5,"pt")),
axis.text.y = element_text(margin=margin(5,5,10,5,"pt")))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With