public class BarPlot extends Plot
| Constructor and Description |
|---|
BarPlot(Bar... bars)
Constructor.
|
BarPlot(Bar[] bars,
Legend[] legends)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Canvas |
canvas()
Returns a canvas of the plot.
|
double[] |
getLowerBound()
Returns the lower bound of data.
|
double[] |
getUpperBound()
Returns the upper bound of data.
|
static BarPlot |
of(double[] data)
Creates a bar plot.
|
static BarPlot |
of(double[][] data,
java.lang.String[] labels)
Creates a bar plot of multiple groups/colors.
|
static BarPlot |
of(int[] data)
Creates a bar plot.
|
void |
paint(Graphics g)
Draws the shape.
|
public BarPlot(Bar... bars)
public double[] getLowerBound()
PlotgetLowerBound in class Plotpublic double[] getUpperBound()
PlotgetUpperBound in class Plotpublic static BarPlot of(double[] data)
public static BarPlot of(int[] data)
public static BarPlot of(double[][] data, java.lang.String[] labels)
data - each row is a data set of bars (bar height).labels - the group label of data points.