smile.plot
Class Histogram3D
- java.lang.Object
-
- smile.plot.Shape
-
- smile.plot.Plot
-
- smile.plot.Histogram3D
-
public class Histogram3D extends Plot
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
Constructors Constructor and Description Histogram3D(double[][] data)Constructor.Histogram3D(double[][] data, boolean prob)Constructor.Histogram3D(double[][] data, boolean prob, java.awt.Color[] palette)Constructor.Histogram3D(double[][] data, java.awt.Color[] palette)Constructor.Histogram3D(double[][] data, int nbins)Constructor.Histogram3D(double[][] data, int nbins, boolean prob)Constructor.Histogram3D(double[][] data, int nbins, boolean prob, java.awt.Color[] palette)Constructor.Histogram3D(double[][] data, int nbins, java.awt.Color[] palette)Constructor.Histogram3D(double[][] data, int xbins, int ybins)Constructor.Histogram3D(double[][] data, int xbins, int ybins, boolean prob)Constructor.Histogram3D(double[][] data, int xbins, int ybins, boolean prob, java.awt.Color[] palette)Constructor.Histogram3D(double[][] data, int xbins, int ybins, java.awt.Color[] palette)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[][]getHistogram()Get the frequencies/probabilities table.voidpaint(Graphics g)Draw the component with given graphics object.static PlotCanvasplot(double[][] data)Create a plot canvas with the histogram plot.static PlotCanvasplot(double[][] data, java.awt.Color[] palette)Create a plot canvas with the histogram plot.static PlotCanvasplot(double[][] data, int k)Create a plot canvas with the histogram plot of given data.static PlotCanvasplot(double[][] data, int k, boolean prob, java.awt.Color[] palette)Create a plot canvas with the histogram plot of given data.static PlotCanvasplot(double[][] data, int k, java.awt.Color[] palette)Create a plot canvas with the histogram plot of given data.static PlotCanvasplot(double[][] data, int xbins, int ybins)Create a plot canvas with the histogram plot of given data.static PlotCanvasplot(double[][] data, int xbins, int ybins, boolean prob, java.awt.Color[] palette)Create a plot canvas with the histogram plot of given data.static PlotCanvasplot(double[][] data, int xbins, int ybins, java.awt.Color[] palette)Create a plot canvas with the histogram plot of given data.-
Methods inherited from class smile.plot.Plot
getID, getToolBar, getToolTip, setID
-
-
-
-
Constructor Detail
-
Histogram3D
public Histogram3D(double[][] data)
Constructor.- Parameters:
data- a sample set.
-
Histogram3D
public Histogram3D(double[][] data, java.awt.Color[] palette)Constructor.- Parameters:
data- a sample set.palette- the color palette.
-
Histogram3D
public Histogram3D(double[][] data, boolean prob)Constructor.- Parameters:
data- a sample set.prob- if true, the z-axis will be in the probability scale. Otherwise, z-axis will be in the frequency scale.
-
Histogram3D
public Histogram3D(double[][] data, boolean prob, java.awt.Color[] palette)Constructor.- Parameters:
data- a sample set.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.
-
Histogram3D
public Histogram3D(double[][] data, int nbins)Constructor.- Parameters:
data- a sample set.nbins- the number of bins.
-
Histogram3D
public Histogram3D(double[][] data, int nbins, java.awt.Color[] palette)Constructor.- Parameters:
data- a sample set.nbins- the number of bins.palette- the color palette.
-
Histogram3D
public Histogram3D(double[][] data, int nbins, boolean prob)Constructor.- 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.
-
Histogram3D
public Histogram3D(double[][] data, int nbins, boolean prob, java.awt.Color[] palette)Constructor.- 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.
-
Histogram3D
public Histogram3D(double[][] data, int xbins, int ybins)Constructor.- Parameters:
data- a sample set.xbins- the number of bins on x-axis.ybins- the number of bins on y-axis.
-
Histogram3D
public Histogram3D(double[][] data, int xbins, int ybins, java.awt.Color[] palette)Constructor.- Parameters:
data- a sample set.xbins- the number of bins on x-axis.ybins- the number of bins on y-axis.palette- the color palette.
-
Histogram3D
public Histogram3D(double[][] data, int xbins, int ybins, boolean prob)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.
-
Histogram3D
public Histogram3D(double[][] data, int xbins, int ybins, boolean prob, java.awt.Color[] palette)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 Detail
-
paint
public void paint(Graphics g)
Description copied from class:ShapeDraw the component with given graphics object.
-
getHistogram
public double[][] getHistogram()
Get the frequencies/probabilities table.
-
plot
public static PlotCanvas plot(double[][] data)
Create a plot canvas with the histogram plot.- Parameters:
data- a sample set.
-
plot
public static PlotCanvas plot(double[][] data, java.awt.Color[] palette)
Create a plot canvas with the histogram plot.- Parameters:
data- a sample set.palette- the color palette.
-
plot
public static PlotCanvas plot(double[][] data, int k)
Create a plot canvas with the histogram plot of given data.- Parameters:
data- a sample set.k- the number of bins.
-
plot
public static PlotCanvas plot(double[][] data, int k, java.awt.Color[] palette)
Create a plot canvas with the histogram plot of given data.- Parameters:
data- a sample set.k- the number of bins.palette- the color palette.
-
plot
public static PlotCanvas plot(double[][] data, int k, boolean prob, java.awt.Color[] palette)
Create a plot canvas with the histogram plot of given data.- Parameters:
data- a sample set.k- the number of bins.prob- if true, the z-axis will be in the probability scale.palette- the color palette.
-
plot
public static PlotCanvas plot(double[][] data, int xbins, int ybins, boolean prob, java.awt.Color[] palette)
Create a plot canvas with the histogram plot of given data.- 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.palette- the color palette.
-
plot
public static PlotCanvas plot(double[][] data, int xbins, int ybins)
Create a plot canvas with the histogram plot of given data.- Parameters:
data- a sample set.xbins- the number of bins on x-axis.ybins- the number of bins on y-axis.
-
plot
public static PlotCanvas plot(double[][] data, int xbins, int ybins, java.awt.Color[] palette)
Create a plot canvas with the histogram plot of given data.- Parameters:
data- a sample set.xbins- the number of bins on x-axis.ybins- the number of bins on y-axis.palette- the color palette.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG