Hello,

I have a regular plot with a spectrogram (with title, axis ticks, etc...).

I need to render the plot canvas (without borders, axes, or anything else) to a QImage of a specific size (e.g. 512x512), for using it in QOpenGLTexture.
The goal is to map the spectrogram image directly to a rectangle in OpenGL, with no empty spaces.

I'm having trouble using QwtPlotRenderer for this task. The standard render() renders too much and there are empty spaces in canvas around the spectrogram as well. renderCanvas() requires a scale map which is rather confusing to me.

Is there some easier way I'm missing?

Thanks,
Alexander