Example usage for weka.gui.visualize VisualizePanel VisualizePanel

List of usage examples for weka.gui.visualize VisualizePanel VisualizePanel

Introduction

In this page you can find the example usage for weka.gui.visualize VisualizePanel VisualizePanel.

Prototype

public VisualizePanel() 

Source Link

Document

Constructor

Usage

From source file:cyber009.udal.mains.WekaUDAL.java

public void showPlot(Instances dataSet) {
    PlotData2D p2D = new PlotData2D(dataSet);
    p2D.setPlotName(dataSet.relationName());
    VisualizePanel vp = new VisualizePanel();
    vp.setName(dataSet.relationName());/*from   w  w  w  . j  av a2 s .  c o  m*/
    try {
        vp.addPlot(p2D);
        JFrame frame = new JFrame(dataSet.relationName());
        frame.setSize(600, 600);
        frame.setVisible(true);
        frame.getContentPane().setLayout(new BorderLayout());
        frame.getContentPane().add(vp, BorderLayout.CENTER);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    } catch (Exception ex) {
        Logger.getLogger(WekaUDAL.class.getName()).log(Level.SEVERE, null, ex);
    }
}