plots-0.1.0.0: Diagrams based plotting library.

Copyright(C) 2016 Christopher Chalmers
LicenseBSD-style (see the file LICENSE)
MaintainerChristopher Chalmers
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Plots.Types.Boxplot

Contents

Description

A heat map is a graphical representation of data where the individual values contained in a matrix are represented as colours.

Synopsis

Adding box plots

boxPlot :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (BoxPlot v n) b, Foldable f) => f p -> State (Plot (BoxPlot v n) b) () -> m () #

Add a BoxPlot to the AxisState from a data set.

  myaxis = r2Axis &~
    boxPlot data1

Example

import Plots
import Plots.Types.Boxplot
mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)]
mydata2 = mydata1 & each . _1 *~ 0.5
mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5]
boxPlotAxis :: Axis B V2 Double
boxPlotAxis = r2Axis &~ do
   boxPlot mydata1 $ key "data 1"
   boxPlot mydata2 $ key "data 2"
   boxPlot mydata3 $ key "data 3"
boxPlotExample = renderAxis boxPlotAxis

boxPlot' :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (BoxPlot v n) b, Foldable f) => f p -> m () #

Make a BoxPlot and take a State on the plot to alter its options

Example

import Plots
import Plots.Types.Boxplot
boxPlotAxis' :: Axis B V2 Double
boxPlotAxis' = r2Axis &~ do
   boxPlot' mydata1
   boxPlot' mydata2
   boxPlot' mydata3
boxPlotExample' = renderAxis boxPlotAxis'

Fold variant boxplot

boxPlotOf :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (BoxPlot v n) b) => Fold s p -> s -> State (Plot (BoxPlot v n) b) () -> m () #

boxPlotOf' :: (v ~ BaseSpace c, PointLike v n p, MonadState (Axis b c n) m, Plotable (BoxPlot v n) b) => Fold s p -> s -> m () #

Boxplot type

data GBoxPlot v n a #

Instances

(Metric v, OrderedField n) => Enveloped (GBoxPlot v n a) # 

Methods

getEnvelope :: GBoxPlot v n a -> Envelope (V (GBoxPlot v n a)) (N (GBoxPlot v n a)) #

(Typeable * a, TypeableFloat n, Renderable (Path V2 n) b, (~) * n Double) => Plotable (GBoxPlot V2 n a) b # 

Methods

renderPlotable :: InSpace v n (GBoxPlot V2 n a) => AxisSpec v n -> PlotStyle b v n -> GBoxPlot V2 n a -> QDiagram b v n Any #

defLegendPic :: InSpace v n (GBoxPlot V2 n a) => PlotStyle b v n -> GBoxPlot V2 n a -> QDiagram b v n Any #

type V (GBoxPlot v n a) # 
type V (GBoxPlot v n a) = v
type N (GBoxPlot v n a) # 
type N (GBoxPlot v n a) = n

Box plot

type BoxPlot v n = GBoxPlot v n (Point v n) #

mkBoxPlotOf :: PointLike v n p => Fold s p -> s -> BoxPlot v n #

Create a boxplot using a fold and given data.

mkBoxPlot :: (PointLike v n p, Foldable f) => f p -> BoxPlot v n #

Draw a boxplot with the given data.

Lenses

fillBox :: HasBox a v n d => Lens' a Bool #