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

Graphics.Rendering.Chart.Axis.Types

Description

Type definitions for Axes

Synopsis

Documentation

data AxisData x Source #

The basic data associated with an axis showing values of type x.

Constructors

AxisData 

Fields

  • _axis_visibility :: AxisVisibility

    Which parts of the axis shall be displayed.

  • _axis_viewport :: Range -> x -> Double

    The _axis_viewport function maps values into device coordinates.

  • _axis_tropweiv :: Range -> Double -> x

    The _axis_tropweiv function maps device coordinates back to values.

  • _axis_ticks :: [(x, Double)]

    The tick marks on the axis as pairs. The first element is the position on the axis (in viewport units) and the second element is the length of the tick in output coordinates. The tick starts on the axis, and positive numbers are drawn towards the plot area.

  • _axis_labels :: [[(x, String)]]

    The labels on an axis as pairs. The first element of the pair is the position on the axis (in viewport units) and the second is the label text string. Note that multiple sets of labels can be specified, and are shown successively further away from the axis line.

  • _axis_grid :: [x]

    The positions on the axis (in viewport units) where we want to show grid lines.

data AxisVisibility Source #

Configures whick visual elements of a axis are shown at the appropriate edge of a plot area.

Constructors

AxisVisibility 

Fields

Instances

Instances details
Default AxisVisibility Source #

By default all parts of a axis are visible.

Instance details

Defined in Graphics.Rendering.Chart.Axis.Types

Methods

def :: AxisVisibility #

data AxisT x Source #

Collect the information we need to render an axis. The bool is true if the axis direction is reversed.

data AxisStyle Source #

Control values for how an axis gets displayed.

Constructors

AxisStyle 

Fields

Instances

Instances details
Default AxisStyle Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Types

Methods

def :: AxisStyle #

class Ord a => PlotValue a where Source #

A typeclass abstracting the functions we need to be able to plot against an axis of type a

Instances

Instances details
PlotValue Double Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

PlotValue Float Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

PlotValue Int Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Int8 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Int16 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Int32 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Int64 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Integer Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Word Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Word8 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Word16 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Word32 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue Word64 Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Int

PlotValue () Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Unit

PlotValue LocalTime Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Time

PlotValue UTCTime Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Time

PlotValue Day Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Time

PlotValue PlotIndex Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Indexed

PlotValue LogValue Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

PlotValue Percent Source # 
Instance details

Defined in Graphics.Rendering.Chart.Axis.Floating

type AxisFn x = [x] -> AxisData x Source #

A function to generate the axis data, given the data values to be plotted against it.

defaultAxisLineStyle :: LineStyle Source #

The default LineStyle of an axis.

defaultGridLineStyle :: LineStyle Source #

The default LineStyle of a plot area grid.

makeAxis :: PlotValue x => ([x] -> [String]) -> ([x], [x], [x]) -> AxisData x Source #

Construct an axis given the positions for ticks, grid lines, and labels, and the labelling function

makeAxis' :: Ord x => (x -> Double) -> (Double -> x) -> ([x] -> [String]) -> ([x], [x], [x]) -> AxisData x Source #

Construct an axis given the positions for ticks, grid lines, and labels, and the positioning and labelling functions

axisToRenderable :: AxisT x -> Renderable x Source #

Construct a renderable from an axis, in order that it can be composed with other renderables and drawn. This does not include the drawing of the grid, which must be done separately by the renderAxisGrid function.

axisOverhang :: Ord x => AxisT x -> BackendProgram (Double, Double) Source #

Calculate the amount by which the labels extend beyond the ends of the axis.

vmap :: PlotValue x => (x, x) -> Range -> x -> Double Source #

A linear mapping of points in one range to another.

invmap :: PlotValue x => (x, x) -> Range -> Double -> x Source #

The inverse mapping from device co-ordinate range back to interesting values.

linMap :: (a -> Double) -> (a, a) -> Range -> a -> Double Source #

A linear mapping of points in one range to another.

invLinMap :: (Double -> a) -> (a -> Double) -> (a, a) -> Range -> Double -> a Source #

An inverse linear mapping of points from one range to another.

axisGridAtTicks :: AxisData x -> AxisData x Source #

Modifier to position grid lines to line up with the ticks

axisGridAtBigTicks :: AxisData x -> AxisData x Source #

Modifier to position grid lines to line up with only the major ticks

axisGridAtLabels :: AxisData x -> AxisData x Source #

Modifier to position grid lines to line up with the labels

axisGridHide :: AxisData x -> AxisData x Source #

Modifier to remove grid lines from an axis

axisLabelsOverride :: [(x, String)] -> AxisData x -> AxisData x Source #

Modifier to change labels on an axis

axis_viewport :: forall x. Lens' (AxisData x) (Range -> x -> Double) Source #

axis_tropweiv :: forall x. Lens' (AxisData x) (Range -> Double -> x) Source #

axis_ticks :: forall x. Lens' (AxisData x) [(x, Double)] Source #

axis_labels :: forall x. Lens' (AxisData x) [[(x, String)]] Source #

axis_grid :: forall x. Lens' (AxisData x) [x] Source #