Description Usage Arguments Value Note Examples
View source: R/bezierArrowGradient.R
This is an experimental addition to the original bezierArrowSmpl
with the addition of a gradient in the center of the arrow that fades.
1 2 3 4 5 |
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. This is the main color of the arrow and not the gradient color. |
default.units |
A string indicating the default units to use
if |
align_2_axis |
Indicates if the arrow should be vertically/horizontally aligned. This is useful for instance if the arrow attaches to a box. |
grdt_type |
The type of growth and gradient that is to be used, currently it only supports triangle (I'm considering adding bezier curves but currently I'm a little tired of coding) |
grdt_decrease_prop |
The proportion of the full length that should be decreasing. |
grdt_start_prop |
The proportion of the full length that should be a constant color before decreasing. |
grdt_clr_prop |
The proportion of the gradient that should be decreasing. This is a proportion of the grdt_decrease_prop and the grdt_start_prop combined. |
grdt_line_width |
The width of the border line. If not specified it defaults to 5 % of the original width, note the gradient's width is thus 90 %. |
grdt_clr |
The color of the gradient. It is the color that transits into the clr of the arrow. |
vp |
A Grid viewport object (or NULL). |
gp |
An object of class |
... |
Passed on to |
grid::gList()
A grob of gList
-type
The triangle section of the arrow is not currently included in the gradient.
1 2 3 4 5 | library(grid)
grid.newpage()
arrowGrob <- bezierArrowGradient(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.