plots-0.1.0.0: Diagrams based plotting library.

Safe HaskellNone
LanguageHaskell2010

Plots.Types.Function

Contents

Synopsis

Function plot options

data FunctionPlotOptions n #

Instances

Default (FunctionPlotOptions n) # 

functionPlotNumPoints :: HasFunctionPlotOptions c n => Lens' c Int #

Parametric plot

data ParametricPlot v n #

Instances

(Metric v, OrderedField n, Enum n) => Enveloped (ParametricPlot v n) # 
(TypeableFloat n, Enum n, Renderable (Path V2 n) b) => Plotable (ParametricPlot V2 n) b # 
type V (ParametricPlot v n) # 
type V (ParametricPlot v n) = v
type N (ParametricPlot v n) # 
type N (ParametricPlot v n) = n

mkParametricPlot :: (PointLike v n p, TypeableFloat n) => (n -> p) -> ParametricPlot v n #

Create a parametric plot given a function on range (0,5).

parametricDomain :: forall v n. Lens' (ParametricPlot v n) (n, n) #

mkParametricRangePlot :: PointLike v n p => (n -> p) -> (n, n) -> ParametricPlot v n #

Create a parametric plot given a function and a range.

Create line

createABLine :: Num n => n -> n -> n -> P2 n #

Functions to create ab, vertical and horizontal lines.

createHLine :: n -> n -> P2 n #

createVLine :: n -> n -> P2 n #

Vector plot

data VectorPlot v n #

Constructors

VectorPlot 

Fields

Instances

(Metric v, OrderedField n) => Enveloped (VectorPlot v n) # 

Methods

getEnvelope :: VectorPlot v n -> Envelope (V (VectorPlot v n)) (N (VectorPlot v n)) #

(TypeableFloat n, Renderable (Path V2 n) b) => Plotable (VectorPlot V2 n) b # 

Methods

renderPlotable :: InSpace v n (VectorPlot V2 n) => AxisSpec v n -> PlotStyle b v n -> VectorPlot V2 n -> QDiagram b v n Any #

defLegendPic :: InSpace v n (VectorPlot V2 n) => PlotStyle b v n -> VectorPlot V2 n -> QDiagram b v n Any #

type V (VectorPlot v n) # 
type V (VectorPlot v n) = v
type N (VectorPlot v n) # 
type N (VectorPlot v n) = n

mkVectorPlot :: TypeableFloat n => v n -> VectorPlot v n #

Plot a given vector at (0,0).

mkVectorPointPlot :: TypeableFloat n => v n -> (n, n) -> VectorPlot v n #

Plot a given vector at a given point.

Vector plot lenses

setArrowOpts :: HasVector a v n => Lens' a (ArrowOpts n) #

Parametric plot

parametricPlot :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b, TypeableFloat n) => (n -> p) -> State (Plot (ParametricPlot v n) b) () -> m () #

parametricRangePlot :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b) => (n -> p) -> (n, n) -> State (Plot (ParametricPlot v n) b) () -> m () #

parametricPlot' :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b, TypeableFloat n) => (n -> p) -> m () #

parametricRangePlot' :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b) => (n -> p) -> (n, n) -> m () #

Line functions

abLinePlot :: (v ~ BaseSpace c, PointLike v n (P2 n), MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b, Additive v, TypeableFloat n) => n -> n -> (n, n) -> State (Plot (ParametricPlot v n) b) () -> m () #

hLinePlot :: (v ~ BaseSpace c, PointLike v n (P2 n), MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b, Additive v, TypeableFloat n) => n -> (n, n) -> State (Plot (ParametricPlot v n) b) () -> m () #

vLinePlot :: (v ~ BaseSpace c, PointLike v n (P2 n), MonadState (Axis b c n) m, Plotable (ParametricPlot v n) b, Additive v, TypeableFloat n) => n -> (n, n) -> State (Plot (ParametricPlot v n) b) () -> m () #

Vectors

vectorPlot :: (v ~ BaseSpace c, MonadState (Axis b c n) m, Plotable (VectorPlot v n) b, TypeableFloat n) => v n -> State (Plot (VectorPlot v n) b) () -> m () #

vectorPointPlot :: (v ~ BaseSpace c, MonadState (Axis b c n) m, Plotable (VectorPlot v n) b, TypeableFloat n) => v n -> (n, n) -> State (Plot (VectorPlot v n) b) () -> m () #

vectorPointPlot' :: (v ~ BaseSpace c, MonadState (Axis b c n) m, Plotable (VectorPlot v n) b, TypeableFloat n) => v n -> (n, n) -> m () #

vectorPointPlot'' :: (v ~ BaseSpace c, MonadState (Axis b c n) m, Plotable (VectorPlot v n) b, TypeableFloat n) => v n -> (n, n) -> ArrowOpts n -> m () #

vectorFieldPlot :: (v ~ BaseSpace c, MonadState (Axis b c n) m, Plotable (VectorPlot v n) b, TypeableFloat n) => [v n] -> [(n, n)] -> ArrowOpts n -> m () #