Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ggplot2 Essentials

You're reading from   ggplot2 Essentials Explore the full range of ggplot2 plotting capabilities to create meaningful and spectacular graphs

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781785283529
Length 234 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Donato Teutonico Donato Teutonico
Author Profile Icon Donato Teutonico
Donato Teutonico
Arrow right icon
View More author details
Toc

Plots with polar coordinates

In this section, we will have a look at a few plots that can be created using polar coordinates. We have already introduced this coordinate system in the previous chapter. Just remember that you should always use these coordinates with caution since the representation of data in circular form can generate very pronounced perceptual problems concerning the relative areas in the plot.

The most important plots that you can realize with these coordinates are the pie chart, the bullseye chart, and the coxcomb diagram. For our examples, we will use the movie dataset, which we created in previous chapters and the myMovieData dataset, and we will represent in these different plots the proportions of movies within each category.

A pie chart

A pie chart in ggplot2 corresponds to a stacked bar chart in polar coordinates. This means that to produce a pie chart, we will first create a bar chart with bars stacked one on top of the other, and then we will change the coordinate...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image