plots-0.1.1.4: Diagrams based plotting library
Copyright(C) 2016 Christopher Chalmers
LicenseBSD-style (see the file LICENSE)
MaintainerChristopher Chalmers
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plots.Axis.Title

Description

The title used for a plot.

Synopsis

Documentation

data Title b v n Source #

Instances

Instances details
(Renderable (Text n) b, TypeableFloat n) => Default (Title b V2 n) Source # 
Instance details

Defined in Plots.Axis.Title

Methods

def :: Title b V2 n #

HasGap (Title b v n) Source # 
Instance details

Defined in Plots.Axis.Title

Methods

gap :: Lens' (Title b v n) (N (Title b v n)) Source #

HasPlacement (Title b v n) Source # 
Instance details

Defined in Plots.Axis.Title

HasVisibility (Title b v n) Source # 
Instance details

Defined in Plots.Axis.Title

Methods

visible :: Lens' (Title b v n) Bool Source #

hidden :: Lens' (Title b v n) Bool Source #

HasTitle (Title b v n) b Source # 
Instance details

Defined in Plots.Axis.Title

Methods

title :: Lens' (Title b v n) (Title b (V (Title b v n)) (N (Title b v n))) Source #

titleText :: Lens' (Title b v n) String Source #

titleStyle :: Lens' (Title b v n) (Style (V (Title b v n)) (N (Title b v n))) Source #

titlePlacement :: Lens' (Title b v n) Placement Source #

titleTextFunction :: Lens' (Title b v n) (TextAlignment (N (Title b v n)) -> String -> QDiagram b (V (Title b v n)) (N (Title b v n)) Any) Source #

titleAlignment :: Lens' (Title b v n) (TextAlignment (N (Title b v n))) Source #

titleGap :: Lens' (Title b v n) (N (Title b v n)) Source #

type N (Title b v n) Source # 
Instance details

Defined in Plots.Axis.Title

type N (Title b v n) = n
type V (Title b v n) Source # 
Instance details

Defined in Plots.Axis.Title

type V (Title b v n) = v

class HasTitle a b | a -> b where Source #

Minimal complete definition

title

Methods

title :: Lens' a (Title b (V a) (N a)) Source #

titleText :: Lens' a String Source #

The text used for the title. If the string is empty, no title is drawn.

Default is ""

titleStyle :: Lens' a (Style (V a) (N a)) Source #

The style applied to the title.

Default is mempty.

titlePlacement :: Lens' a Placement Source #

The placement of the title against the axis.

Default is mempty.

titleTextFunction :: Lens' a (TextAlignment (N a) -> String -> QDiagram b (V a) (N a) Any) Source #

The function used to draw the title text.

Default is mkText.

titleAlignment :: Lens' a (TextAlignment (N a)) Source #

The TextAlignment used for the title text. This is given to the titleTextFunction.

Default is BoxAlignedText 0.5 0.

titleGap :: Lens' a (N a) Source #

The gap between the axis and the title.

Default is mempty.

Instances

Instances details
HasTitle (Axis b c n) b Source # 
Instance details

Defined in Plots.Axis

Methods

title :: Lens' (Axis b c n) (Title b (V (Axis b c n)) (N (Axis b c n))) Source #

titleText :: Lens' (Axis b c n) String Source #

titleStyle :: Lens' (Axis b c n) (Style (V (Axis b c n)) (N (Axis b c n))) Source #

titlePlacement :: Lens' (Axis b c n) Placement Source #

titleTextFunction :: Lens' (Axis b c n) (TextAlignment (N (Axis b c n)) -> String -> QDiagram b (V (Axis b c n)) (N (Axis b c n)) Any) Source #

titleAlignment :: Lens' (Axis b c n) (TextAlignment (N (Axis b c n))) Source #

titleGap :: Lens' (Axis b c n) (N (Axis b c n)) Source #

HasTitle (Title b v n) b Source # 
Instance details

Defined in Plots.Axis.Title

Methods

title :: Lens' (Title b v n) (Title b (V (Title b v n)) (N (Title b v n))) Source #

titleText :: Lens' (Title b v n) String Source #

titleStyle :: Lens' (Title b v n) (Style (V (Title b v n)) (N (Title b v n))) Source #

titlePlacement :: Lens' (Title b v n) Placement Source #

titleTextFunction :: Lens' (Title b v n) (TextAlignment (N (Title b v n)) -> String -> QDiagram b (V (Title b v n)) (N (Title b v n)) Any) Source #

titleAlignment :: Lens' (Title b v n) (TextAlignment (N (Title b v n))) Source #

titleGap :: Lens' (Title b v n) (N (Title b v n)) Source #

drawTitle :: TypeableFloat n => BoundingBox V2 n -> Title b V2 n -> QDiagram b V2 n Any Source #

Render the title and place it around the bounding box.