public class Bar
extends Shape
Bars with heights proportional to the value.
-
Constructor Summary
Constructors
Bar(double[][] data,
double width,
Color color)
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Bar
public Bar(double[][] data,
double width,
Color color)
Constructor.
- Parameters:
data
- n x 2 array. data[][0] is the x coordinate of bar, data[][1] is the height of bar.
width
- the width of bars.
color
- the color of bars.
-
Method Details
-
paint
Description copied from class: Shape
Draws the shape.
- Specified by:
paint
in class Shape
-
of
public static Bar of(int[] x)
Creates a bar plot.
-
of
public static Bar of(double[] x)
Creates a bar plot.