O'Reilly logo

R Data Visualization Cookbook by Atmajitsinh Gohil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. The Pie Chart and Its Alternatives

In this chapter, we will cover the following recipes:

  • Generating a simple pie chart
  • Constructing pie charts with labels
  • Creating donut plots and interactive plots
  • Generating a slope chart
  • Constructing a fan plot

Introduction

Pie charts, as mediums of data representation, have been widely used in news media, corporate presentations, and research papers. Pie charts have been used in the past to compare data between two time periods as well as to represent parts of a whole in a single pie. However, even with such widespread use, they have been criticized by statisticians. The blog post at http://www.r-chart.com/2010/07/pie-charts-in-ggplot2.html summarizes the main criticism as follows:

  • The relative size of each ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required