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