Copyright | (c) Tim Docker 2010 2014 |
---|---|
License | BSD-style (see chart/COPYRIGHT) |
Safe Haskell | None |
Language | Haskell98 |
Graphics.Rendering.Chart.Axis.Floating
Contents
Description
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 {
- unLogValue :: 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 a1 a2 f. Functor f => (([a1] -> [String]) -> f ([a2] -> [String])) -> LinearAxisParams a1 -> f (LinearAxisParams a2)
- la_nLabels :: forall a f. Functor f => (Int -> f Int) -> LinearAxisParams a -> f (LinearAxisParams a)
- la_nTicks :: forall a f. Functor f => (Int -> f Int) -> LinearAxisParams a -> f (LinearAxisParams a)
- loga_labelf :: forall a1 a2 p f. (Profunctor p, Functor f) => p ([a1] -> [String]) (f ([a2] -> [String])) -> p (LogAxisParams a1) (f (LogAxisParams a2))
Documentation
A wrapper class for doubles used to indicate they are to be plotted against a percentage axis.
Instances
PlotValue Percent # | |
Floating Percent # | |
RealFloat Percent # | |
Defined in Graphics.Rendering.Chart.Axis.Floating Methods 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 # | |
Num Percent # | |
Fractional Percent # | |
Real Percent # | |
Defined in Graphics.Rendering.Chart.Axis.Floating Methods toRational :: Percent -> Rational # | |
RealFrac Percent # | |
Show Percent # | |
Eq Percent # | |
Ord Percent # | |
Defined in Graphics.Rendering.Chart.Axis.Floating |
data LinearAxisParams a #
Constructors
LinearAxisParams | |
Fields
|
Instances
(Show a, RealFloat a) => Default (LinearAxisParams a) # | |
Defined in Graphics.Rendering.Chart.Axis.Floating Methods def :: LinearAxisParams a # |
A wrapper class for doubles used to indicate they are to be plotted against a log axis.
Constructors
LogValue | |
Fields
|
Instances
data LogAxisParams a #
Constructors
LogAxisParams | |
Fields
|
Instances
(Show a, RealFloat a) => Default (LogAxisParams a) # | |
Defined in Graphics.Rendering.Chart.Axis.Floating Methods def :: LogAxisParams a # |
scaledAxis :: RealFloat a => LinearAxisParams a -> (a, a) -> AxisFn a #
Generate a linear axis with the specified bounds
autoScaledAxis :: RealFloat a => LinearAxisParams a -> AxisFn a #
Generate a linear axis automatically, scaled appropriately for the input data.
autoScaledLogAxis :: RealFloat a => LogAxisParams a -> AxisFn a #
Generate a log axis automatically, scaled appropriately for the input data.
autoSteps :: Int -> [Double] -> [Double] #
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 a1 a2 f. Functor f => (([a1] -> [String]) -> f ([a2] -> [String])) -> LinearAxisParams a1 -> f (LinearAxisParams a2) #
la_nLabels :: forall a f. Functor f => (Int -> f Int) -> LinearAxisParams a -> f (LinearAxisParams a) #
la_nTicks :: forall a f. Functor f => (Int -> f Int) -> LinearAxisParams a -> f (LinearAxisParams a) #
loga_labelf :: forall a1 a2 p f. (Profunctor p, Functor f) => p ([a1] -> [String]) (f ([a2] -> [String])) -> p (LogAxisParams a1) (f (LogAxisParams a2)) #