diff --git a/modules/hist/TPavePainter.mjs b/modules/hist/TPavePainter.mjs index be01540af..9d4ee36d1 100644 --- a/modules/hist/TPavePainter.mjs +++ b/modules/hist/TPavePainter.mjs @@ -1389,10 +1389,10 @@ class TPavePainter extends ObjectPainter { } else if ((opt === 'postitle') || painter.isDummyPos(pave)) { const st = gStyle, fp = painter.getFramePainter(); if (st && fp) { - const midx = st.fTitleX, y2 = st.fTitleY; + const midx = st.fTitleX, y2 = st.fTitleY, fsz = st.fTitleFontSize; let w = st.fTitleW, h = st.fTitleH; - if (!h) h = (y2 - fp.fY2NDC) * 0.7; + if (!h) h = Math.max((y2 - fp.fY2NDC) * 0.7, (fsz < 1) ? 1.1 * fsz : 1.1 * fsz / fp.getFrameWidth()); if (!w) w = fp.fX2NDC - fp.fX1NDC; if (!Number.isFinite(h) || (h <= 0)) h = 0.06; if (!Number.isFinite(w) || (w <= 0)) w = 0.44;