private void outputData(){

        // dimension arrays
        this.nData = this.xAndYvalues.size()/2;
        System.out.println("nData " + this.nData);
        this.xPositions = new double[this.nData];
        this.yPositions = new double[this.nData];
        this.xPosPixel = new double[this.nData];
        this.yPosPixel = new double[this.nData];

        int ii = 0;
        // Convert pixel values to doubles
        for(int i=0; i<this.nData; i++){
            int xx = this.xAndYvalues.get(ii);
            ii++;
            int yy = this.xAndYvalues.get(ii);
            ii++;
            this.xPosPixel[i] =  (double)xx;
            this.yPosPixel[i] =  (double)this.windowHeight - (double)yy;
        }

        // Check if graph axes are to be rotated and, if so, rotate
        this.checkForRotation();

        // Scale the pixel values to true values
        for(int i=0; i<this.nData; i++){
            this.xPositions[i] =  this.lowXvalue + (this.xPosPixel[i] - this.lowXaxisXpixel)*(this.highXvalue - this.lowXvalue)/(this.highXaxisXpixel - this.lowXaxisXpixel);
            this.yPositions[i] =  this.lowYvalue + (this.yPosPixel[i] - this.lowYaxisYpixel)*(this.highYvalue - this.lowYvalue)/(this.highYaxisYpixel - this.lowYaxisYpixel);
        }

        // Check for identical points and remove one of all pairs of such points
        if(this.noIdentical)this.checkForIdenticalPoints();

        // Request to increase number of data points using a cubic spline interpolation
        String message = "Do you wish to increase number of data points\n";
        message += "using cubic spline interpolation?";
        boolean opt = Db.noYes(message);
        if(opt){
            this.nInterpPoints = Db.readInt("Enter number of interpolation points", 200);
            interpolation();
            this.interpOpt = true;
        }
        else{
            if(plotOpt)plotDigitisedPoints();
        }

        // Output digitized data
        this.fout.println("Digitization output for DigiGraph class (M. T. Flanagan Java Library)");
        this.fout.println();
        this.fout.dateAndTimeln();
        this.fout.println();
        this.fout.println("Image used in the digitization:                 " +  this.imageName);
        this.fout.println("Location of the image used in the digitization: " +  this.imagePath);
        this.fout.println();
        this.fout.println("X-axis skew angle    " + Fmath.truncate(this.angleXaxis, 4) + " degrees");
        this.fout.println("Y-axis skew angle    " + Fmath.truncate(this.angleYaxis, 4) + " degrees");
        this.fout.println("Axes mean skew angle " + Fmath.truncate(this.angleMean, 4) + " degrees");
        if(this.rotationDone){
            this.fout.println("Axes and all points rotated to bring axes to normal position");
        }
        else{
            this.fout.println("No rotation of axes or points performed");
        }
        this.fout.println();
        this.fout.println("Number of digitized points: " + this.nData);
        this.fout.println();
        this.fout.printtab("X-value");
        this.fout.println("Y-value");

        for(int i=0; i<this.nData; i++){
            this.fout.printtab(Fmath.truncate(this.xPositions[i], trunc));
            this.fout.println(Fmath.truncate(this.yPositions[i], trunc));
        }
        this.fout.println();

        // Output interpolated data if calculated
        if(this.interpOpt){
            this.fout.println();
            this.fout.println("Interpolated data (cubic spline)");
            this.fout.println();
            this.fout.println("Number of interpolated points: " + this.nInterpPoints);
            this.fout.println();
            this.fout.printtab("X-value");
            this.fout.println("Y-value");
            for(int i=0; i<this.nInterpPoints; i++){
                this.fout.printtab(Fmath.truncate(this.xInterp[i], trunc));
                this.fout.println(Fmath.truncate(this.yInterp[i], trunc));
            }
        }

        this.fout.close();
    }