I'm trying to plot a dotplot using geom_dotplot in which each dot represents an observation of my data set. Therefore, the y-axis shouldn't represent density but actual counts. 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