Chart-1.8: 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

Contents

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

Eq Percent Source # 

Methods

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

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

Floating Percent Source # 
Fractional Percent Source # 
Num Percent Source # 
Ord Percent Source # 
Real Percent Source # 
RealFloat Percent Source # 
RealFrac Percent Source # 

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 # 
PlotValue Percent Source # 

data LinearAxisParams a Source #

Constructors

LinearAxisParams 

Fields

Instances

newtype LogValue Source #

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

Constructors

LogValue Double 

Instances

Eq LogValue Source # 
Floating LogValue Source # 
Fractional LogValue Source # 
Num LogValue Source # 
Ord LogValue Source # 
Real LogValue Source # 
RealFloat LogValue Source # 
RealFrac LogValue Source # 

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 # 
PlotValue LogValue Source # 

data LogAxisParams a Source #

Constructors

LogAxisParams 

Fields

Instances

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 #

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

Orphan instances