plots-0.1.1.1: Diagrams based plotting library.

Safe HaskellNone
LanguageHaskell2010

Plots.Legend

Contents

Synopsis

Legend

data Legend Source #

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

Instances
Default Legend Source # 
Instance details

Defined in Plots.Legend

Methods

def :: Legend #

ApplyStyle Legend Source # 
Instance details

Defined in Plots.Legend

Methods

applyStyle :: Style (V Legend) (N Legend) -> Legend -> Legend

HasStyle Legend Source #

The style for the bounding box of the legend.

Instance details

Defined in Plots.Legend

Methods

style :: Lens' Legend (Style (V Legend) (N Legend))

HasPlacement Legend Source # 
Instance details

Defined in Plots.Legend

HasGap Legend Source # 
Instance details

Defined in Plots.Legend

HasOrientation Legend Source # 
Instance details

Defined in Plots.Legend

HasVisibility Legend Source # 
Instance details

Defined in Plots.Legend

HasLegend Legend Source # 
Instance details

Defined in Plots.Legend

type N Legend Source # 
Instance details

Defined in Plots.Legend

type N Legend = Double
type V Legend Source # 
Instance details

Defined in Plots.Legend

type V Legend = V2

class HasLegend a where Source #

Minimal complete definition

legend

Methods

legend :: Lens' a Legend Source #

Lens onto the Legend of something.

legendPlacement :: Lens' a Placement Source #

The Placement of the legend relative to the Axis.

legendGap :: Lens' a Double Source #

The gap between the legend and the axis.

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

The style applied to the surronding box of the legend.

legendSpacing :: Lens' a Double Source #

The spacing between entries in the legend.

legendTextWidth :: Lens' a Double Source #

The space given for the text in the legend.

legendTextFunction :: Lens' a (String -> Diagram V2) Source #

The function to generate the legend text.

legendTextStyle :: Lens' a (Style V2 Double) 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)

Drawing a legend

drawLegend Source #

Arguments

:: BoundingBox V2 Double

bounding box to place legend against

-> [(Diagram V2, String)]

diagram pictures along with their key

-> Legend

options for drawing the legend

-> Diagram V2

rendered legend

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