我有如下的views.py文件
Def showimage(请求): #构造图 t =范围(0.0,2.0,0.01) s = sin(2 * pi * t) plot(t,s,linewidth = 1.0)
xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
buffer = StringIO.StringIO()
canvas = pylab.get_current_fig_manager().canvas
canvas.draw()
pilImage = PIL.Image.frombytes("RGB", canvas.get_width_height(), canvas.tostring_rgb())
pilImage.save(buffer, "PNG")
pylab.close()
您能不能请我将该图传递到html页面中??