plots-0.1.0.2: Diagrams based plotting library.

Copyright(C) 2016 Christopher Chalmers
LicenseBSD-style (see the file LICENSE)
MaintainerChristopher Chalmers
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Plots.Axis.Render

Contents

Description

Low level module containing functions for rendering different types of axis.

Synopsis

Rendering axes

class RenderAxis b v n where Source #

Renderable axes.

Minimal complete definition

renderAxis

Methods

renderAxis :: Axis b v n -> QDiagram b (BaseSpace v) n Any Source #

Render an axis to a diagram. The size of the diagram is determined by the axisSize.

Instances

(TypeableFloat n, Renderable (Path V2 n) b) => RenderAxis b Polar n Source # 
(TypeableFloat n, Renderable (Path V2 n) b) => RenderAxis b V2 n Source #

The RenderAxis class provides a default way to render an axis for each space.

Methods

renderAxis :: Axis b V2 n -> QDiagram b (BaseSpace V2) n Any Source #

r2AxisMain :: (Parseable (MainOpts (QDiagram b V2 Double Any)), Mainable (Axis b V2 Double)) => Axis b V2 Double -> IO () Source #

mainWith specialised to a 2D Axis.

Low level

buildPlots :: BaseSpace c ~ v => Axis b c n -> [StyledPlot b v n] Source #

Build a list of styled plots from the axis, ready to be rendered. This takes into account any AxisStyle changes and applies the finalPlots modifications.

The StyledPlots can be rendered with renderStyledPlot and the legend entries can be obtained with styledPlotLegends. This is what renderAxis can uses internally but might be useful for debugging or generating your own legend.

Orphan instances

ToResult (Axis b v n) Source # 

Associated Types

type Args (Axis b v n) :: * #

type ResultOf (Axis b v n) :: * #

Methods

toResult :: Axis b v n -> Args (Axis b v n) -> ResultOf (Axis b v n) #

(TypeableFloat n, Renderable (Path V2 n) b, Mainable (QDiagram b V2 n Any)) => Mainable (Axis b V2 n) Source # 

Associated Types

type MainOpts (Axis b V2 n) :: * #

Methods

mainArgs :: Axis b V2 n -> IO (MainOpts (Axis b V2 n)) #

mainRender :: MainOpts (Axis b V2 n) -> Axis b V2 n -> IO () #

mainWith :: Axis b V2 n -> IO () #

(TypeableFloat n, Renderable (Path V2 n) b, Mainable (QDiagram b V2 n Any)) => Mainable (Axis b Polar n) Source # 

Associated Types

type MainOpts (Axis b Polar n) :: * #

Methods

mainArgs :: Axis b Polar n -> IO (MainOpts (Axis b Polar n)) #

mainRender :: MainOpts (Axis b Polar n) -> Axis b Polar n -> IO () #

mainWith :: Axis b Polar n -> IO () #