""" python Plot_Updating_Strangeness.py GTKAGG
    python Plot_Updating_Strangeness.py TKAGG
    python Plot_Updating_Strangeness.py WXAGG
"""
import sys
import numpy as np
import matplotlib

# specify backend
if len(sys.argv) == 2:
    matplotlib.use(sys.argv[1])
else:
    # using backend from matplotlibrc
    pass

import matplotlib.pyplot as plt

print " matplotlib-version : ", matplotlib.__version__
print " using backend :", matplotlib.get_backend()
 
plt.ion()

for i in xrange(30):
    x = np.random.random(size=(5)) 
    plt.plot(x, x**2)
    plt.draw()
    
plt.ioff()
