QCustomPlot Discussion and Comments

Title layoutReturn to overview

I have to fit many plots in a small space, so I need to optimize the space.
I am trying to display the title as close as possible to the plot, but when using small fonts, I am not able to get a good result.

This issue is much evident when using very small fonts and small window size, like if that space has a fixed amount of pixels.

I have tried adding to the code:

ui.plot->plotLayout()->setRowStretchFactor(0, 0.001);

But nothing really work.
Am I missing some layout element I have to change? (unfortunately in this forum I can't post a picture of the result)

setAutoMargins(QCP::msNone); // don't calc margins
setAutoMargins(QCP::msBottom | QCP::msRight); // just calc bottom and right margin

see https://www.jianshu.com/p/124d4ba5e816

Thanks Lancelot,
but margins are already at 0 and they affect only the space around the widget, not in between the title and the graph area (that are 2 raws of the the same widget)…

Any other idea?

Can you send a picture link?

Here you are : https://ddgobkiprc33d.cloudfront.net/0631cab2-9f66-415a-a95d-ce4a1c547b5b.png


see https://www.qcustomplot.com/documentation/AxisRectSpacingOverview.png

Thanks, it is what I was looking for!!!