Plot a hatched layer with several different patterns. Suitable for b/w print maps.
hatchedLayer(x, pattern = "dot", density = 1, txt = "a", ...)
x | an sf object, a simple feature collection. It should be either a
|
---|---|
pattern | Desired pattern to use for hatching. Possible values are:
|
density | of the grid. By default the function uses a grid with a
minimum of 10 cells on the shortest dimension of the bounding box.
Additionally, it is possible to pass a
|
txt | for the |
... | Additional graphic parameters (see Details). |
When passing mode='sfc'
an 'sf' object (either MULTLINESTRING
or MULTIPOINT) is returned.
Possible values are:
pattern | add | col | bg | cex | pch | lwd | lty |
"dot" | x | x | x | x | x | ||
"text" | x | x | x | ||||
Lines patterns | x | x | x | x |
dieghernan, https://github.com/dieghernan/
#> Reading layer `mtq' from data source #> `/tmp/RtmppBiN3A/temp_libpath43d97684eada/cartography/gpkg/mtq.gpkg' #> using driver `GPKG' #> Simple feature collection with 34 features and 7 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: 690574 ymin: 1592536 xmax: 735940.2 ymax: 1645660 #> Projected CRS: WGS 84 / UTM zone 20NhatchedLayer(mtq, "text", txt = "Y", add=TRUE)hatchedLayer(mtq, "diamond", density = 0.5)hatchedLayer(mtq, "grid", lwd = 1.5)hatchedLayer(mtq, "hexagon", col = "blue")hatchedLayer(mtq, "horizontal", lty = 5)hatchedLayer(mtq, "vertical")hatchedLayer(mtq, "left2right")hatchedLayer(mtq, "right2left")hatchedLayer(mtq, "zigzag",cellsize=5000)hatchedLayer(mtq, "circle")