NameError in Python - suptitle not defined

645 Views Asked by At
fig = suptitle('image #{}'.format(num), fontsize=20)
NameError: name 'suptitle' is not defined

I already installed numpy, scipy and matplotlib and imported pylab but for some reason Python isn't recognizing the suptitle function.

1

There are 1 best solutions below

0
Scott Boston On BEST ANSWER

I think you need:

import matplotlib.pyplot as plt

plt.suptitle('image #{}'.format(num), fontsize = 20)