Example usage for org.jfree.data.contour NonGridContourDataset NonGridContourDataset

List of usage examples for org.jfree.data.contour NonGridContourDataset NonGridContourDataset

Introduction

In this page you can find the example usage for org.jfree.data.contour NonGridContourDataset NonGridContourDataset.

Prototype

public NonGridContourDataset(String seriesName, Object[] xData, Object[] yData, Object[] zData, int numX,
        int numY, int power) 

Source Link

Document

Constructor for NonGridContourDataset.

Usage

From source file:edu.umn.natsrl.evaluation.ContourPlotter.java

private ContourDataset createDataset() {
    //        final Double[] oDoubleX = this.xIndex.toArray(new Double[this.xIndex.size()]);
    //        final Double[] oDoubleY = this.yIndex.toArray(new Double[this.yIndex.size()]);
    //        final Double[] oDoubleZ = this.zValue.toArray(new Double[this.zValue.size()]);

    Double[] oDoubleX = new Double[xIndex.size()];
    Double[] oDoubleY = new Double[yIndex.size()];
    Double[] oDoubleZ = new Double[zValue.size()];

    for (int i = 0; i < oDoubleX.length; i++) {
        oDoubleX[i] = xIndex.get(i);// www  .ja va  2s . c  o  m
        oDoubleY[i] = yIndex.get(i);
        oDoubleZ[i] = zValue.get(i);
    }

    //        for(int i=0; i<oDoubleX.length; i++) {
    //         double x= oDoubleX[i];
    //         double y= oDoubleY[i];
    //         double z= oDoubleZ[i];
    //            System.out.println("x="+x+", y="+y+", z="+z);
    //        }
    ContourDataset data = null;
    //        System.out.println("size=("+oDoubleX.length+", "+oDoubleY.length+", "+oDoubleZ.length+")");
    data = new NonGridContourDataset("Contouring", oDoubleX, oDoubleY, oDoubleZ, numY, numX, power);

    //        int idx = 1;
    //        for(Number n : data.getZValues()) {
    //            System.out.println("["+idx+"] Data=" + n.doubleValue());
    //            idx++;
    //        }

    //        System.out.println("Z min="+data.getMinZValue()+", max="+data.getMaxZValue());        
    return data;
}