Graphics Reference
In-Depth Information
Figure . . Scatterplot matrix example
import javax.swing.JFrame;
import jp.jasp.jasplot.CSVDataModel;
import jp.jasp.jasplot.DataModel;
import jp.jasp.jasplot.MatrixDataModel;
import jp.jasp.jasplot.JasplotPanel;
import jp.jasp.jasplot.ScatterPlotModel;
import jp.jasp.jasplot.PlotModel;
public class ScatterPlotSample {
public ScatterPlotSample() {
DataModel data =
new CSVDataModel(new MatrixDataModel(),"../data/iris.csv");
PlotModel model = new ScatterPlotModel();
model.setDataModel(data);
JasplotPanel jasplot = new JasplotPanel(model);
JFrame jFrame = new JFrame("Jasplot Scatterplot Sample");
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.getContentPane().add(jasplot);
jFrame.setSize(500, 500);
jFrame.setVisible(true);
}
public static void main(String[] args) {
ScatterPlotSample sample = new ScatterPlotSample();
}
}
Search WWH ::




Custom Search