R语言下面代码 ggplotdataaesG value fill = G+ coord_cartesianexpand = F xlim = c2 655 ylim = c0 180+ scale_y_continuousbreaks = seq0 180 20+ stat_summarygeom = errorbarfundata = mean_sd width = 045
可以通过增加geom_bar_pattern()函数中的line_width参数来缩小pattern中线的粗细。例如,将linewidth的值从.1降低到.05:
ggplot(data,aes(G, value, fill = G))+
coord_cartesian(expand = F, xlim = c(.2, 6.55), ylim = c(0, 180))+
scale_y_continuous(breaks = seq(0, 180, 20))+
stat_summary(geom = "errorbar",fun.data = 'mean_sd', width = 0.45)+
stat_summary(aes(pattern = G, pattern_angle = G, pattern_spacing = G),
fun = "mean", position = "dodge", size = 0.3,
geom = "bar_pattern", colour = 'black', width = 0.75, fill = 'white', linewidth = .1, line_width = 0.05)+
scale_pattern_spacing_manual(values = c(0, 0.03, 0.03, 0.06,0.03, 0.10))+
scale_pattern_angle_manual(values = c(0, 30, 180, 150,90, 0))
这将缩小pattern中线的粗细。您可以根据需要调整line_width的值。
原文地址: https://www.cveoy.top/t/topic/bKUz 著作权归作者所有。请勿转载和采集!