-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Easily render histograms with Chart -- @package chart-histogram @version 0.4.3 module Numeric.Histogram type Range a = (a, a) -- | 'binBounds a b n' generates bounds for n bins spaced linearly -- between a and b binBounds :: RealFrac a => a -> a -> Int -> [Range a] -- | 'histValues a b n vs' returns the bins for the histogram of -- vs on the range from a to b with n -- bins histValues :: RealFrac a => a -> a -> Int -> [a] -> Vector (Range a, Int) -- | 'histValues a b n vs' returns the bins for the weighted histogram of -- vs on the range from a to b with n -- bins histWeightedValues :: RealFrac a => a -> a -> Int -> [(Double, a)] -> Vector (Range a, Double) -- | 'histWithBins bins xs' is the histogram of weighted values xs -- with bins histWithBins :: (Num w, RealFrac a) => Vector (Range a) -> [(w, a)] -> Vector (Range a, w) module Graphics.Rendering.Chart.Plot.Histogram data PlotHist x y PlotHist :: String -> Int -> Vector x -> Bool -> Maybe (x, x) -> Bool -> FillStyle -> LineStyle -> (Double -> Int -> y) -> PlotHist x y -- | Plot title _plot_hist_title :: PlotHist x y -> String -- | Number of bins _plot_hist_bins :: PlotHist x y -> Int -- | Values to histogram _plot_hist_values :: PlotHist x y -> Vector x -- | Don't attempt to plot bins with zero counts. Useful when the y-axis is -- logarithmically scaled. _plot_hist_no_zeros :: PlotHist x y -> Bool -- | Override the range of the histogram. If Nothing the range of -- _plot_hist_values is used _plot_hist_range :: PlotHist x y -> Maybe (x, x) -- | Plot vertical lines between bins _plot_hist_drop_lines :: PlotHist x y -> Bool -- | Fill style of the bins _plot_hist_fill_style :: PlotHist x y -> FillStyle -- | Line style of the bin outlines _plot_hist_line_style :: PlotHist x y -> LineStyle -- | Normalization function _plot_hist_norm_func :: PlotHist x y -> Double -> Int -> y -- | 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. histToPlot :: (RealFrac x, Num y, Ord y) => PlotHist x y -> Plot x y -- | The default style is an unnormalized histogram of 20 bins. defaultPlotHist :: PlotHist x Int -- | defaultPlotHist but with real counts defaultFloatPlotHist :: PlotHist x Double -- | defaultPlotHist but normalized such that the integral of the -- histogram is one. defaultNormedPlotHist :: PlotHist x Double plot_hist_title :: Lens' (PlotHist x_a7Bw y_a7Bx) String plot_hist_bins :: Lens' (PlotHist x_a7Bw y_a7Bx) Int plot_hist_values :: Lens' (PlotHist x_a7Bw y_a7Bx) (Vector x_a7Bw) plot_hist_no_zeros :: Lens' (PlotHist x_a7Bw y_a7Bx) Bool plot_hist_range :: Lens' (PlotHist x_a7Bw y_a7Bx) (Maybe (x_a7Bw, x_a7Bw)) plot_hist_drop_lines :: Lens' (PlotHist x_a7Bw y_a7Bx) Bool plot_hist_line_style :: Lens' (PlotHist x_a7Bw y_a7Bx) LineStyle plot_hist_fill_style :: Lens' (PlotHist x_a7Bw y_a7Bx) FillStyle plot_hist_norm_func :: Lens (PlotHist x_a7Bw y_a7Bx) (PlotHist x_a7Bw y_a9Q0) (Double -> Int -> y_a7Bx) (Double -> Int -> y_a9Q0) instance Default (PlotHist x Int)