CLOT (clot-20150207T211923.tbz) is a simple library to plot data sets in charts of different types. Currently it supports bar, histogram, line, and pie charts, all with some optional graphic decorations. It requires SCLF and CL-GD.
Here are some examples:
The above images have been produced with the following code:
(be multi-data '(("Milano" "red" 0 2.3 3.2 14 5) ("Bonn" "green" 5 13 7.5 5 0) ("Birmingham" "blue" 0.9 2.2 3.1 0 2.5)) simple-data '(("beer" "green" 200) ("soda" "red" 20) ("juice" "yellow" 40) ("whiskey" "brown" 6) ("water" "blue" 450)) months '("January" "February" "March" "April" "May") tage '("Montag" "Diensttag" "Mittwoch" "Donnerstag" "Freitag") (defun make-samples () (flet ((write-file (name) (write-image-to-file (make-pathname :defaults clot-system:*base-directory* :name name :type "png") :if-exists :supersede))) (with-image* (640 480) (fill-image 0 0 :color *default-background-colour*) (plot-line-chart multi-data) (write-file "line-chart")) (with-image* (640 480) (fill-image 0 0 :color *default-background-colour*) (plot-bar-chart multi-data :bar-width 1.5 :hgrid t) (write-file "bar-chart")) (with-image* (520 520) (fill-image 0 0 :color *default-background-colour*) (plot-pie-chart simple-data :shaded t) (write-file "pie-chart")) (with-image* (640 480) (fill-image 0 0 :color *default-background-colour*) (plot-histogram-chart multi-data :x-axis-labels months :hgrid t :shaded t) (write-file "histogram-chart")) (with-image* (640 480) (fill-image 0 0 :color *default-background-colour*) (plot-bar-chart multi-data :x-axis-labels months :bar-width .8 :vgrid t) (write-file "scattered-bar-chart")) (with-image* (1024 768) (fill-image 0 0 :color *default-background-colour*) (with-subimage (0 0 (/ (image-width) 2) (/ (image-height) 2)) (plot-line-chart multi-data :bullets t :hgrid t)) (with-subimage (0 (/ (image-height) 2) (/ (image-width) 2) (image-height)) (plot-histogram-chart multi-data :x-axis-labels months :hgrid t)) (with-subimage ((/ (image-width) 2) 0 (image-width) (/ (image-height) 2)) (plot-bar-chart multi-data :bar-width 1.3 :x-axis-labels tage :hgrid t)) (with-subimage ((/ (image-width) 2) (/ (image-height) 2) (image-width) (image-height)) (plot-pie-chart simple-data :shaded t)) (write-file "mixed-chart"))) (values))