Bubble plot





A bubble plot is a scatter plot with a third numeric variable mapped to circle size. This page describes several methods to build one with R.





A bubble chart is a scatterplot

A bubble chart is basically a scatterplot with a third numeric variable used for circle size. Thus, remember all the tips described in the scatterplot section also apply here.

Scatterplot section



Step by step with ggplot2

ggplot2 allows to create bubble chart thanks to the geom_point() function. Next examples will lead you through the process step by step:





Interactive version

Here is an interactive bubble chart built in R, thanks to the ggplotly() function of the plotly library. Try to hover circles to get a tooltip, or select an area of interest for zooming. Double click to reinitialize.

Get code
🌐 From the web

The web is full of astonishing R charts made by awesome bloggers. The R graph gallery tries to display some of the best creations and explain how their source code works. If you want to display your work here, please drop me a word or even better, submit a Pull Request!

Related chart types


Scatter
Heatmap
Correlogram
Bubble
Connected scatter
Density 2d