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
Applied Data Visualization with R and ggplot2

You're reading from   Applied Data Visualization with R and ggplot2 Create useful, elaborate, and visually appealing plots

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher
ISBN-13 9781789612158
Length 140 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dr. Tania Moulik Dr. Tania Moulik
Author Profile Icon Dr. Tania Moulik
Dr. Tania Moulik
Arrow right icon
View More author details
Toc

Advanced Plotting Techniques

Two of the most common advanced plotting techniques are scatter plots and bubble charts. Scatter plots show the relationship between two variables. A bubble chart can include a third variable. Each point (with its values (v1, v2, v3) of associated data) is plotted as a disk, where two of the values show the x and y locations, and the third depicts the size. Just like in a scatter plot, a bubble chart uses numerical variables for its x and y axes. You cannot use categorical variables in a bubble chart.

In this plot, we will plot the electricity consumption per capita for different years and different countries. The size of the point will vary, according to the population of the country.

Creating a Bubble Chart

...
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