Can Mathematica display a PlotLabel as a multi-line system of equations with a left brace? Not a two-column step-wise function.
Hi Jay,
Can you please provide an example? What is “a two-column step-wise function”? For “a multi-line system of equations with a left brace” do you mean
f[x_] := Piecewise[{{Sin[x]/x, x < 0}, {1, x == 0}}, -x^2/100 + 1];
Plot[f[x], {x, -Pi, Pi}, PlotLabel -> f[x]]
You can provide any expression to PlotLabel, by default its TraditionalForm will be displayed.
Thanks, Rohit, for the quick reply. By “a multi-line system of equations with a left brace,” I meant something like this:

By “a two-column step-wise function,” I meant something like your example where the first column contains the functions and the next column contains their domains.
If you are familiar with LaTeX then you can use the MaTeX package for typesetting.
Needs["MaTeX`"];
label = MaTeX["\\left\\{
\\begin{array}{@{}ll@{}}
xy^2 = 5 \\\\
x^3 - y = 10 \\\\
y \\leq 0
\\end{array}\\right.", Magnification -> 1.25]
an use PlotLabel -> label.
I did a search on MSE and found this, which is much easier if you have a list of expressions.
That works, Rohit. Thanks. I’m not fluent in LaTex, but I will only need it rarely. So unless someone has a better idea, this solves the problem.
Years ago I found this solution to typeset systems of equation within Mathematica:
Grid[{{PasteButton[
DisplayForm[
StyleBox[
RowBox[{StyleBox["{", SpanMaxSize -> \[Infinity]],
GridBox[{{"\[Placeholder]"}, {"\[Placeholder]"}},
ColumnAlignments -> Left]}], ShowAutoStyles -> False]]],
PasteButton[
DisplayForm[
StyleBox[
RowBox[{StyleBox["{", SpanMaxSize -> \[Infinity]],
GridBox[{{"\[Placeholder]"}, {"\[Placeholder]"}, {"\
\[Placeholder]"}}, ColumnAlignments -> Left]}],
ShowAutoStyles -> False]]],
PasteButton[
DisplayForm[
StyleBox[
RowBox[{StyleBox["{", SpanMaxSize -> \[Infinity]],
GridBox[{{"\[Placeholder]"}, {"\[Placeholder]"}, {"\
\[Placeholder]"}, {"\[Placeholder]"}}, ColumnAlignments -> Left]}],
ShowAutoStyles -> False]]]}}, Spacings -> 0]
That’s great, Gianluca. Thumbs up. It looks good in TraditionalForm[] too. When I get time, I’ll put your code into a function. Maybe call it SystemOfEquations[{eq1,…,eq7}].
I have it installed as a palette in my system. I am glad it is useful for others too.
Jay,
Did you take a look at the MSE link at the bottom of my answer? It has several different solutions to this problem.
Yes, Rohit. I did check the MSE link. It looks like it is exactly on point. So thanks for the link. I had trouble following it. Most of the back and fort was discussing editing changes. So I was never clear on what the code was. It seemed to deal mostly with the PieceWise[] function. But I was not able to eliminate the second column using that function and didn’t find anything in the documentation that said that was possible.
Hi Jay,
Using the Format definition of bracket from that post
Format[bracket[obj_]] := Style[DisplayForm@RowBox[{"{", obj}], SpanMaxSize -> Infinity]
label = {Defer[xy^2 = 5], Defer[x^3 - y = 10], Defer[y <= 0]} // Column // bracket
or
label = HoldForm /@ Unevaluated@{xy^2 = 5, x^3 - y = 10, y <= 0} // Column // bracket
Then use it for PlotLabel


