The result is:
This page shows how to write texts and put plots on the image using Python and Matplotlib.pyplot. The Figures can be exported as vector image such as pdf and svg using plt.savefig. It is impossible if you use save function of PIL; Python Image Library.