From what I understand, you change the size of the title and axis labels using frontsize=... on matplotlib. However, when I use this I get an error, and I don't understand why because every site I have come across shows the same method. Does someone know what the problem is?
My code:
fig, (f1, f2, f3) = plt.subplots(nrows=1, ncols=3, sharex=True, figsize=(12, 6))
f1.plot(x, y, 'b')
f1.errorbar(x, y, std)
f1.set_title('Top Level', titlesize=20)
f1.set_xlabel('(a) time', labelsize=13)
f1.set_ylabel('Proportion', labelsize=13)
(the same concept for f2 and f3)
plt.show()
The error I receive is: AttributeError: 'Text' object has no property 'titlesize' I have imported the following: import matplotlib import matplotlib.pyplot as plt
I have tried using labelsize as well