plots-0.1.1.1: 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.ColourBar

Contents

Description

Options for rendering a colour bar, either attached to an axis or rendered separately.

To change the colour map used for the colour bar see axisColourMap from Plots.Style.

Synopsis

The colour bar

data ColourBar Source #

Options for drawing a colour bar. Note that for an axis, the ColourMap is stored in the AxisStyle. These options are for other aspects of the bar, not the colours used.

Instances
ApplyStyle ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Methods

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

HasStyle ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Methods

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

HasPlacement ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

HasGap ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

HasOrientation ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

HasVisibility ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

HasColourBar ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Functor f => HasTickLabels f ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Functor f => HasMajorGridLines f ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Functor f => HasMinorTicks f ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

Functor f => HasMajorTicks f ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

type N ColourBar Source # 
Instance details

Defined in Plots.Axis.ColourBar

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

Defined in Plots.Axis.ColourBar

type V ColourBar = V2

class HasColourBar a where Source #

Minimal complete definition

colourBar

Methods

colourBar :: Lens' a ColourBar Source #

Lens onto the ColourBar.

colourBarDraw :: Lens' a (ColourMap -> Diagram V2) Source #

How to draw the colour bar. Expects a 1 by 1 box with the gradient going from left to right, without an outline with origin in the middle of the left side. See gradientColourBar and pathColourBar.

The colour map this function recieves it given by axisColourMap from Plots.Style

Default is gradientColourBar.

colourBarWidth :: Lens' a Double Source #

The width (orthogonal to the colour bar direction) of the colour bar.

Default is 20.

colourBarLengthFunction :: Lens' a (Double -> Double) Source #

Set the length of the colour bar given the length of the axis the colour bar is aligned to.

Default is id.

colourBarGap :: Lens' a Double Source #

Gap between the axis and the colour bar (if rendered with an axis).

Default is 20.

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

Style used for the outline of a colour bar.

defColourBar :: ColourBar Source #

The default colour bar.

Rendering options

gradientColourBar :: ColourMap -> Diagram V2 Source #

The colour bar generated by a gradient texture. The final diagram is 1 by 1, with origin at the middle of the left side. This can be used as the colourBarDraw function.

This may not be supported by all backends.

pathColourBar :: Int -> ColourMap -> Diagram V2 Source #

Construct a colour bar made up of n solid square paths. The final diagram is 1 by 1, with origin at the middle of the left side. This can be used as the colourBarDraw function.

Rendering colour bars

renderColourBar Source #

Arguments

:: ColourBar

options for colour bar

-> ColourMap

map to use

-> (Double, Double)

bounds of the values on the colour bar

-> Double

length of the colour bar

-> Diagram V2 

Render a colour bar by it's self at a given width. Note this ignores colourBarGap and colourBarLengthFunction.

addColourBar Source #

Arguments

:: BoundingBox V2 Double

bounding box to place against

-> ColourBar 
-> ColourMap 
-> (Double, Double) 
-> Diagram V2 

Add a colour bar to an object, using the bounding box for the object.