I am tryiny to save my matplotlib.pyplots to a pdf. I am using PdfPages for it.
plot gets saved for :
pdf = PdfPages("Minion Plots - May 22.pdf")
fig = plt.figure()
plt.title('Counter')
plt.plot(data2['timestamp'],data2['counter'])
pdf.savefig(fig)
throws an error for
ax = plt.figure().gca()
plt.title('Time to Restart')
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
plt.ylabel('Time in Minutes')
fig = plt.plot(data1['Time to Restart'])
pdf.savefig(fig)
I am using
ax = plt.figure().gca()
for
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
error is
TypeError: unhashable type: 'list'