|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.graph.jfreechart.Utils
public class Utils
Chart generation utility code around JFreeChart.
StackedAreaRenderer2,
DataSetBuilder,
ShiftedCategoryAxis| Field Summary | |
|---|---|
static double |
CHEBYSHEV_N
|
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static void |
adjustChebyshev(org.jfree.data.category.CategoryDataset dataset,
org.jfree.chart.axis.NumberAxis yAxis)
Adjusts the Y-axis so that abnormally large value won't spoil the whole chart by making everything look virtually 0. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static double CHEBYSHEV_N
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static void adjustChebyshev(org.jfree.data.category.CategoryDataset dataset,
org.jfree.chart.axis.NumberAxis yAxis)
The algorithm is based on Chebyshev's inequality, which states that given any number sequence, nore more than 1/(N^2) values are more than N x stddev away from the average.
So the algorithm is to set Y-axis range so that we can see all data points that are within N x stddev of the average. Most of the time, Cebyshev's inequality is very conservative, so it shouldn't do much harm.
When the algorithm does kick in, however, we can kick out at most 1 in N^2 data points. (So for example if N=3 then we can "fix" the graph as long as we only have less than 1/(3*3)=11.111...% bad data.
Also see issue #1246.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||