 (defn draw-frame [ ctx w h ]
   (with-preserved-ctx ctx
     (set-stroke-style ctx :frame)
-    (draw-line ctx [ 0.5 0.5 ] [ 0.5 (- h 0.5) ] )))
+    (draw-line ctx 0.5 0.5 0.5 (- h 0.5))))
 
 (defn draw [ ctx w h data begin-t end-t ]
   (draw-series-background ctx w h)

(defn first-that [ pred? xs ]
  (first (filter pred? xs)))

(defn draw-line [ ctx [ x-1 y-1 ] [ x-2 y-2 ] ]
  (.beginPath ctx)
  (.moveTo ctx x-1 y-1)
  (.lineTo ctx x-2 y-2)

  (with-preserved-ctx ctx
    (draw-xlabel ctx (format-xlabel value) x h)
    (set-stroke-style ctx :grid)
    (draw-line ctx x 0 x h)))

(defn find-x-grid-interval [ w x-range ]
  (let [magnitude (range-magnitude x-range)
