当在ggplot2 2.0中使用axis.ticks.margin时,我收到一条警告消息:
axis.ticks.margin
is deprecated. Please set margin
property of axis.text
instead.
我以为我可以尝试axis.text.margin,但我收到另一个警告说这是一个无效的功能.发行说明说:
The theme setting axis.ticks.margin
has been deprecated: now use the margin property of axis.ticks.
那么现在的保证金设置在哪里?
请参阅
theme
上的ggplot 2.0文档:
axis.text
tick labels along axes (element_text; inherits from text)
这应该在一个element_text元素中.其doc点功能保证金.沿着这些路线的东西应该起作用:
+ theme(axis.text.x = element_text(margin=margin(5,5,10,"pt")),axis.text.y = element_text(margin=margin(5,"pt")))