List of usage examples for weka.gui.visualize MatrixPanel setInstances
public void setInstances(Instances newInst)
From source file:com.sliit.graph.ScatterPlotMatrix.java
/** * Perform a named user request//from ww w . j a va 2 s . co m * * @param request a string containing the name of the request to perform * @exception IllegalArgumentException if request is not supported */ public void performRequest(String request) { if (request.compareTo("Show plot") == 0) { try { // popup matrix panel if (!m_framePoppedUp) { m_framePoppedUp = true; final MatrixPanel vis = new MatrixPanel(); vis.setInstances(m_visualizeDataSet); final javax.swing.JFrame jf = new javax.swing.JFrame("Visualize"); jf.setSize(800, 600); jf.getContentPane().setLayout(new BorderLayout()); jf.getContentPane().add(vis, BorderLayout.CENTER); jf.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { jf.dispose(); m_framePoppedUp = false; } }); jf.setVisible(true); m_popupFrame = jf; } else { m_popupFrame.toFront(); } } catch (Exception ex) { ex.printStackTrace(); m_framePoppedUp = false; } } else { throw new IllegalArgumentException(request + " not supported (ScatterPlotMatrix)"); } }