??theme_bw()参数的使用
??theme_bw()
##用法,其他的几个内部参数相同
theme_grey(
base_size = 15,##整体布局字的缩放比例
base_family = "bold",##所有的字体
base_line_size = 1/10,##基本的线的粗细
base_rect_size = 1/2
)
mtcars2 <- within(mtcars, {
vs <- factor(vs, labels = c("V-shaped", "Straight"))
am <- factor(am, labels = c("Automatic", "Manual"))
cyl <- factor(cyl)
gear <- factor(gear)
})
p1 <- ggplot(mtcars2) +
geom_point(aes(x = wt, y = mpg, colour = gear)) +
labs(title = "Fuel economy declines as weight increases",
subtitle = "(1973-74)",
caption = "Data from the 1974 Motor Trend US magazine.",
tag = "Figure 1",
x = "Weight (1000 lbs)",
y = "Fuel economy (mpg)",
colour = "Gears")###关于标题和亚标题及图形字幕的说明
p1 + theme_gray() # the default 见图1