| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plots.Legend
Contents
- data Legend b n
- class HasLegend a b | a -> b where
- drawLegend :: (TypeableFloat n, Renderable (Path V2 n) b) => BoundingBox V2 n -> [(QDiagram b V2 n Any, String)] -> Legend b n -> QDiagram b V2 n Any
Legend
The data type to describe how to draw a legend. For legend entries
see LegendEntry.
Instances
| (TypeableFloat n, Renderable (Text n) b) => Default (Legend b n) Source # | |
| TypeableFloat n => HasStyle (Legend b n) Source # | |
| HasPlacement (Legend b n) Source # | |
| HasGap (Legend b n) Source # | |
| HasOrientation (Legend b n) Source # | |
| HasVisibility (Legend b n) Source # | |
| HasLegend (Legend b n) b Source # | |
| type V (Legend b n) Source # | |
| type N (Legend b n) Source # | |
class HasLegend a b | a -> b where Source #
Minimal complete definition
Methods
legend :: Lens' a (Legend b (N a)) Source #
Lens onto the Legend of something.
legendPlacement :: Lens' a Placement Source #
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)
Drawing a legend
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.