9951 explained code solutions for 126 technologies


python-matplotlibHow to change font size of axis ticks


import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rc('xtick', labelsize=20)
mpl.rc('ytick', labelsize=15)

plt.plot([2,1,3])
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

mpl.rc

manage configuration

xtick

setup x-axis ticks params

ytick

setup y-axis ticks params

labelsize

change size of labels for specified param

.show()

render chart in a separate window