Most Basic Bubble ChartA bubble plot is basically a scatterplot with an additional dimension: size of points. Using seaborn library, a bubble plot can be constructed using the
Here, gapminder data set is used and the relationship between life expectancy (y) and gdp per capita (x) of world countries is represented. The population of each country is represented through dot size. Note: the
Control Bubble SizeYou can control the sizes of bubbles using the
Bubble colorWe added a third dimension to our scatterplot with the sizes of bubbles. Now, we will add a forth dimension by mapping colors to
variables. Here, the continent of each country is used to control bubble color and passed to the function with the
Control AestethicsYou can set the theme using the
|