Intermediate Data Visualization with ggplot2
Rick Scavetta
Founder, Scavetta Academy
ggplot(msleep, aes(bodywt, y = 1)) +
geom_jitter() +
scale_x_continuous(limits = c(0, 7000),
breaks = seq(0, 7000, 1000))
ggplot(msleep, aes(log10(bodywt), y = 1)) +
geom_jitter() +
scale_x_continuous(limits = c(-3, 4),
breaks = -3:4)
ggplot(msleep, aes(log10(bodywt), y = 1)) +
geom_jitter() +
scale_x_continuous(limits = c(-3, 4),
breaks = -3:4) +
annotation_logticks(sides = "b")
ggplot(msleep, aes(bodywt, y = 1)) +
geom_jitter() +
scale_x_log10(limits = c(1e-03, 1e+04))
ggplot(msleep, aes(bodywt, y = 1)) +
geom_jitter() +
coord_trans(x = "log10")
Intermediate Data Visualization with ggplot2