![](/img/trans.png)
[英]Change y-axis of dot plot to reflect actual count using geom_dotplot
[英]Geom_dotplot, y-axis showing counts
我正在嘗試 plot 使用 geom_dotplot 的點圖,其中每個點代表對我的數據集的觀察。 因此,y 軸不應代表密度,而應代表實際計數。 我知道這個主題圍繞同一主題。 但是,我沒有設法按照相同的方法解決我的問題。
df <- data.frame(x = sample(1:500, size = 150, replace = TRUE))
ggplot(df, aes(x)) +
geom_dotplot(method = 'histodot', binwidth = 1)
我得到下圖 , 我想得到一個和這個相似的
我可以在其中操縱點的大小、間距等。
提前致謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.