I have a QwtPlot where I want to place a label such that it is at a given coordinate on the y-axis but is always centered on the x-axis, even when the axis scale is updated. I'm really lame at this stuff, but I suspect that this would involve handling a "redraw()" method so that the x-position is recalculated. But I'm not sure.
If I want to draw the label at a gtiven coordinate in both x and y, I do the following:
Code:
text.setColor(text_color); QwtPlotMarker *label_mark; label_mark->setValue(x, y); label_mark->setLabel(text); label_mark->attach(thisPlot);
Simple. Is there something equally simple to have x instead be the center of the plot?