1
$\begingroup$

How can I change the font size and font style for the line legends?

 Plot[{xe, xi}, {y, 1, 10}, 
    AspectRatio -> 1, 
   Frame -> True, 
   FrameLabel -> {"x", "y"}, 
   FrameStyle -> Directive[Bold, Black, (FontSize -> 16)], 
   PlotLegends -> Placed[LineLegend[{"xe", "xi"}], {0.85, 0.85}], 
   PlotStyle -> {Blue, Directive[Red, Dashed]}]
$\endgroup$
  • $\begingroup$ Use Style[#, "Arial", Blue, 20,Italic] & /@ {"xe", "xi"} for common settings, or Style["xe","TR",Black,12] for individual legend. $\endgroup$ – Alx Dec 20 '19 at 15:10
  • $\begingroup$ where is the place of Style? when i put it inside the linelegend i don't get the answer. $\endgroup$ – user68857 Dec 20 '19 at 15:24
2
$\begingroup$

Too long for a comment.

Plot[{xe, xi}, {y, 1, 10}, Frame -> True, AspectRatio -> 1, 
 FrameLabel -> {"x", "y"}, 
 FrameStyle -> Directive[Bold, Black, (FontSize -> 16)], 
 PlotLegends -> 
  Placed[LineLegend[
    Style[#, "Arial", Blue, 20] & /@ {"xe", "xi"}], {0.85, 0.85}], 
 PlotStyle -> {Blue, Directive[Red, Dashed]}]

enter image description here

Plot[{xe, xi}, {y, 1, 10}, Frame -> True, AspectRatio -> 1, 
 FrameLabel -> {"x", "y"}, 
 FrameStyle -> Directive[Bold, Black, (FontSize -> 16)], 
 PlotLegends -> 
  Placed[LineLegend[{Style["xe", "TR", Blue, 20], 
     Style["xi", Red, "Arial", 16, Italic]}], {0.85, 0.85}], 
 PlotStyle -> {Blue, Directive[Red, Dashed]}]

enter image description here

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thank you very much for your help dear @Alx $\endgroup$ – user68857 Dec 20 '19 at 19:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.