I\'m currently using scale_brewer()
for fill and these look beautiful in color (on screen and via color printer) but print relatively uniformly as greys when us
You can use ggtextures package by @claus wilke to draw textured rectangles and bars with ggplot2
.
# Image/pattern randomly selected from README
path_image <- "http://www.hypergridbusiness.com/wp-content/uploads/2012/12/rocks2-256.jpg"
library(ggplot2)
# devtools::install_github("clauswilke/ggtextures")
ggplot(mtcars, aes(cyl, mpg)) +
ggtextures::geom_textured_bar(stat = "identity", image = path_image)
You can also combine it with other geoms:
data_raw <- data.frame(x = round(rbinom(1000, 50, 0.1)))
ggplot(data_raw, aes(x)) +
geom_textured_bar(
aes(y = ..prop..), image = path_image
) +
geom_density()