1 ;;; chart.el --- Draw charts (bar charts, etc) -*- lexical-binding: t -*-
3 ;; Copyright (C) 1996, 1998-1999, 2001, 2004-2005, 2007-2017 Free
4 ;; Software Foundation, Inc.
6 ;; Author: Eric M. Ludlam <zappo@gnu.org>
8 ;; Keywords: OO, chart, graph
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 ;; This package is an experiment of mine aiding in the debugging of
28 ;; eieio, and proved to be neat enough that others may like to use
29 ;; it. To quickly see what you can do with chart, run the command
30 ;; `chart-test-it-all'.
32 ;; Chart current can display bar-charts in either of two
33 ;; directions. It also supports ranged (integer) axis, and axis
34 ;; defined by some set of strings or names. These name can be
35 ;; automatically derived from data sequences, which are just lists of
36 ;; anything encapsulated in a nice eieio object.
38 ;; Current example apps for chart can be accessed via these commands:
39 ;; `chart-file-count' - count files w/ matching extensions
40 ;; `chart-space-usage' - display space used by files/directories
41 ;; `chart-emacs-storage' - Emacs storage units used/free (garbage-collect)
42 ;; `chart-emacs-lists' - length of Emacs lists
43 ;; `chart-rmail-from' - who sends you the most mail (in -summary only)
47 ;; If you find the default colors and pixmaps unpleasant, or too
48 ;; short, you can change them. The variable `chart-face-color-list'
49 ;; contains a list of colors, and `chart-face-pixmap-list' contains
50 ;; all the pixmaps to use. The current pixmaps are those found on
51 ;; several systems I found. The two lists should be the same length,
52 ;; as the long list will just be truncated.
54 ;; If you would like to draw your own stipples, simply create some
55 ;; xbm's and put them in a directory, then you can add:
57 ;; (setq x-bitmap-file-path (cons "~/mybitmaps" x-bitmap-file-path))
59 ;; to your .emacs (or wherever) and load the `chart-face-pixmap-list'
60 ;; with all the bitmaps you want to use.
63 (eval-when-compile (require 'cl-lib
))
64 (eval-when-compile (require 'cl-generic
))
67 (define-obsolete-variable-alias 'chart-map
'chart-mode-map
"24.1")
68 (defvar chart-mode-map
(make-sparse-keymap) "Keymap used in chart mode.")
70 (defvar chart-local-object nil
71 "Local variable containing the locally displayed chart object.")
72 (make-variable-buffer-local 'chart-local-object
)
74 (defvar chart-face-color-list
'("red" "green" "blue"
75 "cyan" "yellow" "purple")
76 "Colors to use when generating `chart-face-list'.
77 Colors will be the background color.")
79 (defvar chart-face-pixmap-list
80 (if (and (fboundp 'display-graphic-p
)
82 '("dimple1" "scales" "dot" "cross_weave" "boxes" "dimple3"))
83 "If pixmaps are allowed, display these background pixmaps.
84 Useful if new Emacs is used on B&W display.")
86 (defcustom chart-face-use-pixmaps nil
87 "Non-nil to use fancy pixmaps in the background of chart face colors."
91 (declare-function x-display-color-cells
"xfns.c" (&optional terminal
))
93 (defvar chart-face-list
95 (let ((cl chart-face-color-list
)
96 (pl chart-face-pixmap-list
)
101 (intern (concat "chart-" (car cl
) "-" (car pl
)))))
102 (set-face-background nf
(if (condition-case nil
103 (> (x-display-color-cells) 4)
107 (set-face-foreground nf
"black")
108 (if (and chart-face-use-pixmaps
110 (fboundp 'set-face-background-pixmap
))
112 (set-face-background-pixmap nf
(car pl
))
113 (error (message "Cannot set background pixmap %s" (car pl
)))))
118 "Faces used to colorize charts.
119 List is limited currently, which is ok since you really can't display
120 too much in text characters anyways.")
122 (define-derived-mode chart-mode special-mode
"Chart"
123 "Define a mode in Emacs for displaying a chart."
124 (buffer-disable-undo)
125 (set (make-local-variable 'font-lock-global-modes
) nil
)
126 (font-lock-mode -
1) ;Isn't it off already? --Stef
130 ((title :initarg
:title
131 :initform
"Emacs Chart")
132 (title-face :initarg
:title-face
133 :initform
'bold-italic
)
134 (x-axis :initarg
:x-axis
136 (x-margin :initarg
:x-margin
138 (x-width :initarg
:x-width
140 (y-axis :initarg
:y-axis
142 (y-margin :initarg
:y-margin
144 (y-width :initarg
:y-width
146 (key-label :initarg
:key-label
148 (sequences :initarg
:sequences
151 "Superclass for all charts to be displayed in an Emacs buffer.")
153 (defun chart-new-buffer (obj)
154 "Create a new buffer NAME in which the chart OBJ is displayed.
155 Returns the newly created buffer."
156 (with-current-buffer (get-buffer-create (format "*%s*" (oref obj title
)))
158 (setq chart-local-object obj
)
161 (cl-defmethod initialize-instance :after
((obj chart
) &rest _fields
)
162 "Initialize the chart OBJ being created with FIELDS.
163 Make sure the width/height is correct."
164 (oset obj x-width
(- (window-width) 10))
165 (oset obj y-width
(- (window-height) 12)))
167 (defclass chart-axis
()
168 ((name :initarg
:name
169 :initform
"Generic Axis")
170 (loweredge :initarg
:loweredge
172 (name-face :initarg
:name-face
174 (labels-face :initarg
:labels-face
176 (chart :initarg
:chart
179 "Superclass used for display of an axis.")
181 (defclass chart-axis-range
(chart-axis)
182 ((bounds :initarg
:bounds
183 :initform
'(0.0 .
50.0))
185 "Class used to display an axis defined by a range of values.")
187 (defclass chart-axis-names
(chart-axis)
188 ((items :initarg
:items
191 "Class used to display an axis which represents different named items.")
193 (defclass chart-sequece
()
194 ((data :initarg
:data
199 "Class used for all data in different charts.")
201 (defclass chart-bar
(chart)
202 ((direction :initarg
:direction
204 "Subclass for bar charts (vertical or horizontal).")
206 (cl-defmethod chart-draw ((c chart
) &optional buff
)
207 "Start drawing a chart object C in optional BUFF.
208 Erases current contents of buffer."
209 (with-silent-modifications
211 (if buff
(set-buffer buff
))
213 (insert (make-string (window-height (selected-window)) ?
\n))
214 ;; Start by displaying the axis
219 (message "Rendering chart...")
224 (message "Rendering chart...done")
227 (cl-defmethod chart-draw-title ((c chart
))
228 "Draw a title upon the chart.
229 Argument C is the chart object."
230 (chart-display-label (oref c title
) 'horizontal
0 0 (window-width)
231 (oref c title-face
)))
233 (cl-defmethod chart-size-in-dir ((c chart
) dir
)
234 "Return the physical size of chart C in direction DIR."
235 (if (eq dir
'vertical
)
239 (cl-defmethod chart-draw-axis ((c chart
))
240 "Draw axis into the current buffer defined by chart C."
241 (let ((ymarg (oref c y-margin
))
242 (xmarg (oref c x-margin
))
243 (ylen (oref c y-width
))
244 (xlen (oref c x-width
)))
245 (chart-axis-draw (oref c y-axis
) 'vertical ymarg
246 (if (oref (oref c y-axis
) loweredge
) nil xlen
)
247 xmarg
(+ xmarg ylen
))
248 (chart-axis-draw (oref c x-axis
) 'horizontal xmarg
249 (if (oref (oref c x-axis
) loweredge
) nil ylen
)
250 ymarg
(+ ymarg xlen
)))
253 (cl-defmethod chart-axis-draw ((a chart-axis
) &optional dir margin zone start end
)
254 "Draw some axis for A in direction DIR with MARGIN in boundary.
255 ZONE is a zone specification.
256 START and END represent the boundary."
257 (chart-draw-line dir
(+ margin
(if zone zone
0)) start end
)
258 (chart-display-label (oref a name
) dir
(if zone
(+ zone margin
3)
259 (if (eq dir
'horizontal
)
261 start end
(oref a name-face
)))
263 (cl-defmethod chart-translate-xpos ((c chart
) x
)
264 "Translate in chart C the coordinate X into a screen column."
265 (let ((range (oref (oref c x-axis
) bounds
)))
267 (round (* (float (- x
(car range
)))
268 (/ (float (oref c x-width
))
269 (float (- (cdr range
) (car range
))))))))
272 (cl-defmethod chart-translate-ypos ((c chart
) y
)
273 "Translate in chart C the coordinate Y into a screen row."
274 (let ((range (oref (oref c y-axis
) bounds
)))
277 (round (* (float (- y
(car range
)))
278 (/ (float (oref c y-width
))
279 (float (- (cdr range
) (car range
)))))))))
282 (cl-defmethod chart-axis-draw ((a chart-axis-range
) &optional dir margin zone _start _end
)
283 "Draw axis information based upon a range to be spread along the edge.
284 A is the chart to draw. DIR is the direction.
285 MARGIN, ZONE, START, and END specify restrictions in chart space."
286 (cl-call-next-method)
287 ;; We prefer about 5 spaces between each value
288 (let* ((i (car (oref a bounds
)))
289 (e (cdr (oref a bounds
)))
293 ;; want to jump by units of 5 spaces or so
294 (j (/ rng
(/ (chart-size-in-dir (oref a chart
) dir
) 4)))
296 (if (= j
0) (setq j
1))
300 (format "%dM" (/ i
1000000)))
302 (format "%dK" (/ i
1000)))
305 (if (eq dir
'vertical
)
306 (let ((x (+ (+ margin z
) (if (oref a loweredge
)
308 (if (< x
1) (setq x
1))
309 (chart-goto-xy x
(chart-translate-ypos (oref a chart
) i
)))
310 (chart-goto-xy (chart-translate-xpos (oref a chart
) i
)
311 (+ margin z
(if (oref a loweredge
) -
1 1))))
314 (chart-zap-chars (length s
))
315 (put-text-property p1
(point) 'face
(oref a labels-face
))
319 (cl-defmethod chart-translate-namezone ((c chart
) n
)
320 "Return a dot-pair representing a positional range for a name.
321 The name in chart C of the Nth name resides.
322 Automatically compensates for direction."
323 (let* ((dir (oref c direction
))
324 (w (if (eq dir
'vertical
) (oref c x-width
) (oref c y-width
)))
325 (m (if (eq dir
'vertical
) (oref c y-margin
) (oref c x-margin
)))
327 (oref (if (eq dir
'vertical
) (oref c x-axis
) (oref c y-axis
))
329 (lpn (/ (+ 1.0 (float w
)) (float ns
)))
331 (cons (+ m
(round (* lpn
(float n
))))
332 (+ m -
1 (round (* lpn
(+ 1.0 (float n
))))))
335 (cl-defmethod chart-axis-draw ((a chart-axis-names
) &optional dir margin zone _start _end
)
336 "Draw axis information based upon A range to be spread along the edge.
337 Optional argument DIR is the direction of the chart.
338 Optional arguments MARGIN, ZONE, START and END specify boundaries of the drawing."
339 (cl-call-next-method)
340 ;; We prefer about 5 spaces between each value
349 (setq odd
(= (%
(length s
) 2) 1))
350 (setq r
(chart-translate-namezone (oref a chart
) i
))
351 (if (eq dir
'vertical
)
352 (setq p
(/ (+ (car r
) (cdr r
)) 2))
353 (setq p
(- (+ (car r
) (/ (- (cdr r
) (car r
)) 2))
354 (/ (length (car s
)) 2))))
355 (if (eq dir
'vertical
)
356 (let ((x (+ (+ margin z
) (if (oref a loweredge
)
359 (if (< x
1) (setq x
1))
360 (if (> (length (car s
)) (1- margin
))
361 (setq x
(+ x margin
)))
363 (chart-goto-xy p
(+ (+ margin z
) (if (oref a loweredge
)
368 (chart-zap-chars (length (car s
)))
369 (put-text-property p1
(point) 'face
(oref a labels-face
))
374 (cl-defmethod chart-draw-data ((c chart-bar
))
375 "Display the data available in a bar chart C."
376 (let* ((data (oref c sequences
))
377 (dir (oref c direction
))
378 (odir (if (eq dir
'vertical
) 'horizontal
'vertical
))
381 (if (stringp (car (oref (car data
) data
)))
382 ;; skip string lists...
384 ;; display number lists...
386 (seq (oref (car data
) data
)))
388 (let* ((rng (chart-translate-namezone c i
))
389 (dp (if (eq dir
'vertical
)
390 (chart-translate-ypos c
(car seq
))
391 (chart-translate-xpos c
(car seq
))))
392 (zp (if (eq dir
'vertical
)
393 (chart-translate-ypos c
0)
394 (chart-translate-xpos c
0)))
395 (fc (if chart-face-list
396 (nth (% i
(length chart-face-list
)) chart-face-list
)
401 (chart-draw-line dir
(car rng
) dp zp
)
402 (chart-draw-line dir
(cdr rng
) dp zp
))
403 (chart-draw-line dir
(car rng
) zp
(1+ dp
))
404 (chart-draw-line dir
(cdr rng
) zp
(1+ dp
)))
405 (if (= (car rng
) (cdr rng
)) nil
406 (chart-draw-line odir dp
(1+ (car rng
)) (cdr rng
))
407 (chart-draw-line odir zp
(car rng
) (1+ (cdr rng
))))
409 (chart-deface-rectangle dir rng
(cons dp zp
) fc
)
410 (chart-deface-rectangle dir rng
(cons zp dp
) fc
))
412 ;; find the bounds, and chart it!
413 ;; for now, only do one!
416 (setq data
(cdr data
))))
419 (cl-defmethod chart-add-sequence ((c chart
) &optional seq axis-label
)
420 "Add to chart object C the sequence object SEQ.
421 If AXIS-LABEL, then the axis stored in C is updated with the bounds of SEQ,
422 or is created with the bounds of SEQ."
424 (let ((axis (eieio-oref c axis-label
)))
425 (if (stringp (car (oref seq data
)))
426 (let ((labels (oref seq data
)))
428 (setq axis
(make-instance 'chart-axis-names
429 :name
(oref seq name
)
432 (oset axis items labels
)))
433 (let ((range (cons 0 1))
436 (setq axis
(make-instance 'chart-axis-range
437 :name
(oref seq name
)
440 (if (< x
(car range
)) (setcar range x
))
441 (if (> x
(cdr range
)) (setcdr range x
)))
442 (oset axis bounds range
)))
443 (if (eq axis-label
'x-axis
) (oset axis loweredge nil
))
444 (eieio-oset c axis-label axis
)
446 (oset c sequences
(append (oref c sequences
) (list seq
))))
448 ;;; Charting optimizers
450 (cl-defmethod chart-trim ((c chart
) max
)
451 "Trim all sequences in chart C to be at most MAX elements long."
452 (let ((s (oref c sequences
)))
454 (let ((sl (oref x data
)))
455 (if (> (length sl
) max
)
456 (setcdr (nthcdr (1- max
) sl
) nil
)))))
459 (cl-defmethod chart-sort ((c chart
) pred
)
460 "Sort the data in chart C using predicate PRED.
461 See `chart-sort-matchlist' for more details."
462 (let* ((sl (oref c sequences
))
466 (if (stringp (car (oref s1 data
)))
468 (chart-sort-matchlist s1 s2 pred
)
469 (setq s
(oref s1 data
)))
470 (if (stringp (car (oref s2 data
)))
472 (chart-sort-matchlist s2 s1 pred
)
473 (setq s
(oref s2 data
)))
474 (error "Sorting of chart %s not supported" (eieio-object-name c
))))
475 (if (eq (oref c direction
) 'horizontal
)
476 (oset (oref c y-axis
) items s
)
477 (oset (oref c x-axis
) items s
)
481 (defun chart-sort-matchlist (namelst numlst pred
)
482 "Sort NAMELST and NUMLST (both sequence objects) based on predicate PRED.
483 PRED should be the equivalent of `<', except it must expect two
484 cons cells of the form (NAME . NUM). See `sort' for more details."
485 ;; 1 - create 1 list of cons cells
487 (alst (oref namelst data
))
488 (ulst (oref numlst data
)))
490 ;; this is reversed, but were are sorting anyway
491 (setq newlist
(cons (cons (car alst
) (car ulst
)) newlist
))
492 (setq alst
(cdr alst
)
494 ;; 2 - Run sort routine on it
495 (setq newlist
(sort newlist pred
)
498 ;; 3 - Separate the lists
500 (setq alst
(cons (car (car newlist
)) alst
)
501 ulst
(cons (cdr (car newlist
)) ulst
))
502 (setq newlist
(cdr newlist
)))
503 ;; 4 - Store them back
504 (oset namelst data
(reverse alst
))
505 (oset numlst data
(reverse ulst
))))
509 (defun chart-goto-xy (x y
)
510 "Move cursor to position X Y in buffer, and add spaces and CRs if needed."
511 (let ((indent-tabs-mode nil
)
512 (num (progn (goto-char (point-min)) (forward-line y
))))
513 (if (and (= 0 num
) (/= 0 (current-column))) (newline 1))
514 (if (eobp) (newline num
))
515 (if (< x
0) (setq x
0))
516 (if (< y
0) (setq y
0))
517 ;; Now, a quicky column moveto/forceto method.
518 (or (= (move-to-column x
) x
)
521 (remove-text-properties p
(point) '(face))))))
523 (defun chart-zap-chars (n)
524 "Zap up to N chars without deleting EOLs."
526 (if (< n
(- (point-at-eol) (point)))
528 (delete-region (point) (point-at-eol)))))
530 (defun chart-display-label (label dir zone start end
&optional face
)
531 "Display LABEL in direction DIR in column/row ZONE between START and END.
532 Optional argument FACE is the property we wish to place on this text."
533 (if (eq dir
'horizontal
)
535 (chart-goto-xy (+ start
(- (/ (- end start
) 2) (/ (length label
) 2)))
539 (chart-zap-chars (length label
))
540 (put-text-property p1
(point) 'face face
)
543 (stz (+ start
(- (/ (- end start
) 2) (/ (length label
) 2)))))
544 (while (< i
(length label
))
545 (chart-goto-xy zone
(+ stz i
))
546 (insert (aref label i
))
548 (put-text-property (1- (point)) (point) 'face face
)
551 (defun chart-draw-line (dir zone start end
)
552 "Draw a line using line-drawing characters in direction DIR.
553 Use column or row ZONE between START and END."
555 (make-string (- end start
) (if (eq dir
'vertical
) ?| ?\-
))
558 (defun chart-deface-rectangle (dir r1 r2 face
)
559 "Colorize a rectangle in direction DIR across range R1 by range R2.
560 R1 and R2 are dotted pairs. Colorize it with FACE."
561 (let* ((range1 (if (eq dir
'vertical
) r1 r2
))
562 (range2 (if (eq dir
'vertical
) r2 r1
))
564 (while (<= y
(cdr range2
))
565 (chart-goto-xy (car range1
) y
)
566 (put-text-property (point) (+ (point) (1+ (- (cdr range1
) (car range1
))))
570 ;;; Helpful `I don't want to learn eieio just now' washover functions
572 (defun chart-bar-quickie (dir title namelst nametitle numlst numtitle
573 &optional max sort-pred
)
574 "Wash over the complex EIEIO stuff and create a nice bar chart.
575 Create it going in direction DIR [`horizontal' `vertical'] with TITLE
576 using a name sequence NAMELST labeled NAMETITLE with values NUMLST
579 Set the chart's max element display to MAX, and sort lists with
580 SORT-PRED if desired."
581 (let ((nc (make-instance 'chart-bar
583 :key-label
"8-m" ; This is a text key pic
586 (iv (eq dir
'vertical
)))
587 (chart-add-sequence nc
588 (make-instance 'chart-sequece
591 (if iv
'x-axis
'y-axis
))
592 (chart-add-sequence nc
593 (make-instance 'chart-sequece
596 (if iv
'y-axis
'x-axis
))
597 (if sort-pred
(chart-sort nc sort-pred
))
598 (if (integerp max
) (chart-trim nc max
))
599 (switch-to-buffer (chart-new-buffer nc
))
604 (defun chart-test-it-all ()
605 "Test out various charting features."
607 (chart-bar-quickie 'vertical
"Test Bar Chart"
608 '( "U1" "ME2" "C3" "B4" "QT" "EZ") "Items"
609 '( 5 -
10 23 20 30 -
3) "Values")
612 ;;; Sample utility function
614 (defun chart-file-count (dir)
615 "Draw a chart displaying the number of different file extensions in DIR."
616 (interactive "DDirectory: ")
617 (message "Collecting statistics...")
618 (let ((flst (directory-files dir nil nil t
))
619 (extlst (list "<dir>"))
622 (let* ((x (file-name-extension f
))
623 (s (if (file-accessible-directory-p (expand-file-name f dir
))
625 (m (member s extlst
)))
628 (cl-incf (car (nthcdr (- (length extlst
) (length m
)) cntlst
)))
629 (setq extlst
(cons s extlst
)
630 cntlst
(cons 1 cntlst
))))))
631 ;; Let's create the chart!
632 (chart-bar-quickie 'vertical
"Files Extension Distribution"
633 extlst
"File Extensions"
634 cntlst
"# of occurrences"
636 (lambda (a b
) (> (cdr a
) (cdr b
))))
639 (defun chart-space-usage (d)
640 "Display a top usage chart for directory D."
641 (interactive "DDirectory: ")
642 (message "Collecting statistics...")
645 (b (get-buffer-create " *du-tmp*")))
648 (insert "cd " d
";du -sk * \n")
649 (message "Running `cd %s;du -sk *'..." d
)
650 (call-process-region (point-min) (point-max) shell-file-name t
651 (current-buffer) nil
)
652 (goto-char (point-min))
653 (message "Scanning output ...")
654 (while (re-search-forward "^\\([0-9]+\\)[ \t]+\\([^ \n]+\\)$" nil t
)
655 (let* ((nam (buffer-substring (match-beginning 2) (match-end 2)))
656 (num (buffer-substring (match-beginning 1) (match-end 1))))
657 (setq nmlst
(cons nam nmlst
)
658 ;; * 1000 to put it into bytes
659 cntlst
(cons (* (string-to-number num
) 1000) cntlst
))))
661 (error "No files found!"))
662 (chart-bar-quickie 'vertical
(format "Largest files in %s" d
)
666 (lambda (a b
) (> (cdr a
) (cdr b
))))
669 (defun chart-emacs-storage ()
670 "Chart the current storage requirements of Emacs."
672 (let* ((data (garbage-collect)))
673 ;; Let's create the chart!
674 (chart-bar-quickie 'vertical
"Emacs Runtime Storage Usage"
675 (mapcar (lambda (x) (symbol-name (car x
))) data
)
677 (mapcar (lambda (x) (* (nth 1 x
) (nth 2 x
)))
681 (defun chart-emacs-lists ()
682 "Chart out the size of various important lists."
684 (let* ((names '("buffers" "frames" "processes" "faces"))
685 (nums (list (length (buffer-list))
686 (length (frame-list))
687 (length (process-list))
690 (if (fboundp 'x-display-list
)
691 (setq names
(append names
'("x-displays"))
692 nums
(append nums
(list (length (x-display-list))))))
693 ;; Let's create the chart!
694 (chart-bar-quickie 'vertical
"Emacs List Size Chart"
695 names
"Various Lists"
698 (defun chart-rmail-from ()
699 "If we are in an rmail summary buffer, then chart out the froms."
701 (if (not (eq major-mode
'rmail-summary-mode
))
702 (error "You must invoke chart-rmail-from in an rmail summary buffer"))
706 (goto-char (point-min))
707 (while (re-search-forward "\\-[A-Z][a-z][a-z] +\\(\\w+\\)@\\w+" nil t
)
708 (let* ((nam (buffer-substring (match-beginning 1) (match-end 1)))
709 (m (member nam nmlst
)))
710 (message "Scanned username %s" nam
)
712 (let ((cell (nthcdr (- (length nmlst
) (length m
)) cntlst
)))
713 (setcar cell
(1+ (car cell
))))
714 (setq nmlst
(cons nam nmlst
)
715 cntlst
(cons 1 cntlst
))))))
716 (chart-bar-quickie 'vertical
"Username Occurrence in RMAIL box"
718 cntlst
"# of occurrences"
720 (lambda (a b
) (> (cdr a
) (cdr b
))))
726 ;;; chart.el ends here