});
}); */
  public static void main(String [] args) {    try {      if (args.length < 1) {	System.err.println("Usage : weka.gui.visualize.VisualizePanel "			   +"<dataset> [classfier] [dataset2]");	System.exit(1);      }      final javax.swing.JFrame jf = 	new javax.swing.JFrame("Weka Knowledge Explorer: Visualize");      jf.setSize(500,400);      jf.getContentPane().setLayout(new BorderLayout());      final VisualizePanel sp = new VisualizePanel();      sp.addActionListener(new ActionListener() {	public void actionPerformed(ActionEvent e) {	  System.err.println("Recieved a combo box change event");	}      });      jf.getContentPane().add(sp, BorderLayout.CENTER);      jf.addWindowListener(new java.awt.event.WindowAdapter() {	public void windowClosing(java.awt.event.WindowEvent e) {	  jf.dispose();	  System.exit(0);	}      });      //      jf.pack();      jf.setVisible(true);      if (args.length >= 1) {	System.err.println("Loading instances from " + args[0]);	java.io.Reader r = new java.io.BufferedReader(			   new java.io.FileReader(args[0]));	Instances i = new Instances(r);	i.setClassIndex(i.numAttributes()-1);	PlotData2D pd1 = new PlotData2D(i);		pd1.setPlotName("1st plot");	if (args.length > 1) {	  weka.classifiers.Classifier cl;	  cl = weka.classifiers.Classifier.forName(args[1],null);	  System.err.println("Building classifier");	  cl.buildClassifier(i);	  double [] preds = new double [i.numInstances()];	  for (int jj=0;jj<i.numInstances();jj++) {	    preds[jj] = cl.classifyInstance(i.instance(jj));	  }	  	  if (i.attribute(i.classIndex()).isNumeric()) {	    pd1.setPredictionsNumeric(true);	  } else {	    pd1.setPredictionsNumeric(false);	  }	  pd1.setPredictions(preds);	}	sp.setMasterPlot(pd1);	if (args.length == 3) {	  System.err.println("Loading instances from " + args[2]);	  java.io.Reader rr = new java.io.BufferedReader(				 new java.io.FileReader(args[2]));	  Instances ii = new Instances(rr);	  ii.setClassIndex(ii.numAttributes()-1);	  PlotData2D pd = new PlotData2D(ii);	  pd.setPlotName("2nd plot");	 	  pd.setCustomColour(Color.pink);	  sp.addPlot(pd);	}      }    } catch (Exception ex) {      ex.printStackTrace();      System.err.println(ex.getMessage());    }  }