9952 explained code solutions for 126 technologies

python-matplotlibHow to change custom text size

import matplotlib.pyplot as plt

plt.text(0.1, 3.5, "hi from python",fontsize=22)

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


plot specified data


adds custom text to chart

0.1, 3.5

vertical and horizontal coordinates for our text box

hi from python

sample text to show


set font size for the text


render chart in a separate window