[英]Geom_dotplot, y-axis showing counts
I'm trying to plot a dotplot using geom_dotplot in which each dot represents an observation of my data set.我正在尝试 plot 使用 geom_dotplot 的点图,其中每个点代表对我的数据集的观察。 Therefore, the y-axis shouldn't represent density but actual counts.
因此,y 轴不应代表密度,而应代表实际计数。 I'm aware of this thread which revolves around the same topic.
我知道这个主题围绕同一主题。 However, I haven't managed to solve my issue following the same methodology.
但是,我没有设法按照相同的方法解决我的问题。
df <- data.frame(x = sample(1:500, size = 150, replace = TRUE))
ggplot(df, aes(x)) +
geom_dotplot(method = 'histodot', binwidth = 1)
And I obtain the following graph我得到下图
, I want to obtain one similar to this one
, 我想得到一个和这个相似的
where I can manipulate dots' size, space between, etc.
我可以在其中操纵点的大小、间距等。
Thanks in advance提前致谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.