README.md

ShadeR

ShadeR provide a new geom for ggplot2, geom_fleck, to make dot density plots and an associated stat, aspect_shading, to generate shadding effect.

Installation

ShadeR is inspired by this post of Elio Campitelli and relies on his package metR for the computation of derivatives.

These two packages can be installed with the following comamands:

# install.packages("devtools")
devtools::install_github("eliocamp/metR")

# And intsallation of ShadeR:
devtools::install_github("Clement-Viguier/ShadeR")

Examples

An example of The Andes relief and Pacific Ocean ploted with geom_fleck and stat_aspect_shading: The
Andes Like any geom_similar to point, geom_fleck accepts changes of aes like colour, used here to distinguish the ocean from the land.

THe resolution can be given as an aesthetic or is computed if res = NULL in the geom_fleck call.

Another aesthetic is * sun.angle * that modify the position of the sun for the shading computation by stat functions (only stat_aspect_shading for now). Below it is used with image_animate: Volcano rotating shade

Three one-line examples you can try once ShadeR is installed:

Author

Acknowledgments



Clement-Viguier/ShadeR documentation built on Nov. 6, 2019, 4:46 p.m.