#Import needed libraries | |
import numpy as np | |
import plotly.express as px | |
#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 | |
fig = px.scatter(x, y, color=colors, size=colors) | |
fig.show() |