comparison graph.py @ 16:29a61ec4755b

Use correct variable name when saving a file
author Daniel O'Connor <darius@dons.net.au>
date Fri, 23 Feb 2018 15:04:59 +1030
parents c04c75360a3b
children 57dece5674e3
comparison
equal deleted inserted replaced
15:c04c75360a3b 16:29a61ec4755b
249 fig.subplots_adjust(left = 0.10, right = 0.88, top = 0.95, bottom = 0.15) 249 fig.subplots_adjust(left = 0.10, right = 0.88, top = 0.95, bottom = 0.15)
250 if fname == None: 250 if fname == None:
251 matplotlib.pyplot.show() 251 matplotlib.pyplot.show()
252 else: 252 else:
253 canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig) # Sets canvas in fig too 253 canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig) # Sets canvas in fig too
254 fig.savefig(startdt.strftime(fname)) 254 fig.savefig(end.strftime(fname))
255 255
256 if __name__ == '__main__': 256 if __name__ == '__main__':
257 main() 257 main()