同様の問題に関する投稿をいくつか見ましたが、適切な解決策が見つかりませんでした。私のcount
データ (以下の再現可能な例) には重複があるため、重複するポイントを互いの側面に印刷する必要があります。人々は使用してposition_dodge
いますが、どういうわけか以下の例は私にとってはうまくいきません。
library('ggplot2')
myData = data.frame(split = c(rep('a',10), rep('b',10)), count = c(20,27,21,20,24,23,21,25,22,22,35,37,32,32,32,32,31,33,32,31))
p = ggplot(myData, aes(split, count)) + geom_point(aes(colour=split), position=position_dodge(width=0.3))
p
#Getting the warning
ymax not defined: adjusting position using y instead