-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | GTK3 plots and interaction with GHCi
--   
--   Allows use of <a>plot</a> package with GTK3
--   
--   <ul>
--   <li>Provides a mechanism to display and update plots from GHCi</li>
--   </ul>
@package plot-gtk3
@version 0.1.0.2


-- | A <a>DrawingArea</a> widget that displays <a>Figure</a>s
module Graphics.UI.Gtk.Plot
type FigureHandle = MVar FigureState

-- | create a new <a>Figure</a> plot click on the window to save
plotNew :: FigureHandle -> IO DrawingArea

-- | the figure attribute
figure :: Attr DrawingArea FigureState


-- | Enables the display of <a>Figure</a>s interactively through GHCi
module Graphics.Rendering.Plot.Gtk
data PlotHandle

-- | create a new figure and display the plot click on the window to save
display :: Figure () -> IO PlotHandle

-- | close a plot
destroy :: PlotHandle -> IO ()

-- | perform some actions on the supplied <a>PlotHandle</a>
withPlotHandle :: PlotHandle -> Figure () -> IO ()

-- | write the <a>Figure</a> to disk
writePlotHandle :: PlotHandle -> OutputType -> FilePath -> (Int, Int) -> IO ()


-- | Compatability module to replace <a>Graphics.Plot</a> of the
--   <tt>hmatrix</tt> module
--   
--   Provides all functions from hmatrix's <a>Graphics.Plot</a> as well as
--   those functions appended with <tt>H</tt> which return a
--   <a>PlotHandle</a> for interactive update.
module Graphics.Rendering.Plot.HMatrix

-- | plot several vectors against the first
mplot :: [Vector Double] -> IO ()

-- | plot several vectors against the first
mplotH :: [Vector Double] -> IO PlotHandle

-- | Draws a list of functions over a desired range and with a desired
--   number of points
--   
--   <pre>
--   &gt; plot [sin, cos, sin.(3*)] (0,2*pi) 1000
--   </pre>
plot :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO ()

-- | Draws a list of functions over a desired range and with a desired
--   number of points
--   
--   <pre>
--   &gt; plot [sin, cos, sin.(3*)] (0,2*pi) 1000
--   </pre>
plotH :: [Vector Double -> Vector Double] -> (Double, Double) -> Int -> IO PlotHandle

-- | Draws a parametric curve. For instance, to draw a spiral we can do
--   something like:
--   
--   <pre>
--   &gt; parametricPlot (\t-&gt;(t * sin t, t * cos t)) (0,10*pi) 1000
--   </pre>
parametricPlot :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO ()

-- | Draws a parametric curve. For instance, to draw a spiral we can do
--   something like:
--   
--   <pre>
--   &gt; parametricPlot (\t-&gt;(t * sin t, t * cos t)) (0,10*pi) 1000
--   </pre>
parametricPlotH :: (Vector Double -> (Vector Double, Vector Double)) -> (Double, Double) -> Int -> IO PlotHandle

-- | imshow shows a representation of a matrix as a gray level image.
imshow :: Matrix Double -> IO ()

-- | greyscaleH shows a representation of a matrix as a gray level image.
greyscaleH :: Matrix Double -> IO PlotHandle

-- | From vectors x and y, it generates a pair of matrices to be used as x
--   and y arguments for matrix functions.
meshdom :: Vector Double -> Vector Double -> (Matrix Double, Matrix Double)

-- | writes a matrix to pgm image file
matrixToPGM :: Matrix Double -> String

-- | Draws the surface represented by the function f in the desired ranges
--   and number of points, internally using <a>mesh</a>.
--   
--   <pre>
--   &gt; let f x y = cos (x + y) 
--   &gt; splot f (0,pi) (0,2*pi) 50    
--   </pre>
splot :: (Matrix Double -> Matrix Double -> Matrix Double) -> (Double, Double) -> (Double, Double) -> Int -> IO ()

-- | Draws a 3D surface representation of a real matrix.
--   
--   <pre>
--   &gt; mesh (hilb 20)
--   </pre>
--   
--   In certain versions you can interactively rotate the graphic using the
--   mouse.
mesh :: Matrix Double -> IO ()
