geom_dash: Dashes

Description Usage Arguments Examples

View source: R/geom_dash.R

Description

'geom_dash' draws a dash around points (x, y). Couyld be useful for custom data visualisation, or distribution or vector fields. For those scenarios it's more convenient than geom-segment.

Usage

1
2
3
4
geom_dash(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", ..., arrow = NULL, arrow.fill = NULL,
  lineend = "butt", linejoin = "round", relative = F,
  na.rm = FALSE, show.legend = NA, inherit.aes = TRUE)

Arguments

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping. The 'geom_dash' is characterised by specific aes() that encore different dimensions: 'width': the length of the dash, 'angle': the angle of the dash and 'start' [0-1]the relative position of the starting point of the dash (0.5 by default).

arrow

specification for arrow heads, as created by arrow().

arrow.fill

fill colour to use for the arrow head (if closed). 'NULL' means use 'colour' aesthetic.

lineend

Line end style (round, butt, square).

linejoin

Line join style (round, mitre, bevel).

relative

if TRUE normalize the dash width relative to the maximum value of width to avoid overlapping (default = F).

Examples

1
iris %>% ggplot(aes(Species , Petal.Length)) + geom_dash(width = 0.8)

Clement-Viguier/ggvis documentation built on Nov. 6, 2019, 1:07 p.m.