QCustomPlot Discussion and Comments

Colormap with squaresReturn to overview

Hello !
I would like to represent a multi-pixel sensor's response (a camera in simple terms :) ) with a 9x9 colormap but I dont see how to get rid of the rectangles on the edges. My pixels are square not rectangles !!

Here's the code if you're interester in reproducing my issue :

QCustomPlot *plot = new QCustomPlot;
            plot -> addGraph();
            QCPColorMap *colorMap = new QCPColorMap(plot->xAxis, plot->yAxis);
            colorMap->data()->setSize(9, 9);
              colorMap->data()->setRange(QCPRange(0, 9), QCPRange(0, 9));
              for (int x=0; x<9; ++x)
                for (int y=0; y<9; ++y)
                  colorMap->data()->setCell(x, y, x-y);
              colorMap -> setInterpolate(false);
              //colorMap -> setTightBoundary(true);

I already thank those who'll read my thread and especially the one who'll spot the mistake.
Have a nice after-reading !

You may have a look at QCPAxis::setScaleRatio().

Something like:
colorMap->keyAxis()->setScaleRatio(colorMap->valueAxis(), 1);