Created
January 18, 2015 22:36
-
-
Save matthewpalmer/021ce6a0e715474bff70 to your computer and use it in GitHub Desktop.
This file contains 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 Plot (Plot.plot) | |
where | |
import Graphics.Rendering.Chart.Easy | |
import Graphics.Rendering.Chart.Backend.Cairo | |
import Data.Complex | |
import Spectrum | |
-- An artificial max to make sure all graphs are the same height | |
maxHeight = 25000 | |
dummyList :: [(Double, Double)] | |
dummyList = [(0, maxHeight)] | |
plot :: [(Double, Double)] -> String -> FilePath -> IO() | |
plot input title filePath = do | |
toFile def filePath $ do | |
layout_title .= title | |
Graphics.Rendering.Chart.Easy.plot (line "magnitude" [input]) | |
--Graphics.Rendering.Chart.Easy.plot (points "points" input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment