| as.arrows | R Documentation |
Create directional arrows and add these to a plot, typically used to represent vector fields such as wind directions, drainage flow directions, or other angular data.
as.arrows(x, unit=c("degrees", "radians", "flowdir"),
arrow_length=NA,clockwise=FALSE, angle_from_h_axis=0,
angle_from_x_axis=angle_from_h_axis, length=0,...)
x |
SpatRaster with values representing angles or directions |
unit |
Character. Unit of the angle values in |
arrow_length |
Numeric. Length of the arrows to be plotted |
clockwise |
Logical. Default is |
angle_from_x_axis |
Anti-clockwise angle from x (or horizontal) axis to the reference direction |
angle_from_h_axis |
Anti-clockwise angle from x (or horizontal) axis to the reference direction. In the case of northing wind direction it is often used |
length, ... |
Additional graphical parameters passed to |
Emanuele Cordano
arrows, terrain
r <- rast(system.file("ex/elev_vinschgau.tif", package="terra"))
r <- aggregate(r, fact=2,fun=min)
d <- terrain(r, "flowdir")
plot(r,col=terrain.colors(10))
as.arrows(d, unit="flowdir", col="black")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.