Skip to contents

ggarrow (development version)

ggarrow 0.1.1

This is a small release adapting to new features in ggplot2 4.0.0 and fixing a bug.

  • Geom default have been adapted to the dynamic theming in ggplot2 4.0.0.
  • element_arrow() is implemented as an S7 class from ggplot2 4.0.0 onwards.
  • Graphical properties are better preserved when arrows are forced (#9).

ggarrow 0.1.0

CRAN release: 2024-06-05

Initial CRAN submission

Geom layers

Several geom functions:

Arrow grob

The function grob_arrow() creates a grid grob that largely mimics the polylineGrob() grob, with the following differences.

  • Arrow ornaments can be placed at the end, start or middle of the line.
    • arrow_{head/fins/mid} controls the shape of the ornament.
    • length_{head/fins/mid} controls the size of the ornament.
    • justify controls where an ornament is placed relative to the line ends.
    • mid_place controls where middle (interior) arrows are placed.
    • resect{_head/_fins} can shorten the endpoints.
    • force_arrow determines if arrows are drawn on lines that are too short to accommodate ornaments.
  • The linewidth of the line can vary within a line.
    • shaft_width controls the linewidth for every point in x and y
  • A line can be shortened from their endpoints using the resect{_head/_fins} arguments.
  • The line is treated as a polygon, so fill controls the colour of the line, whereas colour controls the colour of an outline.

Arrow scales

The arrow_{head/fins/mid} have been promoted from parameters to aesthetics. Correspondingly, there are now 3 discrete scales for these 3 aesthetics.

Arrow shapes

Added the following shapes for ornaments:

Other

An annotate_arrow() layer to specifically do arrow annotations. An element_arrow() to replace line elements in the theme() by arrows.