cutterkom / generativeart

Create Generative Art with R
GNU General Public License v3.0
916 stars 163 forks source link

background color? #4

Closed JWellsBio closed 4 years ago

JWellsBio commented 4 years ago

I've tried several tricks and can't seem to change background color. Suggestions?

cutterkom commented 4 years ago

Hey! Sorry, I was not aware of the issue.

What you can do is to fork the repo and/or change the generate_plot() function ( https://github.com/cutterkom/generativeart/blob/master/R/generate_plot.R) by adding a theme() component

ggplot(aes(...)) + 
... + 
theme(panel.background = element_rect(fill = "hotpink"),
            plot.background = element_rect(fill = "hotpink"))

Does it work?

JWellsBio commented 4 years ago

Sorry for the late reply. Thanks for getting back. Error was entirely on my part. No issue. Thanks for your help!!

cutterkom commented 4 years ago

No worries! Meanwhile there was a pull request and background color is now a function parameter.