Problem

I have implemented the QwtPlotPanner for my plots to pan the plots around. However when I move the canvas using the panner with the axis tick labels turned on, it makes the plot look jumpy because of how the tick labels are drawn.

From what I have noticed when the tick label is large, it is centered under the tick mark. This centering cause the plot canvas to shrink so that the plot canvas physically becomes smaller and gap between the canvas and the right side is gapped (see the gapped_plot.png attachment below).

gapped_plot..png

Then when you pan the plot, the gap will go away as the axis tick label moves to the left or the right (see the nongapped_plot.png attachment below).

nongapped_plot..png

Panning the plot quickly makes it look like the plot is jumpy and will give you a headache after awhile.

Behind The Scenes
I am adjusting the plot to try and have the canvas and the scales line up. Maybe this is my problem?
Qt Code:
  1. QwtPlot::plotLayout()->setMargin(2);
  2. QwtPlot::plotLayout()->setAlignCanvasToScales(true);
To copy to clipboard, switch view to plain text mode 

Help Me!

My goal is to get the canvas to stay the same size always. That means that when the tick axis label is centered under the tick mark and the label would be clipped by the edge of the plot that I don't want it to show.

Has anyone else ran into this issue and can help me?