 
 (defn make-chart [ds algs field & [more-chart-opts derive pdf-file]]
   (util/assert-is (empty? (remove ds algs)))
-  (let [sks (map alg-title algs)]
+  (let [sks (map alg-title algs)
+        c   (-> ds first second first count)]
+    (println "Medians of" c)
     (-> (smart-results->dataset
          (select-keys ds algs)
          (or derive
              (if (= field :secs)
-               (derive-median :secs :ms #(/ % 1000))
-               (derive-median field field))))
+               (derive-median c :secs :ms #(/ % 1000))
+               (derive-median c field field))))
         (datasets/ds->chart
          [:alg] :size field
          (merge chart-opts more-chart-opts)

    :dash-astar-nods     [da 18 "DAxH-A*"]

    :dash-astar-sh       [da 21 "DASH-A*-sh"] 
    :dash-astar-sh-hoc   [da 22 "DASH-A*-sh-hoc"]
    :dash-astar-sh-nos   [da 23 "DAcH-A*-sh"]
    :dash-astar-sh-nods  [da 24 "DAxH-A*-sh"]

    }))


          (concat (apply clojure.set/intersection (map set size-results))
                  comb))))

(defn derive-median [c target-field source-field & [mapper]]
  (fn [s]
    (when-let [r (median-of c (map (if mapper (comp mapper source-field) source-field)
                                   (filter :ms s)))]
      {target-field r})))

