Safe Haskell | None |
---|---|
Language | Haskell2010 |
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; a surface chart (often called a heatmap).
SurfaceData
, the rectangle and the color value, is a different shape to the usual data elements of a chart, so there is a bit more wrangling to do compared with other chart types.
Synopsis
- data SurfaceData = SurfaceData {}
- data SurfaceOptions = SurfaceOptions {}
- defaultSurfaceOptions :: SurfaceOptions
- data SurfaceStyle = SurfaceStyle {}
- defaultSurfaceStyle :: SurfaceStyle
- mkSurfaceData :: (Point Double -> Double) -> Rect Double -> Grid (Rect Double) -> [Colour] -> ([SurfaceData], Range Double)
- surfaces :: RectStyle -> [SurfaceData] -> [Chart Double]
- surfacef :: (Point Double -> Double) -> SurfaceOptions -> ([Chart Double], Range Double)
- surfacefl :: (Point Double -> Double) -> SurfaceOptions -> SurfaceLegendOptions -> ([Chart Double], [Hud Double])
- data SurfaceLegendOptions = SurfaceLegendOptions {}
- defaultSurfaceLegendOptions :: Text -> SurfaceLegendOptions
Documentation
data SurfaceData Source #
Main surface data elements
SurfaceData | |
|
Instances
Eq SurfaceData Source # | |
Defined in Chart.Surface (==) :: SurfaceData -> SurfaceData -> Bool # (/=) :: SurfaceData -> SurfaceData -> Bool # | |
Show SurfaceData Source # | |
Defined in Chart.Surface showsPrec :: Int -> SurfaceData -> ShowS # show :: SurfaceData -> String # showList :: [SurfaceData] -> ShowS # | |
Generic SurfaceData Source # | |
Defined in Chart.Surface type Rep SurfaceData :: Type -> Type # from :: SurfaceData -> Rep SurfaceData x # to :: Rep SurfaceData x -> SurfaceData # | |
type Rep SurfaceData Source # | |
Defined in Chart.Surface type Rep SurfaceData = D1 ('MetaData "SurfaceData" "Chart.Surface" "chart-svg-0.2.2-AJskDBGhW2w5nFQE5Ah360" 'False) (C1 ('MetaCons "SurfaceData" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "surfaceColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour))) |
data SurfaceOptions Source #
Options for a Surface chart.
Instances
defaultSurfaceOptions :: SurfaceOptions Source #
official style
data SurfaceStyle Source #
A surface chart is a specialization of a RectA
chart
>>>
defaultSurfaceStyle
SurfaceStyle {surfaceColors = [Colour 0.69 0.35 0.16 1.00,Colour 0.65 0.81 0.89 1.00], surfaceRectStyle = RectStyle {borderSize = 0.0, borderColor = Colour 0.00 0.00 0.00 0.00, color = Colour 0.05 0.05 0.05 1.00}}
SurfaceStyle | |
|
Instances
Eq SurfaceStyle Source # | |
Defined in Chart.Surface (==) :: SurfaceStyle -> SurfaceStyle -> Bool # (/=) :: SurfaceStyle -> SurfaceStyle -> Bool # | |
Show SurfaceStyle Source # | |
Defined in Chart.Surface showsPrec :: Int -> SurfaceStyle -> ShowS # show :: SurfaceStyle -> String # showList :: [SurfaceStyle] -> ShowS # | |
Generic SurfaceStyle Source # | |
Defined in Chart.Surface type Rep SurfaceStyle :: Type -> Type # from :: SurfaceStyle -> Rep SurfaceStyle x # to :: Rep SurfaceStyle x -> SurfaceStyle # | |
type Rep SurfaceStyle Source # | |
Defined in Chart.Surface type Rep SurfaceStyle = D1 ('MetaData "SurfaceStyle" "Chart.Surface" "chart-svg-0.2.2-AJskDBGhW2w5nFQE5Ah360" 'False) (C1 ('MetaCons "SurfaceStyle" 'PrefixI 'True) (S1 ('MetaSel ('Just "surfaceColors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Colour]) :*: S1 ('MetaSel ('Just "surfaceRectStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RectStyle))) |
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
surfaces :: RectStyle -> [SurfaceData] -> [Chart Double] Source #
surface chart without any hud trimmings
surfacef :: (Point Double -> Double) -> SurfaceOptions -> ([Chart Double], Range Double) Source #
create a surface chart from a function.
surfacefl :: (Point Double -> Double) -> SurfaceOptions -> SurfaceLegendOptions -> ([Chart Double], [Hud Double]) Source #
Create a surface chart and accompanying legend from a function.
data SurfaceLegendOptions Source #
Legend specialization for a surface chart.
SurfaceLegendOptions | |
|
Instances
defaultSurfaceLegendOptions :: Text -> SurfaceLegendOptions Source #
official surface legend options