File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4097,12 +4097,13 @@ function drawTitle(gd, ax) {
40974097 // With ax._depth the initial drawing baseline is at the outer axis border (where the
40984098 // ticklabels are drawn). Since the title text will be drawn above the baseline,
40994099 // bottom/right axes must be shifted by 1 text line to draw below ticklabels instead of on
4100- // top of them, whereas for top/left axes, the first line would already be correctly drawn
4101- // before the ticklabels, but we need an offset for all subsequent lines.
4100+ // top of them, whereas for top/left axes, the first line would be drawn
4101+ // before the ticklabels, but we need an offset for the descender portion of the first line
4102+ // and all subsequent lines.
41024103 if ( ax . side === 'bottom' || ax . side === 'right' ) {
41034104 titleStandoff = ax . _depth + ax . title . standoff + fontSize * CAP_SHIFT ;
41044105 } else if ( ax . side === 'top' || ax . side === 'left' ) {
4105- titleStandoff = ax . _depth + ax . title . standoff + fontSize * ( extraLines * LINE_SPACING ) ;
4106+ titleStandoff = ax . _depth + ax . title . standoff + fontSize * ( MID_SHIFT + ( extraLines * LINE_SPACING ) ) ;
41064107 }
41074108 } else {
41084109 var isInside = insideTicklabelposition ( ax ) ;
You can’t perform that action at this time.
0 commit comments