Description Usage Format Examples

Triangle Plots

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
StatTriangle
stat_triangle(mapping = NULL, data = NULL, geom = "point",
position = "identity", show.legend = NA, inherit.aes = TRUE, ...)
tri_grid(colour = color, color = "gray70", grid_lines = 5,
labels = c("alpha[1]", "alpha[2]", "alpha[3]"), ...)
tri_labels(labels = c("alpha[1]", "alpha[2]", "alpha[3]"),
parse = TRUE, colour = color, color = "gray60", size = 4,
padding = 0.1, ...)
geom_tripoint(..., stat = "triangle")
geom_triline(..., stat = "triangle")
geom_tripath(..., stat = "triangle")
``` |

An object of class `StatTriangle`

(inherits from `Stat`

, `ggproto`

, `gg`

) of length 3.

1 2 3 4 5 6 7 | ```
ddd <- data_frame( x=c(1, 0, .5, .25, 0), y = c(0, .2, .2, .25, .8)) %>% mutate(z = 1 - x - y)
ggplot() +
tri_theme() +
tri_grid(colour="red") +
tri_labels(size=10, padding=.05) +
geom_path(data=ddd, aes(x=x, y=y, z=z), stat="triangle", size=2, alpha=.3) +
geom_point(data=ddd, aes(x=x, y=y, z=z), stat="triangle", size=3, alpha=.6, colour="navy")
``` |

EconModels/MacroGrowth documentation built on Oct. 30, 2018, 11:13 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.