A better way of formatting equations in plot legends

Maybe this is a bit of trivial question, but here goes. I often think it is convenient to label a plot legend with an actual function - especially if it is a fit to some data or something.

Typically I will use something like:

PlotLegends ->Placed[{"y = mx + c"}, {Left, 0.86}, Pane[#, 450, Alignment ->Left] &]

Or make use of HoldForm[...] if I need pieces of the equation to look a certain way.

Which will work, but often renders in a way that the subscripts, in particular will merged with the fraction line/bar.

Does anyone have a better way of representing equations and formulae in a plot legend. Perhaps there is a way to use LaTeX?

• Have you seen PlotLegends -> "Expressions"? – b3m2a1 Mar 14 '17 at 18:47
• ...or TraditionalForm..., e.g., PlotLegends -> TraditionalForm[y = Subscript[m , 1] x + b]. – David G. Stork Mar 14 '17 at 18:55
• If you really want to insert LaTeX, you might want to check out MaTeX. – jjc385 Mar 14 '17 at 19:06
• Ah great! I didn't know about these functions - thanks all! – Q.P. Mar 14 '17 at 22:28