Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Vec2 = Point'
- type Transform a = Iso a Constant
- axisGen :: Monad m => Point -> Point -> Anchor -> [(Constant, lab)] -> Diagram lab m [Box]
- scale :: forall b. Field b => b -> b -> Iso b b
- mkSteps :: Transform a -> ShowFct lab a -> [a] -> [(Constant, lab)]
- hAxis :: Monad m => Box -> [(Constant, lab)] -> Diagram lab m [Box]
- vAxis :: Monad m => Box -> [(Constant, lab)] -> Diagram lab m [Box]
- axes :: Monad m => Box -> Vec2 [(Constant, lab)] -> Diagram lab m [Box]
- lint :: Constant -> Expr -> Expr -> Expr
- scatterPlot :: Monad m => PlotCanvas a -> [Vec2 a] -> Diagram lab m ()
- interpBox :: Object -> Point' Constant -> Point' Expr
- functionPlot :: Monad m => Show a => PlotCanvas a -> Int -> (a -> a) -> Diagram lab m ()
- data Iso a b = Iso {}
- after :: Iso b c -> Iso a b -> Iso a c
- axisMarks :: a -> a -> Iso a Constant -> (a, [a], a)
- logAxis :: Constant -> Transform Constant
- simplLinAxis :: Constant -> Transform Constant
- type ShowFct lab a = a -> lab
- mkAxes :: Vec2 (Transform a) -> Vec2 a -> Vec2 a -> (Vec2 [a], Vec2 (Transform a))
- type PlotCanvas a = (Box, Box, Vec2 (Transform a))
- preparePlot :: Monad m => Vec2 (ShowFct lab a) -> Vec2 (Transform a) -> Vec2 a -> Vec2 a -> Diagram lab m (PlotCanvas a)
- simplePlot :: (Ord a, Monad m) => Vec2 (ShowFct lab a) -> Vec2 (Transform a) -> [Vec2 a] -> Diagram lab m (PlotCanvas a)
Documentation
axisGen :: Monad m => Point -> Point -> Anchor -> [(Constant, lab)] -> Diagram lab m [Box] Source #
Generic axis rendering. axisGen origin target anchor labels
traces an axis from origin to target, attaching the labels at
anchor.
scale :: forall b. Field b => b -> b -> Iso b b Source #
scale minx maxx
maps the interval [minx,maxx] to [0,1]
hAxis :: Monad m => Box -> [(Constant, lab)] -> Diagram lab m [Box] Source #
render an horizontal axis on the given box
vAxis :: Monad m => Box -> [(Constant, lab)] -> Diagram lab m [Box] Source #
render a vertical axis on the given box
axes :: Monad m => Box -> Vec2 [(Constant, lab)] -> Diagram lab m [Box] Source #
Draw axes. Coordinates in the [0,1] fit the box.
lint :: Constant -> Expr -> Expr -> Expr Source #
Multiply the vector (origin --> target) by p. (Linear interpolation)
scatterPlot :: Monad m => PlotCanvas a -> [Vec2 a] -> Diagram lab m () Source #
Draw a scatterplot in the given box. Input data in the [0,1] interval fits the box.
functionPlot :: Monad m => Show a => PlotCanvas a -> Int -> (a -> a) -> Diagram lab m () Source #
functionPlot c n f
.
Plot the function f
on the canvas c
, using n
steps (precision).