protected XYDataset createDataset() {
//        System.out.println("Create Dataset of" + textX);
        final XYSeries seriesR = new XYSeries(title[1]);
        final XYSeries seriesG = new XYSeries(title[2]);
        final XYSeries seriesB = new XYSeries(title[3]);
        Integer countPixel[] = new Integer[256];
        for (int i = 0; i < 256; i++) {
            countPixel[i] = 0;
            for (int j = 0; j < this.pixelR.length; j++) {
                if (this.pixelR[j] == i) {
                    countPixel[i]++;
                }

            }
            seriesR.add(i, countPixel[i] / (this.pixelR.length * 1.0d));
        }
        for (int i = 0; i < 256; i++) {
            countPixel[i] = 0;
            for (int j = 0; j < this.pixelG.length; j++) {
                if (this.pixelG[j] == i) {
                    countPixel[i]++;
                }
            }
            seriesG.add(i, countPixel[i] / (this.pixelG.length * 1.0d));
        }
        for (int i = 0; i < 256; i++) {
            countPixel[i] = 0;
            for (int j = 0; j < this.pixelB.length; j++) {
                if (this.pixelB[j] == i) {
                    countPixel[i]++;
                }
            }
            seriesB.add(i, countPixel[i] / (this.pixelB.length * 1.0d));
        }
        final XYSeriesCollection dataSeries = new XYSeriesCollection();
        dataSeries.addSeries(seriesR);
        dataSeries.addSeries(seriesB);
        dataSeries.addSeries(seriesG);

        return dataSeries;
    }