Last active
August 29, 2015 14:25
-
-
Save jarmitage/a5b33dbdd9d7605757f9 to your computer and use it in GitHub Desktop.
R: two y axis plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot (V1, V2, | |
type = "p", | |
col = "red", | |
cex = .2, | |
xlab = "Force (N)", | |
ylab = "Raw", | |
ylim = c(0,4096)) | |
grid (col = "lightgray", lty = "dotted", lwd = par("lwd"), equilogs = TRUE) | |
par (new = TRUE) | |
plot (V1, V3, | |
type = "p", | |
col = "blue", | |
cex = .2, | |
xaxt = "n", | |
yaxt = "n", | |
xlab = "", | |
ylab = "") | |
axis (4) | |
mtext ("Aftertouch", side = 4, line = 3) | |
legend ("bottomright", col = c ("red", "blue"), lty = 1, legend = c ("Raw", "Aftertouch")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment