Re: SOLVED Re: [web2py] Re: matplotlib plugin

2012-01-18 Thread Massimo Di Pierro
Not sure I understand the question. You need two functions. One returns the image. One returns the view that embeds the image. On Jan 18, 3:24 pm, andrej burja wrote: > thank you > > this is working example > > controller: > import os, tempfile > os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp() >

SOLVED Re: [web2py] Re: matplotlib plugin

2012-01-18 Thread andrej burja
thank you this is working example controller: import os, tempfile os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp() import cStringIO import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np def draw(): x = np.array([10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5])