(eval `(defun ,ui-name () (with-ltk () (let* ,letz ,@packer)))) (eval `(defun ,model-name ,function-parameters ,@model)) (eval `(defun ,importance-name ,function-parameters ,@importance)) `(defun ,function-name ,function-parameters (let* ((path (make-pathname :name "tmp.dat")) (output-stream (open path :direction :output :if-exists :supersede))) (with-gnuplot ('linux) (set-grid 'on) (format-gnuplot "set xticks 1") (format-gnuplot "set yticks 1") ,@action))))) (defparameter *p-values* #(.25 .22 .14 .14 .069 .064 .033 .033 .022 .02 .013)) (defparameter *s-values* #(.728 .166 .065 .018 .018 .006)) (defparameter *DL* #\Tab) ;(defun update-scale-color () ; (configure 'lambda troughcolor :blue)) (defmacro set-labels (x y z) `(progn (format-gnuplot "set xlabel '~A'" ,x) (format-gnuplot "set ylabel '~A'" ,y) (format-gnuplot "set zlabel '~A'" ,z))) (defmacro generate-thumbs (viewx viewy dx dy) `(progn (format-gnuplot "set terminal gif") (format-gnuplot "set size .6,.6") (dotimes (i 3) (format-gnuplot (format nil "set view ~A,~A" (+ ,viewx (* (1+ i) ,dx)) (+ ,viewy (* (1+ i) ,dy)))) (format-gnuplot (format nil "set output \"~A.gif\"" i)) (format-gnuplot "splot 'tmp.dat' with linespoints")) (format-gnuplot "set terminal wxt") (format-gnuplot "set size 1,1") (format-gnuplot "set output"))) (defun calculate-t (l j) (/ (* (exp (- l)) (expt l j)) (n! j))) (defun n! (n) (if (or (= n 0) (= n 1)) 1 (* n (n! (- n 1)))))