0

Is there a way to specify or define a new/different shape to use in ggplot2?

I am thinking of creating or loading a .png or other file format into R and using it as a value to the shape argument. Something like this

my_shape = load("my little weird shape")

ggplot(data = data, aes(x, y)) +
geom_point(shape = my_shape, aes(color = variable))

I am trying to generate a graph such as

enter image description here

by plotting and filling the shapes of the little human bodies. Any thoughts?

Felipe Alvarenga
  • 2,572
  • 1
  • 17
  • 36
  • Duplicates: https://stackoverflow.com/questions/27637455/display-custom-image-as-geom-point, https://stackoverflow.com/questions/2181902/how-to-use-an-image-as-a-point-in-ggplot – r2evans Mar 23 '18 at 15:41
  • 1
    You might find the `waffle` package helpful: [https://github.com/hrbrmstr/waffle](https://github.com/hrbrmstr/waffle) – markus Mar 23 '18 at 15:54

0 Answers0