error in plot.new and invalid graphics state
plot(as.zoo(stocks[, c("AMZN.Close", "TSLA.Close")]), screens = 1, lty = 1:2, xlab = "Date", ylab = "Price")
par(new = TRUE)
plot(as.zoo(stocks[, "GOOGL.Close"]), screens = 1, lty = 3, xaxt = "n", yaxt = "n", xlab = "", ylab = "")
axis(4)
mtext("Price", side = 4, line = 3)
legend("topleft", c("AMZN (left)", "TSLA (left)", "GOOGL"), lty = 1:3, cex = 0.5)