Chart-1.9.4: A library for generating 2D Charts and Plots
Safe HaskellNone
LanguageHaskell98

Graphics.Rendering.Chart.Plot.Histogram

Synopsis

Histograms

data PlotHist x y Source #

Constructors

PlotHist 

Fields

Instances

Instances details
Default (PlotHist x Int) Source # 
Instance details

Defined in Graphics.Rendering.Chart.Plot.Histogram

Methods

def :: PlotHist x Int #

histToPlot :: (RealFrac x, Num y, Ord y) => PlotHist x y -> Plot x y Source #

Convert a PlotHist to a Plot

N.B. In principle this should be Chart's ToPlot class but unfortunately this does not allow us to set bounds on the x and y axis types, hence the need for this function.

defaultPlotHist :: PlotHist x Int Source #

The default style is an unnormalized histogram of 20 bins.

defaultFloatPlotHist :: PlotHist x Double Source #

defaultPlotHist but with real counts

defaultNormedPlotHist :: PlotHist x Double Source #

defaultPlotHist but normalized such that the integral of the histogram is one.

histToBins :: (RealFrac x, Num y, Ord y) => PlotHist x y -> [((x, x), y)] Source #

Obtain the bin dimensions of a given PlotHist.

Accessors

plot_hist_bins :: forall x y. Lens' (PlotHist x y) Int Source #

plot_hist_values :: forall x y. Lens' (PlotHist x y) [x] Source #

plot_hist_range :: forall x y. Lens' (PlotHist x y) (Maybe (x, x)) Source #

plot_hist_norm_func :: forall x y y. Lens (PlotHist x y) (PlotHist x y) (Double -> Int -> y) (Double -> Int -> y) Source #