knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of unam.theme is to provide a ggplot2 theme using UNAM's graphic identity.
Academic/Non-commercial use only.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("alberto-mateos-mo/unam.theme")
The custom theme and scales are used as follows:
library(unam.theme) library(ggplot2) ggplot(iris)+ geom_point(aes(x = Sepal.Length, y = Petal.Length, colour = Species), size = 3)+ scale_colour_unam()+ theme_unam()
Using secondary palette:
library(unam.theme) library(ggplot2) ggplot(iris)+ geom_point(aes(x = Sepal.Length, y = Petal.Length, colour = Species), size = 3)+ scale_colour_unam(palette = "secondary")+ theme_unam()
Using a continuous scale:
library(unam.theme) library(ggplot2) ggplot(iris)+ geom_point(aes(x = Sepal.Length, y = Petal.Length, colour = Petal.Width), size = 3)+ scale_colour_unam(palette = "basic", discrete = FALSE)+ theme_unam()
Note: UNAM's graphic image consists of at most three colours: #003D79, #D59F0F and #B6985E, additional colours were selected using colormind.io site.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.