Skip to content

Step-by-step examples of building publication-quality figures in ggplot2

Notifications You must be signed in to change notification settings

Learning-jusuE404/practical_ggplot2

 
 

Repository files navigation

Practical ggplot2

Claus O. Wilke

The R package ggplot2 provides a powerful and flexible approach to data visualization, and it is suitable both for rapid exploration of different visualization approaches and for producing carefully crafted publication-quality figures. However, getting ggplot2 to make figures that look exactly the way you want them to can sometimes be challenging, and beginners and experts alike can get confused by themes, scales, coords, guides, or facets. This repository houses a set of step-by-step examples demonstrating how to get the most out of ggplot2, including how to choose and customize scales, how to theme plots, and when and how to use extension packages.

The examples shown are based on the book "Fundamentals of Data Visualization." However, there are minor differences between the figures here and the ones in the book. Most importantly, the book uses the Myriad Pro font family, which is not freely available. I have also cleaned up the ggplot2 code where appropriate, and I have made adjustments to font and figure sizes so the figures look appropriate in the default R Markdown html style.

List of examples provided:

About

Step-by-step examples of building publication-quality figures in ggplot2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%