geo_pattern | R Documentation |
Retrieve a single geologic pattern as defined in the FGDC Digital Cartographic Standard for Geologic Map Symbolization by the U.S. Geological Survey and the Geologic Data Subcommittee (GDS) of the Federal Geographic Data Committee (FGDC).
geo_pattern(
code,
scale = 2,
col = NULL,
fill = NULL,
alpha = NULL,
bg = "white"
)
geo_grob(code, col = NULL, fill = NULL, alpha = NULL, bg = "white")
code |
The number corresponding to the pattern to return. Strings and numbers are permitted. |
scale |
The visual scale of the pattern (higher values mean the pattern is more zoomed in). |
col |
The color to use for the lines of the pattern. |
fill |
The color used to fill various closed shapes (e.g., circles) in the pattern. |
alpha |
The transparency to use for the fill of the pattern. |
bg |
The background color to use for the pattern. |
For specific codes, see the "pattern numbers" in the full pattern chart
for valid code
values. Daven Quinn has also assembled more accessible
documentation of the map patterns/codes
and lithology patterns/codes.
rmacrostrat::def_lithologies()
can also be used to look up pattern codes
for various lithologies (see the "fill" column). Note that codes associated
with color variants (e.g., "101-M") are supported but will result in the
default color variant instead (usually black and white, e.g., "101-K").
These patterns were originally processed and optimized by Daven Quinn and are hosted on GitHub.
geo_grob()
returns a grob object with a single
instance of the desired pattern. geo_pattern()
returns a
GridPattern object with a repeated instance of the
desired pattern.
FGDC patterns:
grid.pattern_geo()
,
scale_fill_geopattern()
library(grid)
# Get a generic igneous pattern
pattern1 <- geo_pattern(code = "313-K")
# Get the pattern for a sandstone
pattern2 <- geo_pattern(code = "607")
# plot the two patterns
grid.newpage()
grid.draw(rectGrob(gp = gpar(fill = pattern1)))
grid.newpage()
grid.draw(rectGrob(gp = gpar(fill = pattern2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.