[英]R: How do I make a one-variable scatterplot?
查看geom_jitter()
library(dplyr)
library(ggplot2)
data = data.frame(records = c(rep("a",1000),rep("b",500),rep("c",100),rep("d",10)))%>%
mutate(y = 0)
data%>%
ggplot(aes(x = records,y = y))+
geom_jitter()
參考: https : //ggplot2.tidyverse.org/reference/position_jitter.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.