Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 20, 2020 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/7fe12922b06457609c8621a16fa30469 to your computer and use it in GitHub Desktop.
Save amankharwal/7fe12922b06457609c8621a16fa30469 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
rng = np.random.RandomState(0)
x = rng.randn(100)
y = rng.randn(100)
colors = rng.rand(100)
sizes = 1000 * rng.rand(100)
plt.scatter(x, y, c=colors, s=sizes, alpha=0.3,
cmap='viridis')
plt.colorbar()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment