Here is an example, plotting the square function. First load needed libraries
sudo aptitude install libplplot-dev plplot11-driver-cairo plplot11-driver-xwin
(in Ubuntu 12.04LTS), then in Lisp
(ql:quickload :cl-plplot) (defun x-y-plot () (let* ((x (iter (for x from 0.0 to 10.0 by 0.25) (collect x result-type vector))) (y (map 'vector (alexandria:rcurry 'expt 2) x)) (p (cl-plplot:new-x-y-plot x y)) (w (cl-plplot:basic-window :x-label "x" :y-label "x squared" :title "The square function"))) (cl-plplot:add-plot-to-window w p) (cl-plplot:render w "xwin"))) (x-y-plot)
Click on window and Enter to close; clicking on the close box for the window causes Lisp to crash, at least from Slime.