Adding patterns or textures to geom_bar() / geom_col() bars?



On occasion, I have the need for some kind of pattern or textures for geom_bar() / geom_col() bars (i.e., for black-and-white printing). For example, the following can be hard for some people to view:

library(dplyr, warn.conflicts=FALSE)

d <- iris %>% 
    group_by(Species) %>% 
    summarize_all(mean) %>% 
    gather(key, val, -Species)

ggplot(d, aes(x = Species, y = val, fill = key)) +
    geom_col(position = "dodge") +

There have been good questions and answers on Stack Overflow (also here, but the solutions are complicated and basically involve creating the patterns or textures by hand. I'm wondering if anyone has general ideas or suggestions or new approaches to solving this problem in a different way. Oftentimes when I think I can't do something with ggplot2, it means changing how I think about addressing it - but other (rare) times it just isn't implemented yet!


OK, so I am 90% I have seen someone do this…and I believe it was a pattern that involved cats. @maelle, was that you? Does that ring any bells?


Extent of my expertise = :joy:


Punny or not, these are definitely patterns! :stuck_out_tongue_winking_eye:


@jmichaelrosenberg I hope you didn't miss :wink: