This stat creates arrow shapes in a ggplot.

stat_arrow(
  mapping = NULL,
  data = NULL,
  geom = "polygon",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...,
  bp = 6000,
  arrowhead_size = 8
)

Arguments

mapping

The aesthetic mapping, usually constructed with aes().

data

The dataset to be used in the layer.

geom

The geometric object to use for the layer, default is "polygon".

position

Position adjustment, default is "identity".

na.rm

Should missing values be removed?

show.legend

Logical. Should this layer be included in the legends?

inherit.aes

Should inherit aesthetics from the parent plot?

...

Other arguments passed to layer().

bp

The base parameter for the arrow shape.

arrowhead_size

The size of the arrowhead.

Value

A ggplot layer with arrow shapes.

Details

Used for drawing features for a plasmid that work in both cartesian and polad coordinate systems.

Note

The bp parameter determines the base parameter of the arrow shape. The arrowhead_size parameter controls the size of the arrowhead.

See also