Chart-0.14: A library for generating 2D Charts and Plots

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

unPercent :: Double
 

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.

newtype LogValue Source

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

Constructors

LogValue Double 

data LogAxisParams a Source

Constructors

LogAxisParams 

Fields

loga_labelf_ :: a -> String

The function used to show the axes labels.

autoScaledAxis :: RealFloat a => LinearAxisParams a -> AxisFn aSource

Generate a linear axis automatically, scaled appropriately for the input data.

autoScaledLogAxis :: RealFloat a => LogAxisParams a -> AxisFn aSource

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[akKs]. T (LinearAxisParams a[akKs]) (a[akKs] -> String)Source

la_nLabels :: forall a[akKs]. T (LinearAxisParams a[akKs]) IntSource

la_nTicks :: forall a[akKs]. T (LinearAxisParams a[akKs]) IntSource

loga_labelf :: forall a[akKr]. T (LogAxisParams a[akKr]) (a[akKr] -> String)Source