Default game boy
By default, the gameboy_plot
function of the package creates a dark gray game boy.
# install.packages("devtools")
# devtools::install_github("toebR/ggameboy")
library(ggameboy)
gameboy_plot()
Arguments
You can customize every single color of the game boy, even the text displayed on the screen. The following is a cheat sheet created by the author summarizing all the arguments that can be customized.
Color and screen text
For instance, if you want your game boy in gold with a custom text you can type the following:
# install.packages("devtools")
# devtools::install_github("toebR/ggameboy")
library(ggameboy)
gameboy_plot(background = "white",
case = "gold",
screentext = "Pokemon Gold")
Adding more layers
In addition, it is possible to add more ggplot layers to the original plot, such as a title or a caption with ggtitle
or labs
, for instance. You can also modify these new layers with the theme
function components.
# install.packages("devtools")
# devtools::install_github("toebR/ggameboy")
# install.packages("ggplot2")
library(ggameboy)
library(ggplot2)
gameboy_plot(background = "white",
case = "#C0C0C0",
screentext = "Pokemon Silver") +
ggtitle("Silver Game Boy") +
labs(caption = "Made with ggameboy") +
theme(plot.title = element_text(hjust = 0.5))
See also