[問題] barplot請教

作者: CAPPON (JI3)   2016-12-20 10:48:30
dt <- data.frame(
type=c("A","B"),
freq = c(1200,1650),
earn = c(0.94,0.98))
bp <- barplot((dt[,2]),yaxt="n",col="lightblue")
box()
lines(bp, dt[,3]*500, col = 4)
X軸放type A&B
Y1軸是earn 用trend
Y2軸是freq 用直方圖呈現
因 2種資料差異很大
但畫出來的圖不美觀
另外 如何顯示雙Y軸的座標軸
作者: andrew43 (討厭有好心推文後刪文者)   2016-12-20 18:09:00

Links booklink

Contact Us: admin [ a t ] ucptt.com