Skip to content

Instantly share code, notes, and snippets.

@safferli
safferli / lseq.r
Last active January 9, 2020 15:54
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))
}