Provides 'grid' grobs that fill in a user-defined area with various patterns. Includes enhanced versions of the geometric and image-based patterns originally contained in the 'ggpattern' package as well as original 'pch', 'polygon_tiling', 'regular_polygon', 'rose', 'text', 'wave', and 'weave' patterns plus support for custom user-defined patterns.
Package options
The following gridpattern options may be set globally via base::options():
- ggpattern_array_funcs
Legacy option to set custom “array” pattern functions. Should use
register_pattern(kind = "array")instead.- ggpattern_geometry_funcs
Legacy option to set custom “geometry” pattern functions. Should use
register_pattern()instead.- ggpattern_res
Set custom raster image resolution (pixels per inch) for certain patterns (and the raster fallbacks of
alphaMaskGrob()andclippingPathGrob()). If unset defaults to (a little more than) the resolution of the graphics device.- ggpattern_use_R4.1_clipping
If
TRUEuse the grid clipping path feature introduced in R v4.1.0. IfFALSEdo arasterGrobapproximation of the clipped pattern. IfNULLtry to guess an appropriate choice.- ggpattern_use_R4.1_features
If
TRUEsets the default for all the otherggpattern_use_R4.1_*options arguments toTRUE. IfFALSEsets them toFALSE.- ggpattern_use_R4.1_gradients
If
TRUEuse the grid gradient feature introduced in R v4.1.0. IfFALSEdo arasterGrobapproximation of the gradient pattern. IfNULLtry to guess an appropriate choice.- ggpattern_use_R4.1_masks
If
TRUEuse the grid mask feature introduced in R v4.1.0. IfFALSEdo arasterGrobapproximation of the masked pattern. IfNULLtry to guess an appropriate choice.- ggpattern_use_R4.1_patterns
If
TRUEuse the grid pattern feature introduced in R v4.1.0. Currently only used by a couple of examples.
Note not all graphic devices support any/all of the R v4.1.0 features. See https://www.stat.auckland.ac.nz/~paul/Reports/GraphicsEngine/definitions/definitions.html for more information on these features.
Author
Maintainer: Trevor L. Davis trevor.l.davis@gmail.com (ORCID)
Authors:
Trevor L. Davis trevor.l.davis@gmail.com (ORCID)
Mike FC (Code/docs adapted from ggpattern)
Other contributors:
ggplot2 authors (some utility functions copied from ggplot2) [contributor]