QCustomPlot Discussion and Comments

superimposing scatter plot on top of colormapReturn to overview

Two beginner questions

First Question

I have been able to create colormaps and to create scatterplots, however it seems that regardless of how I build them the colormap is sitting on top or overwriting the scatterplot.

customPlot ->addGraph();
customPlot ->graph(0)->setPen(pen);
customPlot ->graph(0)-> setData(x,y);
static QCPColorMap *colorMap = new QCPColorMap(customPlot->xAxis, ui->customPlot->yAxis);
colorMap->data()->setSize(nx, ny)

All I see is the colormap. If i reverse the sequence (B then A), same story.

Second Question
I would like to iterate and adapt the colormap leavint t

Sorry..accidentally submitted during preparation...

Second Question:

I would like to iterate and adapt the colormap sequentially, creating a simple animation, all the while leaving the scatterplot displayed on top.

What is the most sensible way to do this? Do I completely redraw the graphic or just change the data.

Question 1: i would use layers to make sure one is above the other properly.
Question 2: i'm assuming you would have to just change the data and tell qcustomplot to redraw.