Am I using Box Plot correctly?
Posted: Thu Jun 19, 2008 3:49 am
Here is a very simple use of Box plot.
Why is the whisker showing up inside the box?
Am I doing something wrong? It seems like the bottom whisker is wrapped up and ending on the median.
Why is the whisker showing up inside the box?
Am I doing something wrong? It seems like the bottom whisker is wrapped up and ending on the median.
Code: Select all
package com.amd.ngeda.chart.teechart;
import javax.swing.JFrame;
import com.steema.teechart.TChart;
import com.steema.teechart.drawing.Color;
import com.steema.teechart.styles.Box;
public class TestBrokenBox {
/**
* @param args
*/
public static void main(String[] args) {
JFrame frame = new JFrame("HelloWorldSwing");
TChart teeChart = new TChart();
teeChart.setBackColor(new Color(255, 255, 255));
teeChart.getAspect().setView3D(false);
Box box = new Box(teeChart.getChart());
double[] yvals = new double[] { 9, 9, 9, 8, 8, 8, 7, 7, 6, 6 };
box.getYValues().setCount(yvals.length);
box.getYValues().setValues(yvals);
frame.getContentPane().add(teeChart);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}