Class BarPlot
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.BarPlot
A barplot draws bars with heights proportional to the value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfigure()Returns a figure containing the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.legends()Returns the optional legend of shape.static BarPlotof(double[] data) Creates a bar plot.static BarPlotCreates a bar plot of multiple groups/colors.static BarPlotof(int[] data) Creates a bar plot.voidDraws the shape.
-
Constructor Details
-
BarPlot
-
BarPlot
-
-
Method Details
-
paint
-
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot- Returns:
- the lower bound of data.
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot- Returns:
- the upper bound of data.
-
legends
-
figure
-
of
Creates a bar plot.- Parameters:
data- the data.- Returns:
- a bar plot.
-
of
Creates a bar plot.- Parameters:
data- the data.- Returns:
- a bar plot.
-
of
-