Description Usage Arguments Examples
theme2() has an enhanced version of ggplot2::theme() in terms of: 1. no element_(text|line|rect|grob|blank) specification 2. partial match for each configuration (e.g. size by sz)
1 |
... |
theme element specification (see examples below) |
as_string |
return the built theme function call as string. Default is FALSE. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# all of the following three generate the same plot
ggplot(mtcars) + geom_point(aes(wt, hp, color=cyl)) +
theme(text = element_text(size=20, face="bold"),
axis.line = element_line(size=2),
legend.key = element_rect(color="black"))
ggplot(mtcars) + geom_point(aes(wt, hp, color=cyl)) +
theme2(text(size=20, face="bold"), axis.line(size=2),
legend.key(color="black"))
ggplot(mtcars) + geom_point(aes(wt, hp, color=cyl)) +
theme2(text(sz=20, f="bold"), axis.line(sz=2),
legend.key(c="black"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.