* name of the y-Axis value series
*/
public static void dependencyGraph(String firstParam, String secondParam,
StatDataset dataset) {
Value firstValue = null;
Value secondValue = null;
for (Value v: Value.values()){
if (v.text().equals(firstParam))
firstValue = v;
else if (v.text().equals(secondParam))
secondValue = v;
}
if (firstValue == null){
System.out.println("Illegal value type parameter: " + firstParam);
return;
}else if (secondValue == null){
System.out.println("Illegal value type parameter: " + firstParam);
return;
}
XYSeries serie = new XYSeries(firstParam + " / " + secondParam);
double SCHWELL_VAL = 0.05;
for (int i = 0; i < dataset.numIntervals(); i++) {
StatInterval inter = dataset.getInterval(i);
for (StatEdge e : inter.getStatEdges()) {
double firstVal = e.getValue(firstValue);
double secondVal = e.getValue(secondValue);
if (firstVal >= SCHWELL_VAL && secondVal >= SCHWELL_VAL) {
serie.add(firstVal, secondVal);
}
}
}
XYSeriesCollection dataCol = new XYSeriesCollection(serie);
JFreeChart chart = ChartFactory.createScatterPlot(
"Dependency Scatter Plot", firstValue.text() + " " + firstValue.unit(),
secondValue.text() + " " + secondValue.unit(), dataCol,
PlotOrientation.HORIZONTAL, true, true, false);
chart.addSubtitle(new TextTitle("Each dot represents the value combination of one edge\n" +
"Only non-zero values are considered"));
ChartFrame frame = new ChartFrame("Dependency Scatter Plot", chart);
frame.setIconImage(Toolkit.getDefaultToolkit().getImage(