このようなデータがあります。
ここに私の現在のコード
library(ggplot2)
library(RColorBrewer)
pal <- c(brewer.pal(8,"Dark2"),brewer.pal(12,"Paired"));
dat<-read.table("http://dpaste.com/1051194/plain/",header=TRUE)
dat.sub <- data.frame(dat$Function,dat$Freq)
ggplot(dat.sub,aes(dat.Freq,color=dat.Function),shape=dat.Function)+ stat_density(geom="path",position="identity",size=0.5)
以下のような図を生成します。
凡例テキストの長さにより、メイン プロットが圧迫されることに注意してください。図が正常に表示され、凡例も完全に表示されるようにするには、これに対処する最善の方法は何ですか?