Created
September 17, 2015 23:29
-
-
Save erantapaa/b1ae84ca0d9ab32d444e to your computer and use it in GitHub Desktop.
using Graphics.Gnuplot.Simple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lib | |
where | |
import Graphics.Gnuplot.Simple | |
import qualified Graphics.Gnuplot.Terminal.SVG as SVG | |
foo = do | |
let zs = [ (x,x) | x <- [1..10] ] | |
plotList [Key Nothing | |
,YRange (0,maximum (map snd zs) + 1) | |
,XLabel "Days since launch of Hackage" | |
,YLabel "Unique uploads each day" | |
,Title "Daily uploads (180 day moving average) to http://hackage.haskell.org" | |
-- ,SVG "/tmp/hackage-daily-graph.svg" | |
,Custom "grid" [] | |
, terminal (SVG.cons "/tmp/output.svg") | |
-- ,Custom "terminal svg;set output \"/tmp/hackage-daily-graph.svg\""[] | |
,Custom "style line" ["3","lc","3","lw","3"] | |
] (map snd zs) | |
putStrLn "here" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment