Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Move local function to toplevel (aesthetic change) |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
0c7229a01daa9678f4a18c5bb31eb6a6 |
| User & Date: | jack 2025-04-06 19:20:20 |
Context
|
2025-04-06
| ||
| 19:49 | don't print the dataset in a listener demo check-in: 637a08c828 user: jack tags: master, trunk | |
| 19:20 | Move local function to toplevel (aesthetic change) check-in: 0c7229a01d user: jack tags: master, trunk | |
| 19:18 | cosmetic changes check-in: 48a84e0c47 user: jack tags: master, trunk | |
Changes
Changes to Code/dataset-and-aesthetics.lisp.
| ︙ | ︙ | |||
139 140 141 142 143 144 145 |
:ink* c:+transparent-ink+
:line-style *default-line-style*
:text-style *default-text-style*
:label nil
:align-x :center
:align-y :center))
| | < | | | | | | | | | | | | | | | | | > | | | | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
:ink* c:+transparent-ink+
:line-style *default-line-style*
:text-style *default-text-style*
:label nil
:align-x :center
:align-y :center))
(defun %show-dataset (dataset *standard-output*)
(c:formatting-table (t :x-spacing 30)
(c:with-drawing-options (t :text-face :bold)
(c:formatting-row ()
(c:surrounding-output-with-border (t :padding 0 :ink c:+light-pink+ :filled t)
(c:formatting-cell () (format t "()"))
(c:formatting-cell (t :align-x :center) (format t "X"))
(c:formatting-cell (t :align-x :center) (format t "Y"))
(c:formatting-cell (t :align-x :center) (format t "INK"))
(c:formatting-cell ()))))
(do-points (var dataset)
(with-aes (x y ink) var
(c:formatting-row ()
(c:formatting-cell () (format t ""))
(c:formatting-cell () (format t "~a" x))
(c:formatting-cell () (format t "~a" y))
(c:formatting-cell () (format t "~a" ink)))))))
(defun show-dataset (dataset stream)
(if (null stream)
(e:with-output-to-drawing-stream (s nil nil)
(%show-dataset dataset s))
(%show-dataset dataset stream)))
;;; FIXME this should be a protocol so we may switch to proper data frames.
;;; The function conses a new vector from a column (for now indexed with the
;;; aesthetic name). We should probably memoize columns too(!).
(defun dataset-column (mapped-dataset column-name)
(let* ((nrows (length (data-array mapped-dataset)))
(vector (make-array (list nrows) :fill-pointer 0)))
|
| ︙ | ︙ |