[問題] barplot請教
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軸的座標軸
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.138.0.233
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1482202112.A.9BD.html
→
12/20 18:09, , 1F
12/20 18:09, 1F
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章