I have this nested list:
acc = [[3, 0.95804195804195802], [4, 0.965034965034965], [5, 0.97202797202797198], [6, 0.97202797202797198]]
and this code which is supposed to plot those values and set the boundaries of the y-axis to 95 and 100:
import matplotlib.pyplot as plt
x_ = [x[0] for x in acc]
y_ = [x[1] for x in acc]
plt.figure(figsize=(8,6))
plt.scatter(x_, y_)
plt.ylim((95, 100))
plt.show()
But I get this error, and I can't figure out why:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-193-5a9016a37585> in <module>()
19 plt.figure(figsize=(8,6))
20 plt.scatter(x_, y_)
---> 21 plt.ylim((95, 98))
22 plt.show()
TypeError: 'float' object is not callable