I’m trying to draw a plot using QWT without any title or axis labels. Not drawing the title seems easy, all you have to do is not pass it in a title, or if there already is one, just give it an empty string (like this):
ui->plot->setAxisTitle(QwtPlot::xBottom, "");
ui->plot->setAxisTitle(QwtPlot::yLeft, "");
But the actual labels (inside the axisScale property) are drawn by default (going from 0 to 1000 in both x and y). However even though I can change the way it looks, I can’t remove it altogether.
So is there any way to draw a qwt plot without any axis labels or titles?
If you don’t want the scale or the labels, this will work:
If you want to show the scales with no labels, you can implement your own
QwtScaleDrawobject that returns an emptyQwtTextobject for all of the labels:There may be a better way, but this is one I could think of.