I also have problems regarding the mapping of the elements when using custom PlotItems:

In my application I visualize found peaks by labels which are painted on the top part of the plot canvas. Therefore I created a class that inherits QwtPlotItem and I implemented the draw() function accordingly. On screen everything works fine and I like the result very much:

screenshot.jpg

Then I export the plot as graphics file using the following code:

Qt Code:
  1. QwtPlotRenderer renderer;
  2. renderer.renderDocument(par->spectrum_plot, fileName, QSizeF(200, 150), 150);
To copy to clipboard, switch view to plain text mode 

And that is the result:

exported.jpg

As you can see, the labels are aligned as if the plot still had screen resolution. The higher resolution of the output image is not taken into account. That's why the labels are displaced.

The problem with the much too small axis persists as well.

Does anyone have an idea how to solve this?

Many thanks in advance