View source: R/create_Hashes.R
| create_Hashes | R Documentation | 
Create hashed lines to fill a polygon.
create_Hashes(pol, angle = 45, spacing = 1, width = 1)
| pol | single polygon inside which hashed lines will be created.
May be created using  | 
| angle | numeric, angle of the hashed lines in degrees (0-360), noting that the function might struggle with angles 0, 180, -180 or 360. | 
| spacing | numeric, spacing between hashed lines. | 
| width | numeric, width of hashed lines. | 
Spatial object in your environment, to be added to your plot.
create_Polys, add_Legend.
# For more examples, see:
# https://github.com/ccamlr/CCAMLRGIS#25-create-hashes
#Create some polygons
MyPolys=create_Polys(Input=PolyData)
#Create hashes for each polygon
H1=create_Hashes(pol=MyPolys[1,],angle=45,spacing=1,width=1)
H2=create_Hashes(pol=MyPolys[2,],angle=90,spacing=2,width=2)
H3=create_Hashes(pol=MyPolys[3,],angle=0,spacing=3,width=3)
plot(st_geometry(MyPolys),col='cyan')
plot(st_geometry(H1),col='red',add=TRUE)
plot(st_geometry(H2),col='green',add=TRUE)
plot(st_geometry(H3),col='blue',add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.