public void initialize(Object[] xData,
                           Object[] yData,
                           Object[] zData) {

        this.xValues = new Double[xData.length];
        this.yValues = new Double[yData.length];
        this.zValues = new Double[zData.length];

        // We organise the data with the following assumption:
        // 1) the data are sorted by x then y
        // 2) that the data will be represented by a rectangle formed by
        //    using x[i+1], x, y[j+1], and y.
        // 3) we march along the y-axis at the same value of x until a new 
        //    value x is found at which point we will flag the index 
        //    where x[i+1]<>x[i]

        Vector tmpVector = new Vector(); //create a temporary vector
        double x = 1.123452e31; // set x to some arbitary value (used below)
        for (int k = 0; k < this.xValues.length; k++) {
            if (xData[k] != null) {
                Number xNumber;
                if (xData[k] instanceof Number) {
                    xNumber = (Number) xData[k];
                }
                else if (xData[k] instanceof Date) {
                    this.dateAxis[0] = true;
                    Date xDate = (Date) xData[k];
                    xNumber = new Long(xDate.getTime()); //store data as Long
                }
                else {
                    xNumber = new Integer(0);
                }
                this.xValues[k] = new Double(xNumber.doubleValue()); 
                    // store Number as Double

                // check if starting new column
                if (x != this.xValues[k].doubleValue()) {
                    tmpVector.add(new Integer(k)); //store index where new 
                                                   //column starts
                    x = this.xValues[k].doubleValue(); 
                                             // set x to most recent value
                }
            }
        }

        Object[] inttmp = tmpVector.toArray();
        this.xIndex = new int[inttmp.length];  // create array xIndex to hold 
                                               // new column indices

        for (int i = 0; i < inttmp.length; i++) {
            this.xIndex[i] = ((Integer) inttmp[i]).intValue();
        }
        for (int k = 0; k < this.yValues.length; k++) { // store y and z axes 
                                                        // as Doubles
            this.yValues[k] = (Double) yData[k];
            if (zData[k] != null) {
                this.zValues[k] = (Double) zData[k];
            }
        }
    }