Description Usage Arguments Aesthetics See Also Examples
A variable-width curve where the main line is a series of straight line segments that are assumed to be a flattened approximation to a smooth curve, and the width of curve can be mapping to a numeric variable or be specified by a unit object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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 |
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_vwcurve()
understands the following aesthetics (required
aesthetics are in bold):
x
y
angle
alpha
colour
fill
linetype
size
width
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | df <- data.frame(
x = 1:10,
y = 1:10,
width = runif(10, 0, 1)
)
ggplot(df, aes(x, y)) + geom_vwcurve()
ggplot(df, aes(x, y, width = width)) + geom_vwcurve()
ggplot(df, aes(x, y, width = width)) + geom_vwcurve(width_units = "inches")
d <- density(rnorm(200))
df2 <- data.frame(
x = (d$x - min(d$x)) / diff(range(d$x)),
y = 0.5,
width = 0.2 * d$y / max(d$y)
)
ggplot(df2, aes(x, y, width = width)) + geom_vwcurve(width_units = "native")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.