Skip to main content
2 of 3
edited tags
Syed
  • 59.4k
  • 5
  • 40
  • 95

Stacking lines of text in a LineLegend?

I have the following LineLegend:

 Labeled[Plot[Exp[-0.03*t], {t, 0, 100}, Frame -> True], 
  LineLegend[{Blue, Green, Red}, {"a = test1
    a = test2", "a = test3 
    a = test4", "a = test5 
    a = test6"}, LegendLayout -> "Row", 
   LegendMarkers -> {{"\[FilledCircle]", 15}, {"\[FilledUpTriangle]", 
      15}, {"\[FilledSquare]", 15}}]]

Is there a way to stack, e.g., a = test1 and a = test2 on top of each other but keep the overall legend presented as a row? I tried to accomplish this by pressing the Enter key between a = test1 and a = test2, but not only did this not work but it also feels like a hacky way of solving the problem.

Is there an easy way to accomplish this?

MathIsHard
  • 579
  • 2
  • 6