Commits

Bryan O'Sullivan committed e33ec5d

Add PNG output support.

  • Participants
  • Parent commits 53e8537

Comments (0)

Files changed (1)

Criterion/Plot.hs

 plotTiming Window desc times =
   renderableToWindow (renderTiming desc times) 800 600
 
+plotTiming PNG desc times =
+  renderableToPNGFile (renderTiming desc times) 800 600
+                      (manglePath "png" $ desc ++ " timings")
+
 plotTiming CSV desc times = do
   writeTo (manglePath "csv" desc) $ \h -> do
     putLn h (escapeCSV "sample" ++ ',' : escapeCSV "execution time")
 plotKDE Window desc points pdf =
     renderableToWindow (renderKDE desc points pdf) 800 600
 
+plotKDE PNG desc points pdf =
+  renderableToPNGFile (renderKDE desc points pdf) 800 600
+                      (manglePath "png" $ desc ++ " densities")
+
 plotKDE dest _desc _points _pdf = do
   printError "plotKDE %s: not yet implemented\n" (show dest)