Description Usage Arguments Aesthetics See Also Examples
View source: R/geom-vwxspline.R
A variable-width X-spline where the main line is described by x/y position points and the width describes offset of position points .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
... |
Other arguments passed on to |
open |
a logical value indicating whether to connect the last location back to the first location to produce a closed line. |
width_units |
the units of line, detail see |
shape |
a numeric value (or one per location) that controls the shape of the X-spline curve relative to the locations. |
rep_ends |
a logical value indicating whether to replicate the first and last control points. |
lineend |
the line ending style; one of "round" (default), "mitre", "butt", or "square". |
mitre_limit |
a numeric that controls when a mitre join is converted to a bevel join or a mitre ending is converted to a square ending. |
debug |
a logical value indicating whether to produce graphical debugging output. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_vwxspline()
understands the following aesthetics (required
aesthetics are in bold):
x
y
angle
alpha
colour
dist
fill
linetype
size
width
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | df <- data.frame(
x = c(0, 0.5, 1),
y = 0.5,
width = c(0, 0.5, 0)
)
ggplot(df, aes(x, y, width = width)) + geom_vwxspline()
ggplot(df, aes(x, y, width = width)) + geom_vwxspline(width_units = "native")
df2 <- data.frame(
x = 0:3 / 3,
y = c(0.5, 0.7, 0.3, 0.5),
width = c(0, 0.5, 0.5, 0)
)
ggplot(df2, aes(x, y, width = width)) + geom_vwxspline()
ggplot(df2, aes(x, y, width = width)) + geom_vwxspline(width_units = "native")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.