So this flot thing is pretty cool. But I hate working in JS and most of my web tinkering is using Django, which is python-based. So I wrote a quick and dirty module for generating flot output based on a python class. Here’s how I reproduce their first flot example:
p1 = pyflot.Plot() x1 = np.arange(0,14,0.5); y1 = np.sin(x1) x2 = [0,4,8,9]; y2 = [3,8,5,13] x3 = [0,7,None,7,12]; y3 = [12,12,None,2.5,2.5] p1.plot(x1,y1,'-') p1.plot(x2,y2,'-') p1.plot(x3,y3,'-') p1.htmlout('example1.html')
And here’s the output html to compare.