Bubble charts and dot plots

In the scatterplot section, we have seen how bivariate data can be represented in a typical x-y plot. In some cases, you may need to represent an additional variable in your plot, and we have already seen how different colors can be used to represent different types of data. One other option is to use the size of the symbols; if you are representing the data in points, you can, for instance, change the point size to represent an additional property of your data (an additional variable). This type of plot is usually called a bubble chart.

We can see a very easy example using the movie dataset we created in the Bar charts example. Please refer to that section for how to create this dataset.

We can create a plot of the different ...

Get ggplot2 Essentials 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.