Copyright | (c) Tim Docker 2010 2014 |
---|---|
License | BSD-style (see chart/COPYRIGHT) |
Safe Haskell | None |
Language | Haskell98 |
Calculate and render floating value axes including doubles with linear, log, and percentage scaling.
Synopsis
- newtype Percent = Percent {}
- data LinearAxisParams a = LinearAxisParams {
- _la_labelf :: [a] -> [String]
- _la_nLabels :: Int
- _la_nTicks :: Int
- newtype LogValue = LogValue Double
- data LogAxisParams a = LogAxisParams {
- _loga_labelf :: [a] -> [String]
- scaledAxis :: RealFloat a => LinearAxisParams a -> (a, a) -> AxisFn a
- autoScaledAxis :: RealFloat a => LinearAxisParams a -> AxisFn a
- autoScaledLogAxis :: RealFloat a => LogAxisParams a -> AxisFn a
- autoSteps :: Int -> [Double] -> [Double]
- la_labelf :: forall a a. Lens (LinearAxisParams a) (LinearAxisParams a) ([a] -> [String]) ([a] -> [String])
- la_nLabels :: forall a. Lens' (LinearAxisParams a) Int
- la_nTicks :: forall a. Lens' (LinearAxisParams a) Int
- loga_labelf :: forall a a. Iso (LogAxisParams a) (LogAxisParams a) ([a] -> [String]) ([a] -> [String])
Documentation
A wrapper class for doubles used to indicate they are to be plotted against a percentage axis.
Instances
Eq Percent Source # | |
Floating Percent Source # | |
Fractional Percent Source # | |
Num Percent Source # | |
Ord Percent Source # | |
Defined in Graphics.Rendering.Chart.Axis.Floating | |
Real Percent Source # | |
Defined in Graphics.Rendering.Chart.Axis.Floating toRational :: Percent -> Rational # | |
RealFloat Percent Source # | |
Defined in Graphics.Rendering.Chart.Axis.Floating floatRadix :: Percent -> Integer # floatDigits :: Percent -> Int # floatRange :: Percent -> (Int, Int) # decodeFloat :: Percent -> (Integer, Int) # encodeFloat :: Integer -> Int -> Percent # significand :: Percent -> Percent # scaleFloat :: Int -> Percent -> Percent # isInfinite :: Percent -> Bool # isDenormalized :: Percent -> Bool # isNegativeZero :: Percent -> Bool # | |
RealFrac Percent Source # | |
Show Percent Source # | |
PlotValue Percent Source # | |
data LinearAxisParams a Source #
LinearAxisParams | |
|
Instances
(Show a, RealFloat a) => Default (LinearAxisParams a) Source # | |
Defined in Graphics.Rendering.Chart.Axis.Floating def :: LinearAxisParams a # |
A wrapper class for doubles used to indicate they are to be plotted against a log axis.
Instances
data LogAxisParams a Source #
LogAxisParams | |
|
Instances
(Show a, RealFloat a) => Default (LogAxisParams a) Source # | |
Defined in Graphics.Rendering.Chart.Axis.Floating def :: LogAxisParams a # |
scaledAxis :: RealFloat a => LinearAxisParams a -> (a, a) -> AxisFn a Source #
Generate a linear axis with the specified bounds
autoScaledAxis :: RealFloat a => LinearAxisParams a -> AxisFn a Source #
Generate a linear axis automatically, scaled appropriately for the input data.
autoScaledLogAxis :: RealFloat a => LogAxisParams a -> AxisFn a Source #
Generate a log axis automatically, scaled appropriate for the input data.
autoSteps :: Int -> [Double] -> [Double] Source #
Given a target number of values, and a list of input points, find evenly spaced values from the set {1*X, 2*X, 2.5*X, 5*X} (where X is some power of ten) that evenly cover the input points.
la_labelf :: forall a a. Lens (LinearAxisParams a) (LinearAxisParams a) ([a] -> [String]) ([a] -> [String]) Source #
la_nLabels :: forall a. Lens' (LinearAxisParams a) Int Source #
loga_labelf :: forall a a. Iso (LogAxisParams a) (LogAxisParams a) ([a] -> [String]) ([a] -> [String]) Source #