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

Safe Haskell | None

Graphics.Rendering.Chart.Axis.Indexed

Description

Calculate and render indexed axes

Synopsis

- newtype PlotIndex = PlotIndex {
  - plotindex_i :: Int
  }
- autoIndexAxis :: Integral i => [String] -> [i] -> AxisData i
- addIndexes :: [a] -> [(PlotIndex, a)]

# Documentation

newtype PlotIndex Source

Type for capturing values plotted by index number (ie position in a list) rather than a numerical value.

Constructors

PlotIndex |

Fields

plotindex_i :: Int

Instances

Enum PlotIndex |
Eq PlotIndex |
Integral PlotIndex |
Num PlotIndex |
Ord PlotIndex |
Real PlotIndex |
Show PlotIndex |
PlotValue PlotIndex |

autoIndexAxis :: Integral i => [String] -> [i] -> AxisData iSource

Create an axis for values indexed by position. The list of strings are the labels to be used.

addIndexes :: [a] -> [(PlotIndex, a)]Source

Augment a list of values with index numbers for plotting.