是否可以使用主题在 ggplot 中操纵虚线和虚线网格线的间距和大小?下面的情节:
p + l + opts(panel.grid.major = theme_line(colour = 'black', linetype = 'dashed'),
panel.grid.minor = theme_line(colour = NA),
panel.background = theme_rect(colour = 'white'))
我想更改虚线和虚线网格线之间的间距(例如在 Illustrator 中)。
另外,有谁知道 x 轴和 y 轴网格线是否可以单独操作?例如,我想在此示例中关闭 x 轴网格线。
我已经看到使用 vline 和 hline 进行操作(使用 ggplot在某些 x 轴值上添加虚线垂直线),但如果可能的话,不希望每次都对其进行硬编码。