   "When the label range is centered on the data range"
   [d-min d-max span]
   (let [d-range (- d-max d-min)]
-    (if (> span d-range)
-      (- 1 (sq (/ (- span d-range)
-                  (* 0.2 d-range))))
-      1)))
+      (if (> span d-range)
+        (- 1 (sq (/ (- span d-range)
+                    (* 0.2 d-range))))
+        1)))
 
 
 (defn density

  "Balance the relative merits of different metrics"
  [[simplicity coverage density legibility]]
  (let [w [0.2 0.25 0.5 0.05]]
    (+ (* simplicity (w 0))
       (* coverage (w 1))
       (* density (w 2))
       (* legibility (w 3)))))




  "Objective function modeling niceness of step sizes and whether a range includes zero"
  [q j label-range-contains-zero]
  (let [v (if label-range-contains-zero 1 0)]
      (if (<= (count Q) 1)
        (+ (- 1 j) v)
        (+ (- 1 (/ (index-of q Q) (dec (count Q))) j)
           v))))

(defn max-simplicity [q j] (simplicity q j true))

