A bubble plot is a type of scatter plot. It not only draws data points using Cartesian coordinates but also creates bubbles on data points. Bubble shows the third dimension of a plot. It shows three numerical values: two values are on the x and y axes and the third one is the size of data points (or bubbles):
# Import the required modules
import matplotlib.pyplot as plt
import numpy as np
# Set figure size
plt.figure(figsize=(8,5))
# Create the data
countries = ['Qatar','Luxembourg','Singapore','Brunei','Ireland','Norway','UAE','Kuwait']
populations = [2781682, 604245,5757499,428963,4818690,5337962,9630959,4137312]
gdp_per_capita = [130475, 106705, 100345, 79530, 78785, 74356,69382, 67000]
# scale GDP per capita income to shoot the bubbles in the graph
scaled_gdp_per_capita = np.divide(gdp_per_capita, 80)
colors = np.random.rand(8)
# Draw the scatter diagram
plt.scatter(countries, populations, s=scaled_gdp_per_capita...