【发布时间】:2019-11-26 20:30:28
【问题描述】:
我将geom_point 与position_dodge 结合使用来绘制点并将它们在水平轴上稍微展开。问题是基准的点太接近另一个基准的点(即 atax 和 bicg)。
当轴是分类轴时,如何增加 X 轴刻度之间的距离?或者我如何防止不同基准的点相互接触。
下面是我用来在1上生成图形的代码
ggplot(data = df, aes(x = Benchmark, y = time, shape = type)) +
theme_light() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_shape_manual(values = c(0, 1, 2, 3, 4)) +
geom_point(position = position_dodge(width = 1), color = 'gray60', size = 2)
【问题讨论】: