or to shorten it, e.g. "super long axis title [unit]" -> "super l...". The issue is that the plot pixel size is much larger than the actual axis and I'd like to avoid recomputing and/or adding fudge factors to compensate for this.
Some questions:
How to obtain the axes' rect size information?
Could the suppression/shortening of axis title labels become a default feature? If yes:
Would it be possible to (optionally) align the axis title label to the right and add these options as flags to enum ImPlotAxisFlags_ {...}? This latter common for scientific plots and/or when only units (e.g. '[GeV/c]', '[UTC]', ...) are being displayed.
Any help/advice would be much appreciated!
EDIT:
I found the following workaround for adjusting the axis title length:
First, thanks for your great library! :+1:
I may have found a bug/missing feature in ImPlot.
If the rendered axis title widths are larger than the plot axis widths they may overlap neighbouring widgets, e.g.:
My present workaround consists of estimating the axis title size and either suppressing (zero-sized string)
or to shorten it, e.g.
"super long axis title [unit]"
->"super l..."
. The issue is that the plot pixel size is much larger than the actual axis and I'd like to avoid recomputing and/or adding fudge factors to compensate for this.Some questions:
enum ImPlotAxisFlags_ {...}
? This latter common for scientific plots and/or when only units (e.g. '[GeV/c]', '[UTC]', ...) are being displayed.Any help/advice would be much appreciated!
EDIT: I found the following workaround for adjusting the axis title length:
and once the axis is setup the computation of the axis width/height in pixel (works after the second frame draw):
If someone has an easier/cleaner/more integrated solution ...thanks in advance.