Safe Haskell | None |
---|
Graphics.Rendering.Chart.Axis
Description
- data Axis = Axis {
- axis_viewport :: Range -> Double -> Double
- axis_ticks :: [(Double, Double)]
- axis_labels :: [(Double, String)]
- axis_grid :: [Double]
- axis_label_gap :: Double
- axis_line_style :: CairoLineStyle
- axis_label_style :: CairoFontStyle
- axis_grid_style :: CairoLineStyle
- type AxisFn = [Double] -> Maybe Axis
- type AxesFn = [Double] -> [Double] -> (Maybe Axis, Maybe Axis)
- data AxisT = AxisT RectEdge Axis
- minsizeAxis :: AxisT -> Render RectSize
- axisOverhang :: AxisT -> Render (Double, Double)
- renderAxis :: AxisT -> Rect -> Render ()
- axisMapping :: AxisT -> Rect -> (Double, Double, Double, Double, Vector, Double -> Point)
- renderAxisGrid :: AxisT -> Rect -> Render ()
- strokeLines' :: Bool -> [Point] -> Render ()
- steps :: Double -> Range -> [Rational]
- chooseStep :: Double -> Range -> Rational
- explicitAxis :: Maybe Axis -> AxisFn
- linearTicks :: (Double, Double) -> ([Rational], [Rational])
- autoAxis :: ((Double, Double) -> Range -> Double -> Double) -> ([Rational], [Rational]) -> Axis -> Maybe Axis
- autoScaledAxis :: Axis -> AxisFn
- log10 :: Floating a => a -> a
- frac :: (Integral t, RealFrac t1) => t1 -> (t, t1)
- lmap :: (Double, Double) -> Range -> Double -> Double
- logTicks :: Range -> ([Rational], [Rational])
- autoScaledLogAxis :: Axis -> AxisFn
- independentAxes :: AxisFn -> AxisFn -> AxesFn
- linkedAxes :: AxisFn -> AxesFn
- linkedAxes' :: AxisFn -> AxesFn
- defaultAxisLineStyle :: CairoLineStyle
- defaultGridLineStyle :: CairoLineStyle
- defaultAxis :: Axis
- refClockTime :: ClockTime
- doubleFromClockTime :: ClockTime -> Double
- clockTimeFromDouble :: Double -> ClockTime
- monthsAxis :: Axis -> AxisFn
- thisMonthStart :: ClockTime -> ClockTime
- nextMonthStart :: ClockTime -> ClockTime
Documentation
The concrete data type for an axis
Constructors
Axis | |
Fields
|
type AxisFn = [Double] -> Maybe AxisSource
Function type to generate an optional axis given a set of points to be plotted against that axis.
type AxesFn = [Double] -> [Double] -> (Maybe Axis, Maybe Axis)Source
Function type to generate a pair of axes (either top and bottom, or left and right), given the set of points to be plotted against each of them.
minsizeAxis :: AxisT -> Render RectSizeSource
axisOverhang :: AxisT -> Render (Double, Double)Source
Calculate the amount by which the labels extend beyond the ends of the axis
renderAxis :: AxisT -> Rect -> Render ()Source
renderAxisGrid :: AxisT -> Rect -> Render ()Source
strokeLines' :: Bool -> [Point] -> Render ()Source
Same as strokeLines, but with a flag that, when true will adjust each point to land on a whole number. This is useful for drawing known horizontal and vertical lines so that the occupy exactly
chooseStep :: Double -> Range -> RationalSource
explicitAxis :: Maybe Axis -> AxisFnSource
Explicitly specify an axis
autoAxis :: ((Double, Double) -> Range -> Double -> Double) -> ([Rational], [Rational]) -> Axis -> Maybe AxisSource
autoScaledAxis :: Axis -> AxisFnSource
Generate a linear axis automatically. The supplied axis is used as a template, with the viewport, ticks, labels and grid set appropriately for the data displayed against that axies. The resulting axis will only show a grid if the template has some grid values.
autoScaledLogAxis :: Axis -> AxisFnSource
Generate a log axis automatically. The supplied axis is used as a template, with the viewport, ticks, labels and grid set appropriately for the data displayed against that axies. The resulting axis will only show a grid if the template has some grid values.
independentAxes :: AxisFn -> AxisFn -> AxesFnSource
Show independent axes on each side of the layout
linkedAxes :: AxisFn -> AxesFnSource
Show the same axis on both sides of the layout
linkedAxes' :: AxisFn -> AxesFnSource
Show the same axis on both sides of the layout, but with labels only on the primary side
doubleFromClockTime :: ClockTime -> DoubleSource
Map a clocktime value to a plot cordinate
clockTimeFromDouble :: Double -> ClockTimeSource
Map a plot cordinate to a clocktime
monthsAxis :: Axis -> AxisFnSource
An axis that plots dates, with ticks and labels corresponding to
calendar months. The values to be plotted against this axis can
be created with doubleFromClockTime