Description Usage Arguments Value Examples
View source: R/bezierArrowSmpl.R
This is an alternative to the grid packages bezierGrob
with the advantage that it allows you to draw an arrow with a specific
unit width. Note, it has only a end-arrow at this point.
1 2 3 4 |
x |
A numeric vector or unit object specifying x-locations of spline control points. |
y |
A numeric vector or unit object specifying y-locations of spline control points. |
width |
The width of the arrow, either a numeric single number or a unit. Note: The arrow does not rely on lwd but on actual width. |
clr |
The color of the arrow. |
default.units |
A string indicating the default units to use
if |
arrow |
This is a list with all the base (width) and the desired
length for the arrow. Note: This differs from the original
|
align_2_axis |
Indicates if the arrow should be vertically/horizontally aligned. This is useful for instance if the arrow attaches to a box. |
name |
A character identifier. |
gp |
An object of class |
vp |
A Grid viewport object (or NULL). |
grid::grob
A grob of the class polygonGrob with attributes that
correspond to the bezier points.
1 2 3 4 5 | library(grid)
grid.newpage()
arrowGrob <- bezierArrowSmpl(x = c(.1,.3,.6,.9),
y = c(0.2, 0.2, 0.9, 0.9))
grid.draw(arrowGrob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.