Data Science Desktop Survival Guide
by Graham Williams |
|||||
Line Chart Log Custom Labels |
Raw
mm <- function(x) { sprintf("%smm", x) }
ds %>% filter(rainfall != 0) %>% ggplot(aes(x=rainfall)) + geom_density() + scale_x_log10(breaks=c(1, 10, 100), labels=mm) + annotation_logticks(sides="bt") + theme(legend.position="none")
|