デフォルトのコマンドによって異なる場所に凡例を置くことができます。
legend("center", uniq, cex=0.5,fill=cols)
legend("bottomright", uniq, cex=0.5,fill=cols)
legend("bottom", uniq, cex=0.5,fill=cols)
legend("bottomleft", uniq, cex=0.5,fill=cols)
legend("left", uniq, cex=0.5,fill=cols)
legend("topleft", uniq, cex=0.5,fill=cols)
legend("top", uniq, cex=0.5,fill=cols)
legend("topright", uniq, cex=0.5,fill=cols)
legend("right", uniq, cex=0.5,fill=cols)
legend("center", uniq, cex=0.5,fill=cols)
をそうしないと、あなたは、例えば、xとy座標を入力することにより、それを自分で指定することができます。
を
legend(x = 2, y = 5 , uniq, cex=0.5,fill=cols)
詳細はこちらhere、here、hereまたはhereであり、いくつかの例を挙げるに過ぎない。
UPDATE
またして試すことができます:私はそれが右に見えるかどうかを確認することができない、あなたのデータを持っていないが、私はそれが必要だと思うのよう
layout(matrix(c(1,2,3,3), ncol=2, byrow=TRUE), heights=c(4, 1))
par(mai=rep(0.5, 4))
pie(frman, main="Men", col=cols, labels=pielabelsman, cex=0.85)
pie(frwoman, main="Women", col=cols,labels=pielabelswoman,cex=0.85)
par(mai=c(0,0,0,0))
plot.new()
legend("center", uniq, cex=0.5,fill=cols)
。
お返事ありがとうございます。私は別のxとyの値で最後の行を試しましたが、私は凡例を観察するのに適切なx、yを見つけることができません。 –
私はpar(mfrow = c(1,2))を使用しているので、x、yは毎回2つのプロットの1つに対応します。 –
@GiorgosVoultsios私は答えを更新しました。 upvoteを忘れず、それがうまくいけば答えを受け入れてください!ありがとう! – adrian1121