return currentPlot.jplot(x.getv(), y.getv());
}
public static JFrame jplot(String pieChartName, String[] categories, double [] values)
{
DefaultPieDataset data = new DefaultPieDataset();
for (int k=0; k<categories.length; k++)
data.setValue(categories[k], new Double(values[k]));
JFreeChart pieChart = ChartFactory.createPieChart(pieChartName, data, false, false, false);
pieChart.setTitle("Category Plot "+pieChartName);
JFrame pieFrame = new ChartFrame(pieChartName, pieChart);
pieFrame.pack();
pieFrame.setVisible(true);