PDA

View Full Version : Display only first an last value on axis



Markus_AC
2nd November 2011, 10:12
Is there a possibility to display only the first and the last value on an x-axis?
And there is another special need: these values are date / time values, which should be displayed in the lines.

I also thought about using the y-axis labels. But I don't know how to place these labels under the axis.
See my attached screenshot for an example, how the first x-value should be displayed. The last value should look accordingly to this.

7067

Uwe
2nd November 2011, 10:40
Assuming you mean tick labels, when you talk about values: tick labels are displayed for major ticks only.

So a simple solution is to set your scale with QwtPlot::setAxisScaleDiv(), where you set major ticks to the beginning and the end only.

Uwe

PS: Don't use the default constructor of QwtScaleDiv() - the other constructors are o.k.