matplotlib version:2.0.0
System version:Windows 10
# before change
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = (8,5)
plt.plot([1,2,3,4],[1,2,1,3])
plt.title('Series trend')
plt.show()
# after change
from matplotlib import pyplot as plt
fontsize_set = 18
plt.rcParams["figure.figsize"] = (8,5)
plt.rc('xtick' , labelsize=fontsize_set)
plt.rc('ytick' , labelsize=fontsize_set)
plt.rc('legend', fontsize=fontsize_set)
plt.rc('font' , size=fontsize_set)
plt.plot([1,2,3,4],[1,2,1,3])
plt.title('Series trend')
plt.show()
Result:before change
沒有留言:
張貼留言