Reputation: 1626
I am plotting a graph using matplotlib but python is throwing an error 'Tuple is not callable'
import matplotlib.pyplot as plt
fig, ax = plt.subplots(2, 2)
ax[0, 0].plot(range(10), 'r')
ax[1, 0].plot(range(10), 'b')
ax[0, 1].plot(range(10), 'g')
ax[1, 1].plot(range(10), 'k')
plt.show()
Upvotes: 3
Views: 373
Reputation: 26
Please check your python version because range() function works different in python 2 and python 3
Upvotes: 1