Introducing artyfarty: a theming package for ggplot2

October 5, 2016
By

(This article was first published on FishyOperations, and kindly contributed to R-bloggers)

In the last few years, I’ve been using ggplot2 quite a lot. While the
ggplot2 default theme is quite slick, I started tweaking the theme to
fit my own taste and/or that of the target audience.

artyfarty is a collection of a few themes that I have used through the
years. While still a work in progress, and thus no CRAN release planned
for the moment, you can already try it out and see a collection of
themes: https://github.com/Bart6114/artyfarty.

library(ggplot2)
library(artyfarty)

ggplot(iris) +
  aes(x=Sepal.Length, y=Sepal.Width, color=Species) +
  geom_point() +
  scale_colour_manual(values = pal("flatpaleta")) +
  theme_flat() +
  ggtitle("Iris - sepal")

Or with a watermark:

ggplot(iris) +
  aes(x=Sepal.Length, y=Sepal.Width, color=Species) +
  watermark_img("flower.png") +
  geom_point() +
  scale_colour_manual(values = pal("flatpaleta")) +
  theme_flat() +
  ggtitle("Iris - sepal")

To leave a comment for the author, please follow the link and comment on their blog: FishyOperations.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)