1

plotmatrixggplot2(ggplot2_0.8.8)の関数を使用していて、データフレームから表示される列名をオーバーライドしたいと思います。

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

optsを使用してstrip.text.xとstrip.text.yのプロパティを変更できますが、テキスト自体をどこで変更できますか。たとえば、「mpg」を「Miles / Gallon」に置き換えて、列名として問題が発生するようにします。既存のcolnamesの代わりに任意のテキストを使用できるlabellerオプションのようなものがあると思いますか?facet_grid

4

1 に答える 1

0

列の名前を変更します。

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))
于 2010-09-29T19:52:08.780 に答える