/gist:5eda03e94ba41205bfd2 Secret
Last active
December 17, 2015 07:29
ggplot snippet 1
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
#set-up plot coordinate system. | |
plot(0,0, xlim=c(0,10), ylim=c(0,10), xlab="X", ylab="Y") | |
#cover up plot with rectangle | |
rect(par("usr")[1],par("usr")[3],par("usr")[2],par("usr")[4],col = "dark gray") | |
#now plot the grid | |
grid(col="white", lty=1) | |
#now plot data with specific plot type | |
lines(...) | |
points(...) | |
#make sure to put the "add=T" to prevent | |
#hist from replacing the plot. | |
hist(..., add=T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment