1
我設法用4個不同的圖創建一個單一的情節。但軸標籤不顯示。因爲我是R的初學者,如果有人能告訴我如何爲這種情節添加軸標籤,我會很感激。 X軸:程度 Y軸:日誌(累積分佈)如何將軸標籤添加到R中的多槽?
該圖使用igraph-Functions。
這裏是圖: 這裏是我的代碼:
par(mar = rep(2, 4))
par(mfrow=c(2,2))
ddU <- degree.distribution(USAN_g_num, cumulative=TRUE, mode="in")
plot(ddU, log="xy", col=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE, mode="in")==0 ,'white',"black"),
pch=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE, mode="in")==0 ,10,20),
cex=ifelse(degree.distribution(USAN_g_num, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="USAN")
ddS <- degree.distribution(SAg, cumulative=TRUE, mode="in")
plot(ddS, log="xy", col=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,'white',"black"),
pch=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,10,20),
cex=ifelse(degree.distribution(SAg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="SA")
ddO <- degree.distribution(OWg, cumulative=TRUE, mode="in")
plot(ddO, log="xy", col=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,'white',"black"),
pch=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,10,20),
cex=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="OW")
ddT <- degree.distribution(STg, cumulative=TRUE, mode="in")
plot(ddT, log="xy", col=ifelse(degree.distribution(OWg, cumulative=FALSE, mode="in")==0 ,'black',"black"),
pch=ifelse(degree.distribution(STg, cumulative=FALSE, mode="in")==0 ,10,20),
cex=ifelse(degree.distribution(STg, cumulative=FALSE, mode="in")==0 ,0,1),xlab="degree", ylab="log(cumulative frequency)",main="ST")
謝謝
degree.distribution函數屬於哪個包/庫? – 2013-05-01 14:28:31
@AndreSilva它屬於igraph – SWR 2013-05-01 14:29:12