geom_arrow | R Documentation |
Parametrization of ggplot2::geom_segment either by location and displacement
or by magnitude and angle with default arrows. geom_arrow()
is the same as
geom_vector()
but defaults to preserving the direction under coordinate
transformation and different plot ratios.
geom_arrow(
mapping = NULL,
data = NULL,
stat = "arrow",
position = "identity",
...,
start = 0,
direction = c("ccw", "cw"),
pivot = 0.5,
preserve.dir = TRUE,
min.mag = 0,
skip = 0,
skip.x = skip,
skip.y = skip,
arrow.angle = 15,
arrow.length = 0.5,
arrow.ends = "last",
arrow.type = "closed",
arrow = grid::arrow(arrow.angle, grid::unit(arrow.length, "lines"), ends = arrow.ends,
type = arrow.type),
lineend = "butt",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
geom_vector(
mapping = NULL,
data = NULL,
stat = "arrow",
position = "identity",
...,
start = 0,
direction = c("ccw", "cw"),
pivot = 0.5,
preserve.dir = FALSE,
min.mag = 0,
skip = 0,
skip.x = skip,
skip.y = skip,
arrow.angle = 15,
arrow.length = 0.5,
arrow.ends = "last",
arrow.type = "closed",
arrow = grid::arrow(arrow.angle, grid::unit(arrow.length, "lines"), ends = arrow.ends,
type = arrow.type),
lineend = "butt",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this
layer, either as a |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
start |
starting angle for rotation in degrees |
direction |
direction of rotation (counter-clockwise or clockwise) |
pivot |
numeric indicating where to pivot the arrow where 0 means at the beginning and 1 means at the end. |
preserve.dir |
logical indicating whether to preserve direction or not |
min.mag |
minimum magnitude for plotting vectors |
skip, skip.x, skip.y |
numeric specifying number of gridpoints not to draw in the x and y direction |
arrow.length, arrow.angle, arrow.ends, arrow.type |
parameters passed to grid::arrow |
arrow |
specification for arrow heads, as created by |
lineend |
Line end style (round, butt, square). |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
Direction and start allows one to work with different standards. For the
meteorological standards, for example, one would use start = -90
and direction = "cw"
.
whereas for oceanographic standards one would use start = 0
and direction = "ccw"
.
Non-default values for skip
(and skip.x
, skip.y
; default=0) should only be used with
x, y values on a rectangular grid(lat/lon or x,y).
geom_vector
understands the following aesthetics (required aesthetics are in bold)
x
y
either mag and angle, or dx and dy
alpha
colour
linetype
size
lineend
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.