Skip to content
Prev 369883 / 398503 Next

Help with the plot function

Hi, Petr,

Indeed, your code is much better than the one I presented. I made small
editings.

par(mfrow = c(2, 1))
par(cex = 0.6)
par(mar = c(0, 0, 0, 0), oma = c(7, 7, 0.5, 5))
par(tcl = -0.25)
par(mgp = c(2, 0.6, 0))

plot(BUD~YEAR, type="o", ann=F, axes=F, pch=19, ylim=c(60,100),data=g1)
axis(2, las=2)
mtext("Bud Break (Julian Day)", side=2, padj=-3)
arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD + g1$BUD_SE, length=0.05, angle=90)
arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD-g1$BUD_SE, length=0.05, angle=90)

plot(T_MAR~YEAR, type="n", pch=19, ann=F, axes=F, xlim=c(1996,2004),
ylim=c(0,12), data=g1)
lines(T_MAR~YEAR, type="o", pch=0, lty=2)
lines(T_APR~YEAR, type="o", pch=8, lty=3)
lines(T_MAY~YEAR, type="o", pch=2, lty=4)

axis(1, at=seq(1996, 2004, 2))
axis(2, at=c(0,3,6,9,12), las=2)
mtext("Year", side=1, padj=4)
mtext("Temperature (?C)", side=2, padj=-3)

legend(1999,10, bty="n",
       lty = c(2,3,4),
       lwd = c(2,2,2),
       pch = c(0,8,2),
       legend = c("March","April","May"))

Thank you very much,

Andre


On Tue, Jun 20, 2017 at 1:12 AM, Andr? Luis Neves <andrluis at ualberta.ca>
wrote: