Chart-1.1: 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 FieldsunPercent :: Double

Constructors

 LinearAxisParams Fields_la_labelf :: a -> StringThe function used to show the axes labels. _la_nLabels :: IntThe target number of labels to be shown. _la_nTicks :: IntThe target number of ticks to be shown.

Instances

 (Show a, RealFloat a) => Default (LinearAxisParams a)

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 -> StringThe function used to show the axes labels.

Instances

 (Show a, RealFloat a) => Default (LogAxisParams a)

Deprecated: Use the according Data.Default instance!

defaultLogAxis :: (Show a, RealFloat a) => LogAxisParams aSource

Deprecated: Use the according Data.Default instance!

scaledAxis :: RealFloat a => LinearAxisParams a -> (a, a) -> AxisFn aSource

Generate a linear axis with the specified bounds

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

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