Last active
January 9, 2020 15:54
-
-
Save safferli/c7bd1c8391628b507e0a to your computer and use it in GitHub Desktop.
Create a logarithmic sequence to properly set logticks in ggplot()
This file contains hidden or 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
lseq <- function(from=1, to=100000, length.out=6) { | |
# logarithmic spaced sequence | |
# blatantly stolen from library("emdbook"), because need only this | |
exp(seq(log(from), log(to), length.out = length.out)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment