1
をかわす、POD.tblは、tibble形式で:複数geom_histogram:位置は、私は次のようなデータを持っている問題
LTPOD POD
<dbl> <dbl>
1 0.5423729 0.6082474
2 0.5303030 0.6055046
3 0.5614035 0.6195652
4 0.5714286 0.5957447
5 0.5714286 0.5444444
6 0.5882353 0.5795455
7 0.5961538 0.5777778
8 0.5769231 0.5714286
9 0.5593220 0.5959596
10 0.5454545 0.5945946
# ... with 4,086 more rows
私は千鳥ヒストグラムとしてデータの2つの列を描画しようとしているが、 position = "dodge"は機能しません。
サンプルコード:私は、これら2つのヒストグラムをずらすために取得するにはどうすればよい
:
ggplot(data=POD.tbl)+geom_histogram(mapping=aes(x=POD),binwidth=0.01,fill="red",colour="black",position="dodge")+
geom_histogram(mapping=aes(x=LTPOD),binwidth=0.01,fill="blue",colour="black",position="dodge")+
geom_vline(aes(xintercept=median(POD, na.rm=T),color="POD"), linetype="dashed", size=1)+
geom_vline(aes(xintercept=median(LTPOD,na.rm=T),color="LTPOD"), linetype="dashed", size=1)+
scale_color_manual(name = "Statistics", values = c(POD = "green", LTPOD="orange"))+
ggtitle("POD vs LTPOD")
私は、次のプロットを取得しますか?あなたは、データフレームのフォーマットを変更する必要が