Package smile.plot.swing
Class Histogram3D
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.Histogram3D
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
ConstructorDescriptionHistogram3D
(double[][] data, int xbins, int ybins, boolean prob, Color[] palette) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns the lower bound of data.double[]
Returns the upper bound of data.static Histogram3D
of
(double[][] data) Creates a 3D histogram plot.static Histogram3D
of
(double[][] data, int nbins, boolean prob) Creates a 3D histogram plot.static Histogram3D
Creates a 3D histogram plot.static Histogram3D
Creates a 3D histogram plot.void
Draws the shape.
-
Constructor Details
-
Histogram3D
Constructor.- Parameters:
data
- a sample set.xbins
- the number of bins on x-axis.ybins
- the number of bins on y-axis.prob
- if true, the z-axis will be in the probability scale. Otherwise, z-axis will be in the frequency scale.palette
- the color palette.
-
-
Method Details
-
getLowerBound
public double[] getLowerBound()Description copied from class:Plot
Returns the lower bound of data.- Specified by:
getLowerBound
in classPlot
-
getUpperBound
public double[] getUpperBound()Description copied from class:Plot
Returns the upper bound of data.- Specified by:
getUpperBound
in classPlot
-
paint
Description copied from class:Shape
Draws the shape. -
of
Creates a 3D histogram plot.- Parameters:
data
- a sample set.
-
of
Creates a 3D histogram plot.- Parameters:
data
- a sample set.nbins
- the number of bins.palette
- the color palette.
-
of
Creates a 3D histogram plot.- Parameters:
data
- a sample set.nbins
- the number of bins.prob
- if true, the z-axis will be in the probability scale. Otherwise, z-axis will be in the frequency scale.
-
of
Creates a 3D histogram plot.- Parameters:
data
- a sample set.nbins
- the number of bins.prob
- if true, the z-axis will be in the probability scale. Otherwise, z-axis will be in the frequency scale.palette
- the color palette.
-