Screen Link:
My Code:
plt.subplot(1,2,1)
daytime['traffic_volume'].plot.hist()
plt.title('Daytime Traffic Volume')
plt.xlabel('Traffic Volume')
plt.ylabel('Frequency')
plt.xlim((0, 8000))
plt.ylim((0, 10000))
plt.subplot(1, 2,2)
nighttime['traffic_volume'].plot.hist()
plt.title('Nighttime Traffic Volume')
plt.xlabel('Traffic Volume')
plt.ylabel('Frequency')
plt.xlim((0, 8000))
plt.ylim((0, 10000))
plt.show()
What I expected to happen:
The plt.xlim() and plt.ylim() to bring the x- and the y-axis to the same ranges for both graphs.
What actually happened:
TypeError Traceback (most recent call last)
<ipython-input-56-63a653bff496> in <module>
6 plt.xlabel('Traffic Volume')
7 plt.ylabel('Frequency')
----> 8 plt.xlim((0, 8000))
9 plt.ylim((0, 10000))
10
TypeError: 'tuple' object is not callable