Safe Haskell | None |
---|---|
Language | Haskell98 |
Graphics.Rendering.Chart.Plot.Histogram
Contents
Synopsis
- data PlotHist x y = PlotHist {
- _plot_hist_title :: String
- _plot_hist_bins :: Int
- _plot_hist_values :: [x]
- _plot_hist_no_zeros :: Bool
- _plot_hist_range :: Maybe (x, x)
- _plot_hist_drop_lines :: Bool
- _plot_hist_fill_style :: FillStyle
- _plot_hist_line_style :: LineStyle
- _plot_hist_norm_func :: Double -> Int -> y
- histToPlot :: (RealFrac x, Num y, Ord y) => PlotHist x y -> Plot x y
- defaultPlotHist :: PlotHist x Int
- defaultFloatPlotHist :: PlotHist x Double
- defaultNormedPlotHist :: PlotHist x Double
- histToBins :: (RealFrac x, Num y, Ord y) => PlotHist x y -> [((x, x), y)]
- plot_hist_title :: forall x y f. Functor f => (String -> f String) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_bins :: forall x y f. Functor f => (Int -> f Int) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_values :: forall x y f. Functor f => ([x] -> f [x]) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_no_zeros :: forall x y f. Functor f => (Bool -> f Bool) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_range :: forall x y f. Functor f => (Maybe (x, x) -> f (Maybe (x, x))) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_drop_lines :: forall x y f. Functor f => (Bool -> f Bool) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_line_style :: forall x y f. Functor f => (LineStyle -> f LineStyle) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_fill_style :: forall x y f. Functor f => (FillStyle -> f FillStyle) -> PlotHist x y -> f (PlotHist x y)
- plot_hist_norm_func :: forall x y1 y2 f. Functor f => ((Double -> Int -> y1) -> f (Double -> Int -> y2)) -> PlotHist x y1 -> f (PlotHist x y2)
Histograms
Constructors
PlotHist | |
Fields
|
histToPlot :: (RealFrac x, Num y, Ord y) => PlotHist x y -> Plot x 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.
defaultPlotHist :: PlotHist x Int #
The default style is an unnormalized histogram of 20 bins.
defaultFloatPlotHist :: PlotHist x Double #
defaultPlotHist
but with real counts
defaultNormedPlotHist :: PlotHist x Double #
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)] #
Obtain the bin dimensions of a given PlotHist
.
Accessors
plot_hist_title :: forall x y f. Functor f => (String -> f String) -> PlotHist x y -> f (PlotHist x y) #
plot_hist_values :: forall x y f. Functor f => ([x] -> f [x]) -> PlotHist x y -> f (PlotHist x y) #
plot_hist_no_zeros :: forall x y f. Functor f => (Bool -> f Bool) -> PlotHist x y -> f (PlotHist x y) #
plot_hist_range :: forall x y f. Functor f => (Maybe (x, x) -> f (Maybe (x, x))) -> PlotHist x y -> f (PlotHist x y) #
plot_hist_drop_lines :: forall x y f. Functor f => (Bool -> f Bool) -> PlotHist x y -> f (PlotHist x y) #
plot_hist_line_style :: forall x y f. Functor f => (LineStyle -> f LineStyle) -> PlotHist x y -> f (PlotHist x y) #