Game boy in ggplot2

Package

ggameboy

Author

Tobias Stalder

Basic game boy

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()

The ggameboy package in R

Game boy customization

Draw a game boy in R ggplot2

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.

gameboy_plot function

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") 

Draw a game boy in R ggplot2

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))
ggplot2

Elegant Graphics for Data Analysis

Buy on Amazon
Data Sketches

A journey of imagination, exploration, and beautiful data visualizations

Buy on Amazon
Better Data Visualizations

A Guide for Scholars, Researchers, and Wonks

Buy on Amazon

See also