Skip to content

ELJRussell/ELplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ELplot

The goal of ELplot is to standardize the work done in the Research team, especially as relates to data visualizations. In order to do this, it is useful to create functions that unify our theme, colors and other visual elements.

Loading libraries

In order to use the Calibri font, R will have to find it on your desktop. This can be done pretty easily using the extrafonts package.

library(extrafont)
font_import()

Once you have run this once, you can always bring in these new fonts using the following command:

loadfonts()

Installation

You can install the development version of ELplot like so:

devtools::install_github('ELJRussell/ELplot')

Using ELplot to create a theme

This is a basic example which shows you how to solve a common problem:

library(ELplot)
library(ggplot2)
extrafont::loadfonts()

ggplot(mtcars, aes(hp, mpg)) +
    geom_point(color = el_cols("dark navy"),
               size = 4, alpha = .8) +
    el_theme() +
    labs(title = "A simple ggplot2 example",
         subtitle = "Using the ELplot theme",
         caption = "Source: mtcars
         John Russell")

About

An EL Theme Kit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages