QCustomPlot Discussion and Comments

Hi all,

i'm trying to draw a cross on my plot at a specific position (in pixel in QCustomPlot widget).

To draw the plot, i'm using QCPGraph and 2 arrays (time and altitude for instance).

At time value, there is altitude value.

Is it possible to have coordinates (in pixels) of altitude value at this time value ?

Consider that i only know time value and array position of this value.

Thanks
Sylvain

Found. Used QCPTracer.

double x = QCPtracer->parentPlot()->xAxis->coordToPixel(QCPtracer->graph()->data()->values().at(index).key);
double y = QCPtracer->parentPlot()->yAxis->coordToPixel(QCPtracer->graph()->data()->values().at(index).value);