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) {
4097
4097
// With ax._depth the initial drawing baseline is at the outer axis border (where the
4098
4098
// ticklabels are drawn). Since the title text will be drawn above the baseline,
4099
4099
// 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.
4102
4103
if ( ax . side === 'bottom' || ax . side === 'right' ) {
4103
4104
titleStandoff = ax . _depth + ax . title . standoff + fontSize * CAP_SHIFT ;
4104
4105
} 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 ) ) ;
4106
4107
}
4107
4108
} else {
4108
4109
var isInside = insideTicklabelposition ( ax ) ;
You can’t perform that action at this time.
0 commit comments