--- title: "数据前处理+ggplot2画图实践" format: dwsd-revealjs: logo: _extensions/drwater/dwsd/inst/ucaslogo.png --- ```{r} #| echo: false source("../../coding/_common.R") library(tidyverse) ``` ## 数据说明 ```{r} mpg ``` ## 完成图1 ```{r} #| echo: false mpg |> ggplot(aes(x = displ, y = hwy, color = class)) + geom_point() ``` ## 完成图2 ```{r} #| echo: false ggplot(mpg, aes(x = displ, y = hwy, color = drv)) + geom_point() + geom_smooth(aes(linetype = drv)) ``` ## 完成图3 ```{r} #| echo: false ggplot(mpg, aes(x = displ, y = hwy)) + geom_point(aes(color = class)) + geom_smooth() ``` ## 完成图4 ```{r} #| echo: false ggplot(mpg, aes(x = displ, y = hwy)) + geom_point() + facet_wrap(~cyl) ``` ## 完成图5 ```{r} #| echo: false ggplot(mpg, aes(x = drv, fill = class)) + geom_bar(position = "fill") ``` ## 综合实践:三维荧光数据处理 ## 欢迎讨论!{.center} ```{r} #| results: 'asis' rmdify::slideend( wechat = FALSE, type = "public", tel = FALSE, thislink = "../" ) ```