ggplot2 plotmatrix - テキストラベルを変更します
質問
私はggplot2でplotmatrix
機能(ggplot2_0.8.8)を使用していますし、列名を上書きしたいと思います例えば、私のデータフレームから表示されます。
plotmatrix(mtcars) + opts(strip.text.x = theme_text(size=20))
私はOPTSとstrip.text.xとstrip.text.yの特性を変えることができるが、ここで、Iは、例えば、テキスト自体を変更することができ私はCOLNAMEなどの問題が発生する「マイル/ガロン」に置き換え、「MPG」をしたいと思います。私は私が既存のCOLNAMESのための任意のテキストを置き換えることができますlabeller
でfacet_grid
オプションのようなものがあるかもしれないと仮定?
解決
の列の名前を変更します。
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))
所属していません StackOverflow