I have a plot marker that I want to put a label on. The label is 3 lines (marker #, x coor, y coord). The bottom line is always inside the canvas/ plot window, but the top 2 lines go outside the frame and cannot be seen if the point is close to the y limits of the canvas. I'm not sure how to fix this, I've tried changing the alignment and it doesn't seem to help.


QwtPlotMarker *temp = marker;
temp->setXValue(xVal);
temp->setYValue(yVal);
temp->show();

QString label;
label.sprintf("Marker %d\nX: %.2f\nY: %.2f", i+1,xVal, yVal);
QwtText text;
text.setText(label);
temp->setLabel(text);