summaryrefslogtreecommitdiff
path: root/lib/Graphics
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Graphics')
-rw-r--r--lib/Graphics/Plot.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Graphics/Plot.hs b/lib/Graphics/Plot.hs
index 9b64a1d..e6a9098 100644
--- a/lib/Graphics/Plot.hs
+++ b/lib/Graphics/Plot.hs
@@ -40,8 +40,8 @@ size = dim
40--fromFile filename = readFile filename >>= return . readMatrix read 40--fromFile filename = readFile filename >>= return . readMatrix read
41 41
42-- | Saves a real matrix to a formatted ascii text file 42-- | Saves a real matrix to a formatted ascii text file
43toFile :: FilePath -> Matrix Double -> IO () 43toFile' :: FilePath -> Matrix Double -> IO ()
44toFile filename matrix = writeFile filename (unlines . map unwords. map (map show) . toLists $ matrix) 44toFile' filename matrix = writeFile filename (unlines . map unwords. map (map show) . toLists $ matrix)
45 45
46------------------------------------------------------------------------ 46------------------------------------------------------------------------
47 47
@@ -74,7 +74,7 @@ mesh m = gnuplotX (command++dat) where
74mesh' :: Matrix Double -> IO () 74mesh' :: Matrix Double -> IO ()
75mesh' m = do 75mesh' m = do
76 writeFile "splot-gnu-command" "splot \"splot-tmp.txt\" matrix with lines; pause -1"; 76 writeFile "splot-gnu-command" "splot \"splot-tmp.txt\" matrix with lines; pause -1";
77 toFile "splot-tmp.txt" m 77 toFile' "splot-tmp.txt" m
78 putStr "Press [Return] to close the graphic and continue... " 78 putStr "Press [Return] to close the graphic and continue... "
79 system "gnuplot -persist splot-gnu-command" 79 system "gnuplot -persist splot-gnu-command"
80 system "rm splot-tmp.txt splot-gnu-command" 80 system "rm splot-tmp.txt splot-gnu-command"