def log_plot(x,y, title='', xlabel='', ylabel=''):
fig = Figure()
plot1 = fig.add_subplot(111)
plot1.set_title(title)
plot1.set_ylabel(ylabel)
plot1.set_xlabel(xlabel)
plot1.plot(x,y)
plot1.set_yscale('log')
canvas = FigureCanvas(fig)
canvas.print_figure('sage.png')