reverselog_trans: Reverse log transform

View source: R/reverselog_trans.R

reverselog_transR Documentation

Reverse log transform

Description

Reverse log transformation. Useful when plotting and one axis is in pressure levels.

Usage

reverselog_trans(base = 10)

Arguments

base

Base of the logarithm

See Also

Other ggplot2 helpers: MakeBreaks(), WrapCircular(), geom_arrow(), geom_contour2(), geom_contour_fill(), geom_label_contour(), geom_relief(), geom_streamline(), guide_colourstrip(), map_labels, scale_divergent, scale_longitude, stat_na(), stat_subset()

Examples

# Adiabatic temperature profile
gamma <- 0.286
t <- data.frame(p = c(1000, 950, 850, 700, 500, 300, 200, 100))
t$t <- 300*(t$p/1000)^gamma

library(ggplot2)
ggplot(t, aes(p, t)) +
   geom_line() +
   coord_flip() +
   scale_x_continuous(trans = "reverselog")


metR documentation built on Oct. 14, 2024, 5:09 p.m.