我正在使用ggplot2 (ggplot2_0.8.8)中的plotmatrix函数,并希望覆盖数据帧中显示的列名,例如
plotmatrix(mtcars) + opts(strip.text.x = theme_text(size=20))我可以使用opts修改strip.text.x和strip.text.y的属性,但是我可以在哪里修改文本本身,例如,我希望用"Miles / Gallon“替换"mpg”,这会导致colname出现问题。我假设在facet_grid中可能有类似labeller选项的东西,它允许我用任意文本替换现有的列名称?
发布于 2010-09-30 03:52:09
重命名这些列。
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))https://stackoverflow.com/questions/3825065
复制相似问题