I want to have a plot with scales around the canvas making a box with ticks inside the canvas.
To do that, I use 4 QwtPlotScaleItem, and setBorderDistance(0). In order to have ticks inside the canvas, I switch the alignment of the scales, meaning that my bottom scale with have TopScale alignment, my left scale will have RightScale alignment, and so on.
For the top and left scales, everything works fine.
However, for the 2 others, the backbone is out the canvas and not displayed. When I setBorderDistance(1) for these 2 scales, it works well on the screen. But if I set a pen width of 1 or more (the default is 0), then when I export as pdf these 2 scales are misaligned(see attached file, with pen width = 2)


Is it possible there is a rounding issue that makes the function setBorderDistance(0) not behave properly? Or am I missing something obvious here ?