PDA

View Full Version : Date Scale for X-Axis



mishani99
5th September 2011, 18:54
Dear all,

Using Qwt6.0.1, I want to construct a date axis with complete format, i.e showing the beginning of each year as major ticks, months as mid ticks and days as minor tick.
I know that i should write new QwtScaleDraw and QwtScaleDiv classes, but i really dont know how! Any one can help me please?

Uwe
6th September 2011, 06:10
As long as you know your scales you can set the ticks manually using QwtPlot::setAxisScaleDiv.
More difficult is the situation, when you want to use autoscaling, zooming, panning etc. Then you need to derive a new type of QwtScaleEngine.

Uwe

mishani99
6th September 2011, 08:32
Can I set different labels for different ticks? f.e. year for major ticks ("yyyy"), month name for medium ticks (f.e 'Aug') & day number ("dd") for minor ticks?

Uwe
6th September 2011, 11:40
Only major ticks can have labels,

Uwe