Description Usage Arguments Examples
View source: R/ggconventions.r
ct_ggplot
("conventions transform ggplot"), cf_ggplot
("conventions fortify ggplot"),
provide wrappers which takes a data frame and applies c_transform
and then the appropriate
plot function
1 2 3 4 5 |
data |
Data frame passed to |
... |
Passed to ggplot |
variables |
Passed to |
fortify_data |
Passed to |
prefix |
Passed to |
1 2 3 4 5 6 7 8 9 10 | require("ggplot2")
source(system.file("conventions/gender.R", package="ggconventions"))
data("gender_data", package="ggconventions")
ct_ggplot(gender_data,
aes(x=class, y=survivors, colour=gender, shape=gender)) +
geom_point(size=7) + ggtitle("# adult survivors of Titanic")
source(system.file("conventions/redblack.R", package="ggconventions"))
data("profit_data", package="ggconventions")
cf_ggplot(profit_data, aes(x=Index, y=profit,
colour=c.profit, fill=c.profit)) + geom_bar(stat='identity')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.