#| Histogram demo code. 1 Jan 96 ... Simplified. 3 Nov 95 ... Created from code in paper. |# ; --- Definitions of the command prototype. (defproto HISTOGRAM-CMD-PROTO nil nil commando-proto) (defmeth histogram-cmd-proto :ISNEW () (call-next-method "Histogram" 'histogram "Expression ->")) (defmeth histogram-cmd-proto :BUTTON-ITEMS () (list (send button-item-proto :new "Add kernel" :action #'(lambda () (let* ((hist (send self :slot-value 'target)) (data (send hist :point-coordinate 0 (iseq (send hist :num-points)))) ) (send hist :add-lines (kernel-dens data)) ))))) ; --- This is how the function install-statistics-menu should look ; in order to add the new command. You can execute it from here ; rather than alter the file axis.lsp. (defun INSTALL-STATISTICS-MENU () (remove-statistics-menu) (setf *statistics-menu* (send menu-proto :new "Statistics")) (let ((evalItem (send stat-menu-item-proto :new "Evaluate" eval-cmd-proto)) (descItem (send stat-menu-item-proto :new "Describe" desc-cmd-proto)) (densItem (send stat-menu-item-proto :new "Univariate" density-cmd-proto)) (histItem (send stat-menu-item-proto :new "Histogram" histogram-cmd-proto)) (compItem (send stat-menu-item-proto :new "Compare" compare-cmd-proto)) (scatItem (send stat-menu-item-proto :new "Scatter Plot" scatter-cmd-proto)) (scatMatItem (send stat-menu-item-proto :new "Scatterplot Matrix" scatMat-cmd-proto)) (spinItem (send stat-menu-item-proto :new "Spin Plot" spin-cmd-proto)) (corrItem (send stat-menu-item-proto :new "Correlation" corr-cmd-proto)) (regrItem (send stat-menu-item-proto :new "Regression" regr-cmd-proto)) (robregrItem (send stat-menu-item-proto :new "Robust Regression" robust-regr-cmd-proto)) (seItem (send stat-menu-item-proto :new "Structural Eqns" se-cmd-proto)) (bootItem (send stat-menu-item-proto :new "Bootstrap" uniboot-cmd-proto)) ) (send *statistics-menu* :append-items evalItem descItem (send dash-item-proto :new) densItem histItem compItem scatItem scatmatItem spinItem (send dash-item-proto :new) corrItem regrItem robRegrItem seItem (send dash-item-proto :new) bootItem) ; removed regrbootitem (send *statistics-menu* :install))) (install-statistics-menu)