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

Copyright | (c) Tim Docker 2006 2014
License | BSD-style (see chart/COPYRIGHT)
Safe Haskell | None
Language | Haskell98

Graphics.Rendering.Chart.Plot.Types

Description

Datatypes and functions common to the implementation of the various plot types.

Synopsis

- data Plot x y = Plot {
  - _plot_render :: PointMapFn x y -> BackendProgram ()
  - _plot_legend :: [(String, Rect -> BackendProgram ())]
  - _plot_all_points :: ([x], [y])
  }
- joinPlot :: Plot x y -> Plot x y -> Plot x y
- class ToPlot (a :: Type -> Type -> Type) where
  - toPlot :: a x y -> Plot x y
- mapXY :: PointMapFn x y -> (x, y) -> Point
- plot_render :: forall x y f. Functor f => ((PointMapFn x y -> BackendProgram ()) -> f (PointMapFn x y -> BackendProgram ())) -> Plot x y -> f (Plot x y)
- plot_legend :: forall x y f. Functor f => ([(String, Rect -> BackendProgram ())] -> f [(String, Rect -> BackendProgram ())]) -> Plot x y -> f (Plot x y)
- plot_all_points :: forall x y f. Functor f => (([x], [y]) -> f ([x], [y])) -> Plot x y -> f (Plot x y)

# Documentation

data Plot x y #

Interface to control plotting on a 2D area.

Constructors

Plot |
Fields _plot_render :: PointMapFn x y -> BackendProgram () Given the mapping between model space coordinates and device coordinates, render this plot into a chart. _plot_legend :: [(String, Rect -> BackendProgram ())] Details for how to show this plot in a legend. For each item the string is the text to show, and the function renders a graphical sample of the plot. _plot_all_points :: ([x], [y]) All of the model space coordinates to be plotted. These are used to autoscale the axes where necessary.

#### Instances

Instances details

ToPlot Plot # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Types Methods toPlot :: Plot x y -> Plot x y #

joinPlot :: Plot x y -> Plot x y -> Plot x y #

Join any two plots together (they will share a legend).

class ToPlot (a :: Type -> Type -> Type) where #

A type class abstracting the conversion of a value to a Plot.

Methods

toPlot :: a x y -> Plot x y #

#### Instances

Instances details

ToPlot PlotAnnotation # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Annotation Methods toPlot :: PlotAnnotation x y -> Plot x y #
ToPlot PlotCandle # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Candle Methods toPlot :: PlotCandle x y -> Plot x y #
ToPlot PlotErrBars # |
Instance details Defined in Graphics.Rendering.Chart.Plot.ErrBars Methods toPlot :: PlotErrBars x y -> Plot x y #
ToPlot PlotFillBetween # |
Instance details Defined in Graphics.Rendering.Chart.Plot.FillBetween Methods toPlot :: PlotFillBetween x y -> Plot x y #
ToPlot PlotHidden # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Hidden Methods toPlot :: PlotHidden x y -> Plot x y #
ToPlot PlotLines # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Lines Methods toPlot :: PlotLines x y -> Plot x y #
ToPlot PlotPoints # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Points Methods toPlot :: PlotPoints x y -> Plot x y #
ToPlot Plot # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Types Methods toPlot :: Plot x y -> Plot x y #
PlotValue z => ToPlot (AreaSpots z) # |
Instance details Defined in Graphics.Rendering.Chart.Plot.AreaSpots Methods toPlot :: AreaSpots z x y -> Plot x y #
(PlotValue z, PlotValue t, Show t) => ToPlot (AreaSpots4D z t) # |
Instance details Defined in Graphics.Rendering.Chart.Plot.AreaSpots Methods toPlot :: AreaSpots4D z t x y -> Plot x y #

mapXY :: PointMapFn x y -> (x, y) -> Point #

plot_render :: forall x y f. Functor f => ((PointMapFn x y -> BackendProgram ()) -> f (PointMapFn x y -> BackendProgram ())) -> Plot x y -> f (Plot x y) #

plot_legend :: forall x y f. Functor f => ([(String, Rect -> BackendProgram ())] -> f [(String, Rect -> BackendProgram ())]) -> Plot x y -> f (Plot x y) #

plot_all_points :: forall x y f. Functor f => (([x], [y]) -> f ([x], [y])) -> Plot x y -> f (Plot x y) #