Chart-1.9.3: A library for generating 2D Charts and Plots
Copyright(c) Tim Docker 2010 2014
LicenseBSD-style (see chart/COPYRIGHT)
Safe HaskellNone
LanguageHaskell98

Graphics.Rendering.Chart.Axis.Floating

Description

Calculate and render floating value axes including doubles with linear, log, and percentage scaling.

Synopsis

Documentation

newtype Percent Source #

A wrapper class for doubles used to indicate they are to be plotted against a percentage axis.

Constructors

Percent 

Fields

Instances

Instances details
Eq Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

(==) :: Percent -> Percent -> Bool

(/=) :: Percent -> Percent -> Bool

Floating Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Fractional Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

(/) :: Percent -> Percent -> Percent

recip :: Percent -> Percent

fromRational :: Rational -> Percent

Num Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Ord Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

compare :: Percent -> Percent -> Ordering

(<) :: Percent -> Percent -> Bool

(<=) :: Percent -> Percent -> Bool

(>) :: Percent -> Percent -> Bool

(>=) :: Percent -> Percent -> Bool

max :: Percent -> Percent -> Percent

min :: Percent -> Percent -> Percent

Real Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

toRational :: Percent -> Rational

RealFloat Percent Source # 
Instance details

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

exponent :: Percent -> Int

significand :: Percent -> Percent

scaleFloat :: Int -> Percent -> Percent

isNaN :: Percent -> Bool

isInfinite :: Percent -> Bool

isDenormalized :: Percent -> Bool

isNegativeZero :: Percent -> Bool

isIEEE :: Percent -> Bool

atan2 :: Percent -> Percent -> Percent

RealFrac Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

properFraction :: Integral b => Percent -> (b, Percent)

truncate :: Integral b => Percent -> b

round :: Integral b => Percent -> b

ceiling :: Integral b => Percent -> b

floor :: Integral b => Percent -> b

Show Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

showsPrec :: Int -> Percent -> ShowS

show :: Percent -> String

showList :: [Percent] -> ShowS

PlotValue Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

data LinearAxisParams a Source #

Constructors

LinearAxisParams 

Fields

  • _la_labelf :: [a] -> [String]

    The function used to show the axes labels.

  • _la_nLabels :: Int

    The target number of labels to be shown.

  • _la_nTicks :: Int

    The target number of ticks to be shown.

Instances

Instances details
(Show a, RealFloat a) => Default (LinearAxisParams a) Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

newtype LogValue Source #

A wrapper class for doubles used to indicate they are to be plotted against a log axis.

Constructors

LogValue Double 

Instances

Instances details
Eq LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

(==) :: LogValue -> LogValue -> Bool

(/=) :: LogValue -> LogValue -> Bool

Floating LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Fractional LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Num LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Ord LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

compare :: LogValue -> LogValue -> Ordering

(<) :: LogValue -> LogValue -> Bool

(<=) :: LogValue -> LogValue -> Bool

(>) :: LogValue -> LogValue -> Bool

(>=) :: LogValue -> LogValue -> Bool

max :: LogValue -> LogValue -> LogValue

min :: LogValue -> LogValue -> LogValue

Real LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

toRational :: LogValue -> Rational

RealFloat LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

floatRadix :: LogValue -> Integer

floatDigits :: LogValue -> Int

floatRange :: LogValue -> (Int, Int)

decodeFloat :: LogValue -> (Integer, Int)

encodeFloat :: Integer -> Int -> LogValue

exponent :: LogValue -> Int

significand :: LogValue -> LogValue

scaleFloat :: Int -> LogValue -> LogValue

isNaN :: LogValue -> Bool

isInfinite :: LogValue -> Bool

isDenormalized :: LogValue -> Bool

isNegativeZero :: LogValue -> Bool

isIEEE :: LogValue -> Bool

atan2 :: LogValue -> LogValue -> LogValue

RealFrac LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

properFraction :: Integral b => LogValue -> (b, LogValue)

truncate :: Integral b => LogValue -> b

round :: Integral b => LogValue -> b

ceiling :: Integral b => LogValue -> b

floor :: Integral b => LogValue -> b

Show LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

Methods

showsPrec :: Int -> LogValue -> ShowS

show :: LogValue -> String

showList :: [LogValue] -> ShowS

PlotValue LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

data LogAxisParams a Source #

Constructors

LogAxisParams 

Fields

  • _loga_labelf :: [a] -> [String]

    The function used to show the axes labels.

Instances

Instances details
(Show a, RealFloat a) => Default (LogAxisParams a) Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

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_nTicks :: forall a. Lens' (LinearAxisParams a) Int Source #

loga_labelf :: forall a a. Iso (LogAxisParams a) (LogAxisParams a) ([a] -> [String]) ([a] -> [String]) Source #

Orphan instances

PlotValue Double Source # 
Instance details

Methods

toValue :: Double -> Double Source #

fromValue :: Double -> Double Source #

autoAxis :: AxisFn Double Source #

PlotValue Float Source # 
Instance details

Methods

toValue :: Float -> Double Source #

fromValue :: Double -> Float Source #

autoAxis :: AxisFn Float Source #