Constructor and Description |
---|
BarPlot(double[] data)
Constructor.
|
BarPlot(double[][] data)
Constructor.
|
BarPlot(int[] data)
Constructor.
|
BarPlot(int[][] data)
Constructor.
|
BarPlot(java.lang.String[] description,
double[] data)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getToolTip(double[] coord)
Returns a optional tool tip for the object at given coordinates.
|
double |
getWidth()
Returns the width of bar.
|
void |
paint(Graphics g)
Draw the component with given graphics object.
|
static PlotCanvas |
plot(double[]... data)
Create a plot canvas with the bar plot of given data.
|
static PlotCanvas |
plot(double[] data)
Create a plot canvas with the bar plot of given data.
|
static PlotCanvas |
plot(double[] data,
java.lang.String[] labels)
Create a plot canvas with the bar plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[]... data)
Create a plot canvas with the bar plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[] data)
Create a plot canvas with the bar plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[] data,
java.lang.String[] labels)
Create a plot canvas with the bar plot of given data.
|
getID, getToolBar, setID
public BarPlot(int[] data)
public BarPlot(double[] data)
public BarPlot(java.lang.String[] description, double[] data)
public BarPlot(int[][] data)
public BarPlot(double[][] data)
public double getWidth()
public java.lang.String getToolTip(double[] coord)
Plot
getToolTip
in class Plot
coord
- the logical coordinates of current mouse position.public void paint(Graphics g)
Shape
public static PlotCanvas plot(double[] data)
data
- a vector of which values will determine the heights of bars.public static PlotCanvas plot(java.lang.String id, double[] data)
id
- the id of the plot.data
- a vector of which values will determine the heights of bars.public static PlotCanvas plot(double[] data, java.lang.String[] labels)
data
- a vector of which values will determine the heights of bars.labels
- the labels for each bar.public static PlotCanvas plot(java.lang.String id, double[] data, java.lang.String[] labels)
id
- the id of the plot.data
- a vector of which values will determine the heights of bars.labels
- the labels for each bar.public static PlotCanvas plot(double[]... data)
data
- a n x 2 matrix of which data[][0] determine the location of
bars and data[][1] determine the heights of bars. data[][0] will also be
used as the labels. For best view, data[][0] should be monotonic.public static PlotCanvas plot(java.lang.String id, double[]... data)
id
- the id of the plot.data
- a n x 2 matrix of which data[][0] determine the location of
bars and data[][1] determine the heights of bars. data[][0] will also be
used as the labels. For best view, data[][0] should be monotonic.