         range (:range (meta scale))
         tiks (apply ticks/ticks domain)]
     [:g
-     [:line {:x1    0 :x2 0 :y1 (scale (first domain)) :y2 (scale (second domain))
-             :style (str "stroke:" color "; stroke-width:1;")}]
-     [:line {:stroke color :x2 -6 :y1 0.5 :y2 0.5}]
-     [:g {:transform (translate 0 (scale (second domain)))}
-      [:line {:stroke color :x2 -6 :y1 0.5 :y2 0.5}]]
+     [:path {:stroke color
+             :stroke-width "1"
+             :fill "none"
+             :d (str "M-6," (apply max range) ".5 H0.5 V0.5 H-6")}]
      (map (fn [d] [:g {:transform (translate 0 (scale d))}
                    [:line {:stroke color :x2 -6 :y1 0.5 :y2 0.5}]
                    [:text {:x           -9

   ;[:circle {:cx 0 :cy (+ (:top margin) (:bottom margin) height) :r 50 :fill "yellow" :stroke "black"}]
   [:g {:transform (translate (:left margin) (:top margin))}
    (left-y-axis y)
    #_[:g {:transform (translate width 0)} (right-y-axis y)]
    ;[:rect {:x 0 :y 0 :width width :height height :fill "none" :stroke "black"}]
    ;[:circle {:cx 50 :cy 100 :r 10 :fill "yellow" :stroke "black"}]
    ;[:circle {:cx (x 25) :cy (y 25) :r 25 :fill "yellow" :stroke-width 5 :stroke "black"}]

(defn translate [x y]
  (str "translate(" x "," y ")"))

(defn export-to-file [filename t]
  (let [s (hiccup.core/html t)]
    (spit filename s)))

(defn render
  ([filename t]
   (export-to-file filename t)
   (render t))
  ([t]
   (let [body [:body (style
                       :margin "0 !important"
                       :padding "0 !important"
                       :overflow-x "hidden"
                       :overflow-y "hidden")]
         attrs (second t)
         width (:width attrs)
         height (:height attrs)
         s (hiccup.core/html (conj body t))]
     (Platform/runLater (fn [] (.setPrefHeight @webview height)))
     (Platform/runLater (fn [] (.setPrefWidth @webview width)))
     (render-string s)
     (wait-for-worker)
     (Platform/runLater (fn [] (.sizeToScene @stage)))
     (Platform/runLater (fn [] (.show @stage)))
     s)))

(defn render-to-file [filename t]
  (let [ll (CountDownLatch. 1)
