| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Chart.Surface
Description
Surface chart combinators.
A common chart is to present a set of rectangles on the XY plane with colour representing values of the underlying data. This library uses the term surface chart but it is often referred to as a heatmap.
Synopsis
- data SurfaceData = SurfaceData {}
- data SurfaceOptions = SurfaceOptions {}
- defaultSurfaceOptions :: SurfaceOptions
- data SurfaceStyle = SurfaceStyle {
- surfaceColors :: [Colour]
- surfaceRectStyle :: Style
- defaultSurfaceStyle :: SurfaceStyle
- mkSurfaceData :: (Point Double -> Double) -> Rect Double -> Grid (Rect Double) -> [Colour] -> ([SurfaceData], Range Double)
- surfaces :: Style -> [SurfaceData] -> [Chart]
- surfacef :: (Point Double -> Double) -> SurfaceOptions -> ([Chart], Range Double)
- data SurfaceLegendOptions = SurfaceLegendOptions {}
- defaultSurfaceLegendOptions :: SurfaceLegendOptions
- surfaceLegendAxisOptions :: AxisOptions
- gridReferenceChart :: SurfaceLegendOptions -> ChartTree
- addSurfaceLegend :: SurfaceLegendOptions -> ChartTree -> ChartTree
Documentation
data SurfaceData Source #
Main surface data elements
Constructors
| SurfaceData | |
Fields
| |
Instances
| Data SurfaceData Source # | |||||
Defined in Chart.Surface Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SurfaceData -> c SurfaceData # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SurfaceData # toConstr :: SurfaceData -> Constr # dataTypeOf :: SurfaceData -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SurfaceData) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SurfaceData) # gmapT :: (forall b. Data b => b -> b) -> SurfaceData -> SurfaceData # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceData -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceData -> r # gmapQ :: (forall d. Data d => d -> u) -> SurfaceData -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SurfaceData -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SurfaceData -> m SurfaceData # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceData -> m SurfaceData # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceData -> m SurfaceData # | |||||
| Generic SurfaceData Source # | |||||
Defined in Chart.Surface Associated Types
| |||||
| Show SurfaceData Source # | |||||
Defined in Chart.Surface Methods showsPrec :: Int -> SurfaceData -> ShowS # show :: SurfaceData -> String # showList :: [SurfaceData] -> ShowS # | |||||
| Eq SurfaceData Source # | |||||
Defined in Chart.Surface | |||||
| type Rep SurfaceData Source # | |||||
Defined in Chart.Surface type Rep SurfaceData = D1 ('MetaData "SurfaceData" "Chart.Surface" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "SurfaceData" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "surfaceColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour))) | |||||
data SurfaceOptions Source #
Options for a Surface chart.
Constructors
| SurfaceOptions | |
Instances
defaultSurfaceOptions :: SurfaceOptions Source #
official style
data SurfaceStyle Source #
A surface chart is a specialization of a RectChart
>>>defaultSurfaceStyleSurfaceStyle {surfaceColors = [Colour 0.02 0.73 0.80 1.00,Colour 0.02 0.29 0.48 1.00], surfaceRectStyle = Style {size = 6.0e-2, borderSize = 0.0, color = Colour 0.05 0.05 0.05 1.00, borderColor = Colour 0.00 0.00 0.00 0.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}}
Constructors
| SurfaceStyle | |
Fields
| |
Instances
| Data SurfaceStyle Source # | |||||
Defined in Chart.Surface Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SurfaceStyle -> c SurfaceStyle # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SurfaceStyle # toConstr :: SurfaceStyle -> Constr # dataTypeOf :: SurfaceStyle -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SurfaceStyle) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SurfaceStyle) # gmapT :: (forall b. Data b => b -> b) -> SurfaceStyle -> SurfaceStyle # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceStyle -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceStyle -> r # gmapQ :: (forall d. Data d => d -> u) -> SurfaceStyle -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SurfaceStyle -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SurfaceStyle -> m SurfaceStyle # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceStyle -> m SurfaceStyle # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceStyle -> m SurfaceStyle # | |||||
| Generic SurfaceStyle Source # | |||||
Defined in Chart.Surface Associated Types
| |||||
| Show SurfaceStyle Source # | |||||
Defined in Chart.Surface Methods showsPrec :: Int -> SurfaceStyle -> ShowS # show :: SurfaceStyle -> String # showList :: [SurfaceStyle] -> ShowS # | |||||
| Eq SurfaceStyle Source # | |||||
Defined in Chart.Surface | |||||
| type Rep SurfaceStyle Source # | |||||
Defined in Chart.Surface type Rep SurfaceStyle = D1 ('MetaData "SurfaceStyle" "Chart.Surface" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "SurfaceStyle" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceColors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Colour]) :*: S1 ('MetaSel ('Just "surfaceRectStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style))) | |||||
defaultSurfaceStyle :: SurfaceStyle Source #
The official surface style.
mkSurfaceData :: (Point Double -> Double) -> Rect Double -> Grid (Rect Double) -> [Colour] -> ([SurfaceData], Range Double) Source #
Create surface data from a function on a Point
surfacef :: (Point Double -> Double) -> SurfaceOptions -> ([Chart], Range Double) Source #
Create a surface chart from a function.
data SurfaceLegendOptions Source #
Legend specialization for a surface chart.
Constructors
| SurfaceLegendOptions | |
Fields
| |
Instances
| Data SurfaceLegendOptions Source # | |||||
Defined in Chart.Surface Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SurfaceLegendOptions -> c SurfaceLegendOptions # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SurfaceLegendOptions # toConstr :: SurfaceLegendOptions -> Constr # dataTypeOf :: SurfaceLegendOptions -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SurfaceLegendOptions) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SurfaceLegendOptions) # gmapT :: (forall b. Data b => b -> b) -> SurfaceLegendOptions -> SurfaceLegendOptions # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceLegendOptions -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SurfaceLegendOptions -> r # gmapQ :: (forall d. Data d => d -> u) -> SurfaceLegendOptions -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SurfaceLegendOptions -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SurfaceLegendOptions -> m SurfaceLegendOptions # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceLegendOptions -> m SurfaceLegendOptions # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SurfaceLegendOptions -> m SurfaceLegendOptions # | |||||
| Generic SurfaceLegendOptions Source # | |||||
Defined in Chart.Surface Associated Types
Methods from :: SurfaceLegendOptions -> Rep SurfaceLegendOptions x # to :: Rep SurfaceLegendOptions x -> SurfaceLegendOptions # | |||||
| Show SurfaceLegendOptions Source # | |||||
Defined in Chart.Surface Methods showsPrec :: Int -> SurfaceLegendOptions -> ShowS # show :: SurfaceLegendOptions -> String # showList :: [SurfaceLegendOptions] -> ShowS # | |||||
| Eq SurfaceLegendOptions Source # | |||||
Defined in Chart.Surface Methods (==) :: SurfaceLegendOptions -> SurfaceLegendOptions -> Bool # (/=) :: SurfaceLegendOptions -> SurfaceLegendOptions -> Bool # | |||||
| type Rep SurfaceLegendOptions Source # | |||||
Defined in Chart.Surface type Rep SurfaceLegendOptions = D1 ('MetaData "SurfaceLegendOptions" "Chart.Surface" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "SurfaceLegendOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sloAxisOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AxisOptions) :*: (S1 ('MetaSel ('Just "sloWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "sloResolution") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: (S1 ('MetaSel ('Just "sloDataRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Range Double)) :*: (S1 ('MetaSel ('Just "sloRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "sloSurfaceStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SurfaceStyle))))) | |||||
defaultSurfaceLegendOptions :: SurfaceLegendOptions Source #
official surface legend options
surfaceLegendAxisOptions :: AxisOptions Source #
AxisOptions for a surface chart legend.
gridReferenceChart :: SurfaceLegendOptions -> ChartTree Source #
Chart used as a reference to a surface chart.
addSurfaceLegend :: SurfaceLegendOptions -> ChartTree -> ChartTree Source #
Add a surface legend to a main surface chart.