public void plotVandI(){
        // Fill data arrays
        double [][] data = PlotGraph.data(4, this.numberOfPoints);

        double increment = this.segmentLength/(double)(this.numberOfPoints-1);

        data[0][0] = 0.0D;
        data[2][0] = 0.0D;
        for(int i=1; i<this.numberOfPoints; i++){
            data[0][i] = data[0][i-1] + increment;
            data[2][i] = data[2][i-1] + increment;
        }
        for(int i=0; i<this.numberOfPoints; i++){
            double[] output = this.voltageAndCurrentAsReal(data[0][i]);
            data[1][i] = output[0];
            data[3][i] = output[1];
        }


        data[4][0] = 0.0D;
        data[6][0] = 0.0D;
        data[4][1] = data[0][this.numberOfPoints/2];
        data[6][1] = data[0][this.numberOfPoints/2];
        data[4][2] = data[0][this.numberOfPoints-1];
        data[6][2] = data[0][this.numberOfPoints-1];

        data[5][0] = data[1][0];
        data[7][0] = data[3][0];
        data[5][1] = data[1][this.numberOfPoints/2];
        data[7][1] = data[3][this.numberOfPoints/2];
        data[5][2] = data[1][this.numberOfPoints-1];
        data[7][2] = data[3][this.numberOfPoints-1];

        // Plot data
        PlotGraph pg = new PlotGraph(data);
        int[] lineOpt = {3, 3, 0, 0};
        pg.setLine(lineOpt);
        int[] pointOpt = {0, 0, 1, 2};
        pg.setPoint(pointOpt);
        pg.setXaxisLegend("distance / metres");
        pg.setYaxisLegend("Voltage / V and Current / A");
        pg.plot();
    }