17  Visualizing Data III - Boxplots and Barplots

Overview

So far in our exploration of data visualization, we’ve focused on scatterplots. We’ll now expand to consider visualizing categorical variables using boxplots (which are preferred) and barplots (which may be a bit more traditional).

Objectives

Upon completion of this lesson, you should be able to:


  1. Create boxplots and barplots with multiple panels
  2. Add mean and errorbars for SE to boxplots as an alternative to barplots
  3. Add errorbars to barplots

Data and R Code Files

The R code file and data files for this lesson can be found on the Essential R - Notes on learning R page.

R logo

17.1 Basic Boxplots

Here we’ll consider the basic boxplot.

Video - STAT 485 Lesson: 17.1

17.2 Adding Polish to a Boxplot

Now we’ll look at how we can polish up a boxplot to something that is publication ready.

Video - STAT 485 Lesson: 17.2

17.3 Adding Mean and SE to Boxplots

Here we’ll consider adding group means and SE errorbars to boxplots as a superior (and recommended) alternative to barplots.

Video - STAT 485 Lesson: 17.3

17.4 Multi-Panel Boxplot Example

Now we’ll put it all together to create a multi-panel boxplot.

Video - STAT 485 Lesson: 17.4

17.5 Adding Errorbars to Barplots

In this video, we’ll use arrows() to add errorbars to a barplot, and learn the trick to getting the errorbars to plot on the bars.

Video - STAT 485 Lesson: 17.5

17.6 Creating a Polished Barplot

Here we’ll put together the pieces to create a publicaiton-quality barplot.

Video - STAT 485 Lesson: 17.6

17.7 Creating a Multi-Panel Barplot

Finally we’ll wind up this chapter by creating a multi-panel barplot.

Video - STAT 485 Lesson: 17.7