How to Save Plot Figure as JPG or PNG in Matplotlib?

How to Save Plot Figure as JPG or PNG in Matplotlib?