This repo contains the functions of the dntheme
package, which once
installed locally, provides helpful functions for creating and exporting
graphics made in ggplot in the style used by the Data Network associates
& projects.
dntheme
is not on CRAN, so you will have to install it directly from
Github using devtools. You can install the development version from
GitHub with:
install.packages("devtools")
devtools::install_github("Data-Network-Lab/dntheme")
The package automagically 🧙 imports (via showtext
) the Raleway
Google font (Raleway,
sans-serif)
library(dntheme)
d <- qplot(carat, data = diamonds[diamonds$color %in%LETTERS[4:7], ], geom = "histogram", bins=30, fill = color)
d
Tech themes and scales:
d + theme_dn() +
scale_fill_dn() +
labs(title="Data Network theme",
subtitle="the latest build of this README was 27/09/2021")
Data Network color scales:
data("iris")
d1 <- qplot(x = Sepal.Length, y =Sepal.Width,colour = Species,data = iris,geom = "point")
d1
r = d1 + theme_dn() +
scale_color_dn() +
labs(title="Data Network theme tooo!",
subtitle="wow, iris species are so popular")
DN_geoms, inspired by emoGG.
d2 <- data.frame(x = c(1:4, 3:1), y=1:7)
plot = ggplot(aes(x,y), data=d2) +
geom_dn(size=1.5, theme="google") +
theme_dn() +
labs(
x = "",
y = "")
add_dn_titles(
plot,
title = "Let's have this logos up here",
subtitle = "they look fun")
Please visit the LICENSE.md file.