summaryrefslogtreecommitdiff
path: root/lib/Graphics/Plot.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Graphics/Plot.hs')
-rw-r--r--lib/Graphics/Plot.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Graphics/Plot.hs b/lib/Graphics/Plot.hs
index 2dc0553..478b4ad 100644
--- a/lib/Graphics/Plot.hs
+++ b/lib/Graphics/Plot.hs
@@ -150,8 +150,8 @@ matrixToPGM m = header ++ unlines (map unwords ll) where
150 r = rows m 150 r = rows m
151 header = "P2 "++show c++" "++show r++" "++show (round maxgray :: Int)++"\n" 151 header = "P2 "++show c++" "++show r++" "++show (round maxgray :: Int)++"\n"
152 maxgray = 255.0 152 maxgray = 255.0
153 maxval = vectorMax $ flatten $ m 153 maxval = maxElement m
154 minval = vectorMin $ flatten $ m 154 minval = minElement m
155 scale' = if (maxval == minval) 155 scale' = if (maxval == minval)
156 then 0.0 156 then 0.0
157 else maxgray / (maxval - minval) 157 else maxgray / (maxval - minval)