When I try to change y-label in pyplot I get an error.
'str' object is not callable
It is strange as I am able to change the x-label without an issue.
I am confused as renaming the xlabel works, but y doesn't.
plt.subplot(2,1,1)
plt.hist(asia2007["gdpPerCapita"],20)
plt.subplot(2,1,2)
plt.hist(europe2007["gdpPerCapita"],20)
plt.xlabel("Europe")
plt.ylabel("Freq")
plt.show()
I expect a graph with renamed Y label, but it throws an error.
----> 6 plt.ylabel("freq")
TypeError: 'str' object is not callable