我的数据:
a = c(5,2,1)
b = c(75,82,36)
c <- c("Baseline", "FW1", "FW2")
我的代码:
finyrNum <- (1:3)
twoord.plot(finyrNum, a, finyrNum, b,
type=c("bar", "l"), lylim = c(0, 7),
ylab="Days Used", rylab="Amount", xlab="Time Point",
lcol=32, rcol=4, do.first="plot_bg()", xticklab=c)
如何更改左侧的y轴,以使刻度线变为7,而不是在5处停止?
还-如何更改边距,以使图的边界和条形之间有空间?
答案 0 :(得分:0)
twoord.plot(finyrNum, a, finyrNum, b,
type=c("bar", "l"), lylim = c(0, 7), lytickpos = 1:7,
ylab="Days Used", rylab="Amount", xlab="Time Point",
lcol=32, rcol=4, do.first="plot_bg()", xticklab=c)
您正在寻找lytickpos
。查阅twoord.plot
的文档,有很多图形选项可供探索。