3
$\begingroup$

Is it possible to change the font in LineLegend? In fact, I need a mathematical font (like Times) in this part.

$\endgroup$

1 Answer 1

9
$\begingroup$

You can use the option LabelStyle with suboptions FontFamily, FontSize, FontColor etc to set font properties:

LineLegend[{Red, Green, Blue}, {"red", "green", "blue"}, LegendLabel -> Style["legend", FontFamily -> "Arial", 32, Black], LabelStyle -> {FontFamily -> "Times New Roman", FontSize -> 24, FontColor -> Purple, FontSlant -> Italic, FontWeight -> "Heavy"}] 

enter image description here

For the options FontSize, FontColor, FontSlant, FontWeight, Wolfram language is able to infer the associated option if you provide only the values of these options:

LineLegend[{Red, Green, Blue}, {"red", "green", "blue"}, LegendLabel -> Style["legend", FontFamily -> "Arial", 32, Black], LabelStyle -> {FontFamily -> "Times New Roman", 24, Purple, Italic, Bold}] 

same picture

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.