This is an R package, developed by the PRU team to make the process of creating publication-ready graphics in our in-house style, using R’s
ggplot2 library, a more reproducible process.
The package is constisted of the following functions:
theme_pru() to add the PRU style in the ggplot2 graphics
add_logo() to add the EUROCONTROL logo and the source
pru_pal() to see the colour palette of the PRU team
The following examples will help you understand how to use
ectrlplot package and its components step by step.
Let’s start with a basic scatterplot example.
If you want to modify some components of the
theme() and add your preferences. In this example, the Y axis line is added and the Y axis grid lines in the panel are removed.
See how to modify components of a theme.
Finish the plot by adding the logo, the source and the filepath that you want it to be saved.
The EUROCONTROL logo is the default in this package. If you want to use your own logo, modify the function by adding the parameter logo_image_path.
Now, let’s see how to use the
ectrlplot package in ggplot2 bar chart.
Now, we are grouping the data by class.
Use the PRU color palette by adding