martedì 22 maggio 2007

How to draw a plot with two Y axises and one X axis

plot(1:10)
par("usr")
# [1] 0.64 10.36 0.64 10.36
# Now resetting y axis' usr coordinates:
par(usr=c(par("usr")[1:2], 101, 105))
points(1:5, 105:101, col="red")
axis(4)

Nessun commento:

Posta un commento