Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | cleanup: remove noise code Remove <resizeable-object-mixin> and present*, use formatting-item-list when applicable. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
5217336ae95bb2a78038a6cf7fcd47c8 |
| User & Date: | jack 2025-04-06 18:51:24 |
Context
|
2025-04-06
| ||
| 19:18 | cosmetic changes check-in: 48a84e0c47 user: jack tags: master, trunk | |
| 18:51 | cleanup: remove noise code check-in: 5217336ae9 user: jack tags: master, trunk | |
|
2024-09-19
| ||
| 11:01 | modify the dataset protocol check-in: 18500c968b user: jack tags: master, trunk | |
Changes
Changes to Code/clim-mixins.lisp.
1 2 3 4 5 6 7 8 | ;;; This file contains CLIM implementation of various utilities and mixins ;;; that may be used for interactive plots and other things. (in-package #:eu.turtleware.polyclot.implementation) (c:define-command-table polyclot) (define-class <polyclot-view> (c:view) ()) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
;;; This file contains CLIM implementation of various utilities and mixins
;;; that may be used for interactive plots and other things.
(in-package #:eu.turtleware.polyclot.implementation)
(c:define-command-table polyclot)
(define-class <polyclot-view> (c:view) ())
;;; Color utilities.
(defvar *contrasts* (make-hash-table))
(defun contrasting-ink (n k)
(assert (and (<= 0 k n) (<= 1 n)))
(if (<= n 8)
(c:make-contrasting-inks n k)
(aref (ensure-gethash (n *contrasts*)
(multiple-value-bind (i h s)
(climi::color-ihs (c:make-contrasting-inks 1 0))
(loop with result = (make-array n)
with step = (/ n)
repeat n
for k from 0
for hue = h then (+ hue step)
do (setf (aref result k) (climi::make-ihs-color i hue s))
finally (return result))))
k)))
|
Changes to Code/theme.lisp.
1 2 | (in-package #:eu.turtleware.polyclot.implementation) | | | 1 2 3 4 5 6 7 8 9 10 | (in-package #:eu.turtleware.polyclot.implementation) (define-class <theme> (c:standard-bounding-rectangle) (title width height) (:default-initargs :title "(untitled)" :width 400 :height 300)) ;;; When we draw a plot of a certain size of the theme then we work with for ;;; the following objects: |
| ︙ | ︙ |
Changes to Demo/cl-bench-results.lisp.
| ︙ | ︙ | |||
23 24 25 26 27 28 29 |
(loop with *read-eval* = nil
for file in (directory (merge-pathnames "CL-benchmark*.*" output-dir))
for form = (with-open-file (stream file :direction :input)
(read stream))
append (process-result form)))))
(define-demo-plot *bench*
| | | > | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
(loop with *read-eval* = nil
for file in (directory (merge-pathnames "CL-benchmark*.*" output-dir))
for form = (with-open-file (stream file :direction :input)
(read stream))
append (process-result form)))))
(define-demo-plot *bench*
(let ((dataset (read-data "~/Workshop/repo/cl-bench/output/")))
(<polyclot> :title "Common Lisp Benchmark"
:width 1600 :height 600
:dataset dataset
:aesthetics (list :x "Test" :y "Time" :ink "Lisp")
:layers (list (<geom-bar>
:bin-width (/ 1 20)
:statistical-transformation i::+stat-identity+
:position-adjustment (i::<position-dodge>)))
:scales (list (make-scale :discrete :x)
(make-scale :continuous :y)
(make-scale :discrete :ink))))
"Common Lisp Bencharks example plot")
(find-application-frame 'a-repl :width 800 :height 600)
|
Changes to Demo/demo.lisp.
| ︙ | ︙ | |||
87 88 89 90 91 92 93 | (format *debug-io* "~a~%----------------------~%" val) ) (defgeneric display (frame stream) (:method (frame stream) | | < < < | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
(format *debug-io* "~a~%----------------------~%" val)
)
(defgeneric display (frame stream)
(:method (frame stream)
(clime:present* frame stream)))
(define-application-frame polyclot-demo-frame ()
((plots :initarg :plots :accessor plots)
(active :initarg :active :accessor active))
(:command-table (my-command-table :inherit-from (polyclot)))
(:pane :application :display-function #'display
:borders nil
|
| ︙ | ︙ | |||
127 128 129 130 131 132 133 |
(mapcar #'symbol-value (plots frame)))))
(define-polyclot-demo-frame-command (com-nop :menu t) ())
(c:define-gesture-name :show-dataset :pointer-button-press (:left :meta))
(defmethod display ((frame polyclot-demo-frame) *standard-output*)
| | | | | < | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
(mapcar #'symbol-value (plots frame)))))
(define-polyclot-demo-frame-command (com-nop :menu t) ())
(c:define-gesture-name :show-dataset :pointer-button-press (:left :meta))
(defmethod display ((frame polyclot-demo-frame) *standard-output*)
(format-items (mapcar 'symbol-value (plots frame)) :printer #'clime:present*)
(terpri)
(let ((active (active frame)))
(if (null active)
(format t "(select a plot)")
(formatting-item-list (*standard-output* :row-wise t)
(dolist (plot active)
(formatting-cell ()
(polyclot plot *standard-output*)))))))
(defparameter *frame*
(find-application-frame 'polyclot-demo-frame :plots *demo-plots*))
|