Package smile.plot.swing
Class Histogram
java.lang.Object
smile.plot.swing.Histogram
A histogram is a graphical display of tabulated frequencies, shown as bars.
It shows what proportion of cases fall into each of several categories:
it is a form of data binning. The categories are usually specified as
non-overlapping intervals of some variable. The categories (bars) must
be adjacent. The intervals (or bands, or bins) are generally of the same
size, and are most easily interpreted if they are.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BarPlot
of
(double[] data) Creates a histogram plot.static BarPlot
of
(double[] data, double[] breaks, boolean prob) Creates a histogram plot.static BarPlot
Creates a histogram plot.static BarPlot
of
(double[] data, int k, boolean prob) Creates a histogram plot.static BarPlot
Creates a histogram plot.static BarPlot
of
(int[] data) Creates a histogram plot.static BarPlot
of
(int[] data, double[] breaks, boolean prob) Creates a histogram plot.static BarPlot
Creates a histogram plot.static BarPlot
of
(int[] data, int k, boolean prob) Creates a histogram plot.static BarPlot
Creates a histogram plot.
-
Constructor Details
-
Histogram
public Histogram()
-
-
Method Details
-
of
Creates a histogram plot. The number of bins will be determined by square-root rule and the y-axis will be in the probability scale.- Parameters:
data
- a sample set.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.k
- the number of bins.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.k
- the number of bins.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.breaks
- an array of size k+1 giving the breakpoints between histogram cells. Must be in ascending order.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.breaks
- an array of size k+1 giving the breakpoints between histogram cells. Must be in ascending order.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot. The number of bins will be determined by square-root rule and the y-axis will be in the probability scale.- Parameters:
data
- a sample set.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.k
- the number of bins.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.k
- the number of bins.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.breaks
- an array of size k+1 giving the breakpoints between histogram cells. Must be in ascending order.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-
of
Creates a histogram plot.- Parameters:
data
- a sample set.breaks
- an array of size k+1 giving the breakpoints between histogram cells. Must be in ascending order.prob
- if true, the y-axis will be in the probability scale. Otherwise, y-axis will be in the frequency scale.
-