label_log10: Draw labels in log-10 format

Description Usage Arguments Examples

View source: R/label_log10.R

Description

Draw labels in log-10 format

Usage

1

Arguments

x

The value to turn into a label

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(ggplot2)

ggplot(US_census, aes(pop2000, pop2010)) + 
  geom_point() + 
  scale_x_log10(labels = label_log10) +
  scale_y_log10(labels = label_log10)
  
# the function also works for linear scales
ggplot(US_census, aes(pop2000, pop2010)) + 
  geom_point() + 
  scale_x_continuous(limits = c(-1e6, 1e6), labels = label_log10) +
  scale_y_log10(labels = label_log10)

clauswilke/dviz.supp documentation built on Aug. 25, 2020, 2:12 a.m.