Portability | portable |
---|---|
Stability | provisional |
Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
Safe Haskell | None |
Compatability module to replace Graphics.Plot of the hmatrix
module
Provides all functions from hmatrix's Graphics.Plot as well as
those functions appended with H
which return a PlotHandle
for
interactive update.
- mplot :: [Vector Double] -> IO ()
- mplotH :: [Vector Double] -> IO PlotHandle
- plot :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO ()
- plotH :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO PlotHandle
- parametricPlot :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO ()
- parametricPlotH :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO PlotHandle
- imshow :: Matrix Double -> IO ()
- greyscaleH :: Matrix Double -> IO PlotHandle
- meshdom :: Vector Double -> Vector Double -> (Matrix Double, Matrix Double)
- matrixToPGM :: Matrix Double -> String
- splot :: (Matrix Double -> Matrix Double -> Matrix Double) -> (Double, Double) -> (Double, Double) -> Int -> IO ()
- mesh :: Matrix Double -> IO ()
Plotting functions
plot :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO ()Source
Draws a list of functions over a desired range and with a desired number of points
> plot [sin, cos, sin.(3*)] (0,2*pi) 1000
plotH :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO PlotHandleSource
Draws a list of functions over a desired range and with a desired number of points
> plot [sin, cos, sin.(3*)] (0,2*pi) 1000
parametricPlot :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO ()Source
Draws a parametric curve. For instance, to draw a spiral we can do something like:
> parametricPlot (\t->(t * sin t, t * cos t)) (0,10*pi) 1000
parametricPlotH :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO PlotHandleSource
Draws a parametric curve. For instance, to draw a spiral we can do something like:
> parametricPlot (\t->(t * sin t, t * cos t)) (0,10*pi) 1000
imshow :: Matrix Double -> IO ()Source
imshow shows a representation of a matrix as a gray level image.
greyscaleH :: Matrix Double -> IO PlotHandleSource
greyscaleH shows a representation of a matrix as a gray level image.
meshdom :: Vector Double -> Vector Double -> (Matrix Double, Matrix Double)Source
From vectors x and y, it generates a pair of matrices to be used as x and y arguments for matrix functions.
Compatability
matrixToPGM :: Matrix Double -> StringSource
writes a matrix to pgm image file