Skip to content
Snippets Groups Projects
Commit 9492f270 authored by Muhammad Raufu Miah's avatar Muhammad Raufu Miah
Browse files

Update ExperimentsRandomTestsVarSystemFixedAcceptanceRatioFixedTestSize.java

parent ed69a25d
No related branches found
No related tags found
No related merge requests found
...@@ -198,6 +198,8 @@ public class ExperimentsRandomTestsVarSystemFixedAcceptanceRatioFixedTestSize { ...@@ -198,6 +198,8 @@ public class ExperimentsRandomTestsVarSystemFixedAcceptanceRatioFixedTestSize {
XYChart chart5 = QuickChart.getChart("AcceptanceRatio=0.1, Test Size = 15", "Complexity", "Accuracy", seriesNames, xValues, new double[][]{accuracyLstar, accuracyRS, accuracyKV, accuracyOP, accuracyTTT}); XYChart chart5 = QuickChart.getChart("AcceptanceRatio=0.1, Test Size = 15", "Complexity", "Accuracy", seriesNames, xValues, new double[][]{accuracyLstar, accuracyRS, accuracyKV, accuracyOP, accuracyTTT});
new SwingWrapper(chart5).displayChart(); new SwingWrapper(chart5).displayChart();
printXYChartPairs(chart5);
} }
...@@ -291,6 +293,32 @@ public class ExperimentsRandomTestsVarSystemFixedAcceptanceRatioFixedTestSize { ...@@ -291,6 +293,32 @@ public class ExperimentsRandomTestsVarSystemFixedAcceptanceRatioFixedTestSize {
return 0; return 0;
} }
public static void printXYChartPairs(XYChart chart) {
System.out.println("Chart: " + chart.getTitle());
// Get all series in the chart
List<XYSeries> seriesList = chart.getSeriesMap().values().stream().collect(Collectors.toList());
// Iterate over each series
for (XYSeries series : seriesList) {
System.out.println("Series: " + series.getName());
// Get x and y data
double[] xData = series.getXData();
double[] yData = series.getYData();
// Ensure x and y data are of the same size
if (xData.length != yData.length) {
System.out.println("Mismatch in data size for series: " + series.getName());
continue;
}
// Print (x, y) pairs
for (int i = 0; i < xData.length; i++) {
System.out.println("(" + xData[i] + ", " + yData[i] + ")");
}
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment