From 5db2ed78986bbc737b82e428392ee63999c8abfd Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 17 Jun 2009 20:52:14 +0000 Subject: vector fread/fwrite, fscanf/fprinf --- lib/Graphics/Plot.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Graphics') 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 --fromFile filename = readFile filename >>= return . readMatrix read -- | Saves a real matrix to a formatted ascii text file -toFile :: FilePath -> Matrix Double -> IO () -toFile filename matrix = writeFile filename (unlines . map unwords. map (map show) . toLists $ matrix) +toFile' :: FilePath -> Matrix Double -> IO () +toFile' filename matrix = writeFile filename (unlines . map unwords. map (map show) . toLists $ matrix) ------------------------------------------------------------------------ @@ -74,7 +74,7 @@ mesh m = gnuplotX (command++dat) where mesh' :: Matrix Double -> IO () mesh' m = do writeFile "splot-gnu-command" "splot \"splot-tmp.txt\" matrix with lines; pause -1"; - toFile "splot-tmp.txt" m + toFile' "splot-tmp.txt" m putStr "Press [Return] to close the graphic and continue... " system "gnuplot -persist splot-gnu-command" system "rm splot-tmp.txt splot-gnu-command" -- cgit v1.2.3