Chapter 6. Creating Bar, Dot, and Pie Charts

In this chapter, we will cover the following recipes:

  • Creating bar charts with more than one factor variable
  • Creating stacked bar charts
  • Adjusting the orientation of bars – horizontal and vertical
  • Adjusting bar widths, spacing, colors, and borders
  • Displaying values on top of or next to the bars
  • Placing labels inside bars
  • Creating bar charts with vertical error bars
  • Modifying dot charts by grouping variables
  • Making better readable pie charts with clockwise-ordered slices
  • Labeling a pie chart with percentage values for each slice
  • Adding a legend to a pie chart

Introduction

In this chapter, we will look at bar, dot, and pie charts in detail. Bar charts are used commonly in reporting business data and scientific analysis. ...

Get R: Data Analysis and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.