SetLineSpacing — Set spacing between lines of multi-line elements
$plot->SetLineSpacing($spc
)
SetLineSpacing
sets the number of pixels between lines
of a multi-line text element. Multiple lines can be specified in titles,
for example, by placing a newline between lines (for example: "Line 1\nLine
2"). Line spacing also affects the legend.
Line spacing apparently does not apply when using TrueType fonts, except for the legend. In the legend, SetLineSpacing spreads out the lines of the legend, and stretches the color boxes accordingly.
The default line spacing is 4 pixels.
Line spacing must be set before setting titles. This is because a title's height is calculated when the title text is set. You cannot have different line spacing values for different titles. If you are using SetLineSpacing, you need to call it exactly once, before setting any title text.