我使用在GGPLOT2(ggplot2_0.8.8)的plotmatrix功能和想覆盖的列名从我的数据帧,e.g显示。

plotmatrix(mtcars) + opts(strip.text.x = theme_text(size=20))

我可以改变strip.text.x的属性,并与strip.text.y OPTS,但我在哪里可以改变文本自身例如我想“省油”的“英里/加仑”这会导致问题的colname的更换。我想可能有一些像labellerfacet_grid选项,让我来代替任意文本对现有colnames?

有帮助吗?

解决方案

重命名的列。

x <- mtcars ## just because I like x.
colnames(x)[1] <- "Miles/Gallon" ## rename all by dropping [1] and using c(...)
plotmatrix(x) + opts(strip.text.x = theme_text(size=20))
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top