pyplot.savefig throws an error when given a path with a ~ for the user's home directory. Writing out the full path works as expected.
import matplotlib.pyplot as plt
output = '~/plot.png'
plt.plot(range(10))
plt.savefig(output)
FileNotFoundError: [Errno 2] No such file or directory: '~/plot.png'
Matplotlib 1.5.0, Python 3.4.3 (Anaconda 2.4.1), Linux