Skip to content

Instantly share code, notes, and snippets.

@safferli
Last active January 9, 2020 15:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save safferli/c7bd1c8391628b507e0a to your computer and use it in GitHub Desktop.
Save safferli/c7bd1c8391628b507e0a to your computer and use it in GitHub Desktop.
Create a logarithmic sequence to properly set logticks in ggplot()
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