axis.flux.co2: Label ggplot2 axis according to temporal scale of gasflux

Description Usage Arguments Details Value Examples

View source: R/ggplot_shortcuts.R

Description

Label ggplot2 axis according to temporal scale of gasflux

Usage

1
2
3
4
5

Arguments

time

character; Either "sec" oder "day". See 'Details'.

Details

"sec" returns expression(## ~ flux ~ ("ยต" ~ mol ~ m^-2 ~ s^-1))),

"day" returns expression(## ~ flux ~ (mmol ~ m^-2 ~ d^-1))),

where ## is either "Gas", "CO2", or "CH4"

Value

Returns ylab object

Examples

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

df <- data.frame(
    plot = rep(c("A", "B", "C"), each = 20),
    flux = c(rnorm(20), rnorm(20), rnorm(20))
)

ggplot(df, aes(plot, flux))+
geom_boxplot()+
axis.flux.gas("day")

tekknosol/glimmr documentation built on Oct. 17, 2020, 1:39 a.m.