plots-0.1.1.3: Diagrams based plotting library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plots.Legend

Synopsis

Legend

data Legend b n Source #

The data type to describe how to draw a legend. For legend entries see LegendEntry.

Instances

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

Defined in Plots.Legend

Methods

def :: Legend b n #

TypeableFloat n => HasStyle (Legend b n) Source # 
Instance details

Defined in Plots.Legend

Methods

applyStyle :: Style (V (Legend b n)) (N (Legend b n)) -> Legend b n -> Legend b n #

HasGap (Legend b n) Source # 
Instance details

Defined in Plots.Legend

Methods

gap :: Lens' (Legend b n) (N (Legend b n)) Source #

HasOrientation (Legend b n) Source # 
Instance details

Defined in Plots.Legend

HasPlacement (Legend b n) Source # 
Instance details

Defined in Plots.Legend

HasVisibility (Legend b n) Source # 
Instance details

Defined in Plots.Legend

HasLegend (Legend b n) b Source # 
Instance details

Defined in Plots.Legend

type N (Legend b n) Source # 
Instance details

Defined in Plots.Legend

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

Defined in Plots.Legend

type V (Legend b n) = V2

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

Minimal complete definition

legend

Methods

legend :: Lens' a (Legend b (N a)) Source #

Lens onto the Legend of something.

legendPlacement :: Lens' a Placement Source #

The Placement of the legend relative to the Axis.

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

The gap between the legend and the axis.

legendStyle :: Lens' a (Style V2 (N a)) Source #

The style applied to the surronding box of the legend.

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

The spacing between entries in the legend.

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

The space given for the text in the legend.

legendTextFunction :: Lens' a (String -> QDiagram b V2 (N a) Any) Source #

The function to generate the legend text.

legendTextStyle :: Lens' a (Style V2 (N a)) Source #

The style applied to the legend text.

legendOrientation :: Lens' a Orientation Source #

The way the legend entries are listed. (This will likely be replaced by a grid-like system)

Instances

Instances details
HasLegend (Legend b n) b Source # 
Instance details

Defined in Plots.Legend

HasLegend (Axis b c n) b Source # 
Instance details

Defined in Plots.Axis

Methods

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

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

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

legendStyle :: Lens' (Axis b c n) (Style V2 (N (Axis b c n))) Source #

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

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

legendTextFunction :: Lens' (Axis b c n) (String -> QDiagram b V2 (N (Axis b c n)) Any) Source #

legendTextStyle :: Lens' (Axis b c n) (Style V2 (N (Axis b c n))) Source #

legendOrientation :: Lens' (Axis b c n) Orientation Source #

Drawing a legend

drawLegend Source #

Arguments

:: (TypeableFloat n, Renderable (Path V2 n) b) 
=> BoundingBox V2 n

bounding box to place legend against

-> [(QDiagram b V2 n Any, String)]

diagram pictures along with their key

-> Legend b n

options for drawing the legend

-> QDiagram b V2 n Any

rendered legend

Draw a legend to the bounding box using the legend entries and legend options.