Steffen Dienst committed 746b498

[fix] do not bail out if there are no plots to combine

  • Participants
  • Parent commits b6d62db

Comments (0)

Files changed (1)

File src/chart_utils/jfreechart.clj

 (defn combined-domain-plot 
   "Combine several XYPlots into one plot with a common domain axis (all charts in one column)."
   [& plots]
-  (let [axis (.getDomainAxis (first plots) )
+  (let [axis (if plots (.getDomainAxis (first plots)) (org.jfree.chart.axis.NumberAxis. ""))
         combined-plot (org.jfree.chart.plot.CombinedDomainXYPlot. axis)]
     (doseq [p plots] (.add combined-plot p))