Skip to content

Instantly share code, notes, and snippets.

@erantapaa
Created September 17, 2015 23:29
Show Gist options
  • Save erantapaa/b1ae84ca0d9ab32d444e to your computer and use it in GitHub Desktop.
Save erantapaa/b1ae84ca0d9ab32d444e to your computer and use it in GitHub Desktop.
using Graphics.Gnuplot.Simple
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