#!/usr/bin/python3

import numpy as np              #Uporaba učinkovitih funkcij numpy
import matplotlib.pyplot as plt #Risanje rezultata z matplotlib
import matplotlib.animation as ani
import time                     #Merjenje hitrosti izvajanja

fig=plt.figure()
ax=fig.add_subplot(111)
line1,=ax.plot(np.random.randn(100))

def animate(stevec):
    line1.set_ydata(np.random.randn(100))
    print((stevec+3)/(time.time()-zacetek))
    return line1,

zacetek=time.time()
animacija=ani.FuncAnimation(fig, animate, interval=10, blit=True)
plt.show()
