anchor.diff:                  (line-to (tx x) (- (ty maxy) 3))
                   (stroke))))
           
  -
         ;; draw ticks along y axis
         (loop for y in (thin 10 (integers-between miny maxy))
              do (progn
  
positive.code:   (remove-if #'(lambda (n) (or (< n x) (> n y))) 
               (loop for i from (floor x) to (ceiling y) by 0.5 collect i)))
  
  (defun thin (n l)
    (loop for i from 0 to (1- (length l)) by (ceiling (/ (length l) n)) collect (nth i l)))
  
  (defun plot2d (funcs &key (x-axis (list -2 2)) (aspect 1.0) (samples 100) (background (list 0.2 0.2 0.2)) (palette '((1.0 0.2 0.2) (0.2 1.0 0.2) (0.2 0.2 1.0))))
    (let* ((funcs (if (listp funcs) funcs (list funcs)))
           (colors (loop for x in funcs appending (loop for y in palette collect y)))
           (dx (- (second x-axis) (first x-axis)))
  
negative.code:                       *width*)))
             (ty (y)
               (- height (+ by (* ry (/ (- y miny) (- maxy miny))
                        height))))
             (max-extents (l)
               (let ((cnv (mapcar #'(lambda (x) (multiple-value-list (text-extents x))) l)))
                 (loop for i from 0 to 3 collect
                      (loop for x in cnv maximizing (nth i x) into z finally (return z))))))
                    
        (setf *context* (create-context surface))
        (destroy surface)
        (apply #'set-source-rgb background)
  