#Import needed libraries
import numpy as np
import matplotlib.pyplot as plt
#Add this if you're using Jupyter Notebook
%matplotlib inline
#Generate data
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = (30 * np.random.rand(N))**2 # 0 to 15 point radii
#Plot scatter plot
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()