File tree 1 file changed +39
-10
lines changed 1 file changed +39
-10
lines changed Original file line number Diff line number Diff line change 49
49
# ' }
50
50
# '
51
51
# ' @examples
52
- # ' p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg,
53
- # ' colour = factor(gear))) + facet_wrap(~am)
54
- # ' p + theme_gray() # the default
55
- # ' p + theme_bw()
56
- # ' p + theme_linedraw()
57
- # ' p + theme_light()
58
- # ' p + theme_dark()
59
- # ' p + theme_minimal()
60
- # ' p + theme_classic()
61
- # ' p + theme_void()
52
+ # ' mtcars2 <- within(mtcars, {
53
+ # ' vs <- factor(vs, labels = c("V-shaped", "Straight"))
54
+ # ' am <- factor(am, labels = c("Automatic", "Manual"))
55
+ # ' cyl <- factor(cyl)
56
+ # ' gear <- factor(gear)
57
+ # ' })
58
+ # '
59
+ # ' p1 <- ggplot(mtcars2) +
60
+ # ' geom_point(aes(x = wt, y = mpg, colour = gear)) +
61
+ # ' labs(title = "Fuel economy declines as weight increases",
62
+ # ' subtitle = "(1973-74)",
63
+ # ' caption = "Data from the 1974 Motor Trend US magazine.",
64
+ # ' tag = "Figure 1",
65
+ # ' x = "Weight (1000 lbs)",
66
+ # ' y = "Fuel economy (mpg)",
67
+ # ' colour = "Gears")
68
+ # '
69
+ # ' p1 + theme_gray() # the default
70
+ # ' p1 + theme_bw()
71
+ # ' p1 + theme_linedraw()
72
+ # ' p1 + theme_light()
73
+ # ' p1 + theme_dark()
74
+ # ' p1 + theme_minimal()
75
+ # ' p1 + theme_classic()
76
+ # ' p1 + theme_void()
77
+ # '
78
+ # ' # Theme examples with panels
79
+ # ' \donttest{
80
+ # ' p2 <- p1 + facet_grid(vs ~ am)
81
+ # '
82
+ # ' p2 + theme_gray() # the default
83
+ # ' p2 + theme_bw()
84
+ # ' p2 + theme_linedraw()
85
+ # ' p2 + theme_light()
86
+ # ' p2 + theme_dark()
87
+ # ' p2 + theme_minimal()
88
+ # ' p2 + theme_classic()
89
+ # ' p2 + theme_void()
90
+ # ' }
62
91
# ' @name ggtheme
63
92
# ' @aliases NULL
64
93
NULL
You can’t perform that action at this time.
0 commit comments