R语言使用ggplot2包geom_jitter()函数绘制分组(strip plot,一维散点图)带状图(配置显示的分组)实战
目录
R语言使用ggplot2包geom_jitter()函数绘制分组(strip plot,一维散点图)带状图(配置显示的分组)实战
#geom_jitter()函数绘制分组(strip plot,一维散点图)带状图()
#仿真数据
# Convert the variable dose from a numeric to a factor variable
ToothGrowth$dose <- as.factor(ToothGrowth$dose)
head(ToothGrowth)
## len supp dose
## 1 4.2 VC 0.5
## 2 11.5 VC 0.5
## 3 7.3 VC 0.5
## 4 5.8 VC 0.5
## 5 6.4 VC 0.5
## 6 10.0 VC 0.5