The module qwt.qplt defines a tiny data-directed programming language to simplify the use of QwtPlot from the Python command line interpreter. Here follows a small example:
>>> import iqt # 1 >>> from qwt.qplt import * # 2 >>> x = arange(-2*pi, 2*pi, 0.01) # 3 >>> p = Plot(Curve(x, cos(x), Pen(Magenta, 2), "cos(x)"), # 4 ... Axis(Bottom, "x axis"), # 5 ... Axis(Left, "y axis"), # 6 ... Axis(Right, Logarithmic), # 7 ... Curve(x, exp(x), Pen(Red), "exp(x)", Right), # 8 ... ("PyQwt demo based on Qwt-%s (http://qwt.sf.net)" # 9 ... % QWT_VERSION_STR)) # 10 >>> x = x[0:-1:10] # 11 >>> p.plot(Curve(x, cos(x-pi/4), # 12 ... Symbol(Circle, Yellow), "circle"), # 13 ... Curve(x, cos(x+pi/4), # 14 ... Pen(Blue), Symbol(Square, Cyan), "square")) # 15