3358 search results for "ggplot"

Subtitles and captions with ggplot2 v.2.2.0

November 15, 2016
By
Subtitles and captions with ggplot2 v.2.2.0

Back in March 2016, I wrote about an extension to the R package ggplot2 that allowed subtitles to be added to charts. The process took a bit of fiddling and futzing, but now, with the release of ggplot2 version 2.2.0, it’s easy.Let’s retrace the steps, and create a chart with a subtitle and a caption, the...

Read more »

ggplot2 2.2.0

November 15, 2016
By
ggplot2 2.2.0

I’m very pleased to announce ggplot2 2.2.0. It includes four major new features: Subtitles and captions. A large rewrite of the facetting system. Improved theme options. Better stacking. It also includes as numerous bug fixes and minor improvements, as described in the release notes. The majority of this work was carried out by Thomas Pederson, who I

Read more »

How to make a simple heatmap in ggplot2

November 15, 2016
By
How to make a simple heatmap in ggplot2

In the world of data visualization, the heatmap is underrated and underutilized. It has limitations, but overall, it’s an excellent tool in your data science and data visualization toolkit. After you’ve mastered the foundational visualization techniques (you can write the code for the basic plots in your sleep, right?), you should learn the heatmap.   The post

Read more »

Secondary Axis in ggplot2 v2.2.0

November 14, 2016
By
Secondary Axis in ggplot2 v2.2.0

The recent release of Hadley Whickham’s ggplot2 version 2.2.0 included several new features. Notably Subtitles and captions. A large rewrite of the facetting system. Improved theme options. Better stacking. What jumped out to me was the...

Read more »

Ordering categories within ggplot2 facets

November 12, 2016
By
Ordering categories within ggplot2 facets

@drsimonj here to share my method for ordering categories within facets to create plots that look like this… instead of like this…  Motivation: Tidy Text Mining in R The motivation for this post comes from Tidy Text Mining in R by Julia Silge and David Robinson. It is a...

Read more »

Make a bar plot with ggplot

November 11, 2016
By
Make a bar plot with ggplot

The first time I made a bar plot (column plot) with ggplot (ggplot2), I found the process was a lot harder than I wanted it to be. This post steps through building a bar plot from start to finish. First, let’s make some data. I’m going to make a vector of months, a vector of

Read more »

ggloop: An R package to create multiple ggplot2 plots

November 10, 2016
By
ggloop: An R package to create multiple ggplot2 plots

ggloop is an R package which creates multiple ggplot2 plots with a single function call. The main function, ggloop(), accepts vectors of aesthetics via aes_loop(), which allows ggloop() to generate multiple plots. To read more about this package (which is available on CRAN), you can check out the package website which was built with pkgdown (formerly

Read more »

Make A Box Plot with Single Column Data Using Ggplot2 Tutorial

November 7, 2016
By
Make A Box Plot with Single Column Data Using Ggplot2 Tutorial

Last week I had my class practice making a box plot using the data on page 66 in The Practice of Statistics 4th Edition (TPS 4ed) text book. I’m still going over the details of making a box plot with just a single vector or variable of data. Many of the problems in our textbook

Read more »

ggplot2 axis limit gotchas

ggplot2 axis limit gotchas

Setting axis limits in ggplot has behaviour that may be unexpected: any data that falls outside of the limits is ignored, instead of just being hidden. This means that if you are apply a statistic or calculation on the data, like plotting a box and whi...

Read more »

How to add a background image to ggplot2 graphs

October 29, 2016
By
How to add a background image to ggplot2 graphs

When producing so called infographics, it is rather common to use images rather than a mere grid as background. In this blog post, I will show how to use a background image with ggplot2. Packages required The following code will install load and / or install the R packages required for this blog post. if Related Post

Read more »

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)