这是一个reprex,显示了一种使用的方法ggpattern
:
devtools::install_github("coolbutuseless/ggpattern")
library(ggpattern)
library(ggplot2)
ggplot(data = diamonds, aes(x = carat)) +
stat_bin(geom = "bar_pattern",
breaks = 0:10 * 0.5,
fill = "white",
color = "black",
pattern_fill = "gray50",
pattern_angle = 60,
pattern_density = 0.3,
pattern_spacing = 0.01,
pattern_key_scale_factor = 1) +
theme_classic()
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句