bubble plot is a scatterplot where a third dimension is added: the value of an additional variable is represented through the size of the dots. You need 3 numerical variables as input: one is represented by the X

axis, one by the Y axis, and one by the size. Do not forget to provide a legend to make possible the link between the size and the value. Note that too many bubble make the chart hard to read, so this type of representation is

usually not recommended for big amount of data. Last but not least, note that the area of the circles must be proportional to the area, not to the radius, to avoid exaggerate the variation in your data.

 

Sponsors


 

Ggplot2 library


Ggplot2 is definitely the best choice to build a bubble plot. In the aesthetic part of your code, just add size=varName, and the varName column will be used to control the size of dots. Note that it can be handy to add transparency to your dots to avoid that a big data point completely hides underlying points.

Interactive chart


As for scatterplots, interactive versions of bubble plots are much more insightful than static ones: hovering a datapoint will give you a few more information about it. It is really straightforward to make it once you have a static ggplot2 version: simply use the ggplotly function of plotly as proposed below:

 

 

 

 

 

Hover, select a zone, click the legend, export…

 

Other chart involving bubble plot


 

 

 

Related


Search the gallery