Tidyverse

Easy Latex Titles and Labels for ggplot

Summary Ever wanted to add \(\LaTeX\) to your R plots? Well now you can, with tikz, and it will allow you to use \(\LaTeX\) code within your plot titles, labels, and annotations. We’re going to look at how to use \(\LaTeX\) (text formating, formulas, fractions, greek letters, etc) with your ggplot data visualizations. We will be using the tikzDevice package for R (and to use your plots in \(\LaTeX\), you will use the package tikz).

Introduction to ggplot2 (part 2)

Getting bored with the plots you can make using the base R plot? Probably time to spice things up with ggplot! You can read through this article, or you can watch the tutorial video below (or both!). Let’s get started. First load the ggplot2 library, since thats what we’re here to learn! library(ggplot2) We’re going to be looking at the msleep dataset (same one we were looking at in the last tutorial )

Introduction to ggplot2 (part 1)

Getting bored with the plots you can make using the base R plot? Probably time to spice things up with ggplot! You can read through this article, or you can watch the tutorial video below (or both!). Let’s get started. If you haven’t used ggplot before, you will need to install that package by running this either in the R console, or in an R script: install.packages("ggplot2") To include the library, you just run this: