PDA

View Full Version : change the pixel size of major interval in Qwt



daidaeee
25th June 2014, 08:42
In qwt, how to change the major interval size, for example, the interval widthof an histogram (in pixel) to make one axis more "compact".

Uwe
25th June 2014, 18:57
Like any other widget a QwtPlot returns a sizeHint() and a minimumSizeHint() to feed the Qt layout system. What geometry is calculated in the end is up to your layout, so if you want to have the plot smaller, configure your QLayout to make it smaller.

The only thing to take care of is the minimumSizeHint(), that depends on the size that is needed to display the tick labels without overlapping. Less major ticks usually means a smaller size hint.

Uwe