compose_transforms: Composition of scale transforms.

Description Usage Arguments Value Author(s) See Also Examples

Description

A binary infix operator that allows one to compose together two scale transformations. We should have that the transformation atrans %of% btrans first applies btrans, then applies atrans to the results. This is useful for reversing scales, for example, along with other transformations.

Usage

1
atrans %of% btrans

Arguments

atrans

a transformation object.

btrans

a transformation object.

Value

a transformation object that perfroms atrans on the output of btrans.

Author(s)

Steven E. Pav shabbychef@gmail.com

See Also

trans_new.

Examples

1
2
3
4
5
set.seed(1234)
# compose transformatins with %of%:
ggplot(data.frame(x=rnorm(100),y=exp(rnorm(100,mean=-2,sd=4))),aes(x=x,y=y)) + 
  geom_point() + 
  scale_y_continuous(trans=scales::reverse_trans() %of% scales::log10_trans())

shabbychef/ggallin documentation built on April 4, 2021, 12:39 p.m.