scientificLabels: ggplot labels with exponential notation

Description Usage Arguments Value Source Examples

View source: R/visualization.R

Description

Allows to adjust the numbers display on both axes for ggplot2 plots. The format is such that the expontent is nicely set.

Usage

1

Arguments

l

Labels

Value

Labels in the desired format

Source

Brian Diggs https://groups.google.com/forum/#!topic/ggplot2/a_xhMoQyxZ4

Examples

1
2
3
4
5
6
library(ggplot2)
df <- data.frame(x=rnorm(100), y=rnorm(100))
ggplot(df, aes(x=x, y=y)) +
  geom_point() +
  scale_x_continuous(labels=scientificLabels) +
  scale_y_continuous(labels=scientificLabels)

sfeuerriegel/ResearchGroupTools documentation built on May 29, 2019, 8:01 p.m.