Skip to content

Commit

Permalink
Create random_plotter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
engineersportal committed Aug 2, 2018
1 parent 474e783 commit c316642
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions random_plotter.py
@@ -0,0 +1,12 @@
from pylive import live_plotter
import numpy as np

size = 100
x_vec = np.linspace(0,1,size+1)[0:-1]
y_vec = np.random.randn(len(x_vec))
line1 = []
while True:
rand_val = np.random.randn(1)
y_vec[-1] = rand_val
line1 = live_plotter(x_vec,y_vec,line1)
y_vec = np.append(y_vec[1:],0.0)

0 comments on commit c316642

Please sign in to comment.