Skip to content

Instantly share code, notes, and snippets.

@farshid616
Created July 5, 2018 15:59
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 farshid616/8d4c4782cd094e20a8767d2ddb7b0b9b to your computer and use it in GitHub Desktop.
Save farshid616/8d4c4782cd094e20a8767d2ddb7b0b9b to your computer and use it in GitHub Desktop.
Simple drawing 2D coordinate, dynamically with matplotlib
import numpy as np
import matplotlib.pyplot as plt
plt.axis([0, 10, 0, 1])
for i in range(10):
y = np.random.random()
plt.scatter(i, y)
plt.pause(0.05)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment