My battles with Qwt Scales continues!

I have a major problem in my code, and I'm not really sure where to look so I am looking for any kinds of help, even if I have to debug into the Qwt code itself. I'm not sure of an easy way to produce a sample program. Anyway, thanks for any advice!

I have some code which prints a spectrogram aligned with a qwt axis scaled by time. I have this line of code which correctly produces ten ticks along the bottom of my plot: setAxisScale (whichAxis, start, stop, (stop - start) / 10.0); // for ten ticks!

Here's the problem: when the start/stop is an even multiple of ten, I get a perfect plot (screenshot 1). However, when the code is a multiple of five, and not ten, I get the second screen shot. You can see the axis goes off the left and the right. Worse still, the plot is fine on the screen, but it is only when I print!

Screen Shot 2012-10-11 at 3.09.05 PM.jpgScreen Shot 2012-10-11 at 3.09.22 PM.jpg

Anyway, does anyone have any ideas?

Thanks,
Joey