Change savefig to figname. Comment out plt.show()