2017-07-05 4 views
-1

私はggplotを使ってPCAplotでプロットしたい8つの変数を持っています。 ggplotはデフォルトで6を使用させます。ggplot - デフォルト設定として6以上のシンボルを使用する

私はscale_shape_manual関数を認識していますが、自動的にすべてのプロットに適用されるようにggplot設定を変更する方法を探したいと思います。

私のプロットごとに "scale_shape_manual"仕様を挿入する必要はありません。それを行う方法はありますか?

ありがとうございました

答えて

1

あなた自身の機能を作成してください。例えば、

my_ggplot <- function(...) { 
    ggplot(...) + scale_color_distiller(palette = 2) 
} 

ggplot(mtcars, aes(qsec, hp, col = cyl)) + geom_point(size = 5) 

enter image description here

my_ggplot(mtcars, aes(qsec, hp, col = cyl)) + geom_point(size = 5) 

enter image description here

関連する問題