Question Details

No question body available.

Tags

r ggplot2 geom

Answers (1)

Accepted Answer Available
Accepted Answer
May 29, 2025 Score: 1 Rep: 22,286 Quality: High Completeness: 70%

I think that when your x-axis is discrete, a "histodot" may not be appropriate (histograms are only meaningful for numeric data). In that case, use the default method for binning (dotdensity).

ggplot(df1, aes(x=ID, fill=factor(value), group=value)) + 
  geom_dotplot(binpositions = "all",
               dotsize = 1, stackratio = 1.2, 
               stackgroups = TRUE) + ...

enter image description here