I’m creating a bunch of horizontal bar figures and I’d like that the bar width is same across all the figures. The problem is that each figure has a different legend (all positioned on top, above the plotting area), which require different amount of vertical space (one, two or three text heights). I don’t know how much space is required before rendering.
One solution might be to access the rendered legend and add the required margin space dynamically, but as far as I understand, I cannot get the info about the rendered layout using Python. Is that right?
Another would be to compute the required number of lines using the known text and font size, but that seems quite complicated.