Created
November 28, 2011 10:35
-
-
Save timriffe/1399920 to your computer and use it in GitHub Desktop.
hacky way and correct way to get comma axes
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
x <- seq(0,1,by=.01) | |
y <- runif(101) | |
# the hacky way: | |
plot(x,y,axes=F) | |
box() | |
axis(side=1,at=seq(0,1,by=.2),labels=c(paste("0,",seq(0,8,by=2),sep=""),"1,0")) | |
axis(side=2,at=seq(0,1,by=.2),labels=NA) | |
text(x=-.05,y=seq(0,1,by=.2), | |
labels=c(paste("0,", | |
seq(0,8,by=2),sep=""),"1,0"), | |
xpd=T, | |
pos=2) | |
# the super-parsimonious correct way: | |
options(OutDec=",") | |
plot(x,y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment