I have a code which goes like this:
Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},
PlotLegends -> "Expressions"]
Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},
PlotLegends -> {"This is for x", "This is for 2x", "This is for 3x"}]
which produces the plots:
I need to write legends in such a way that it takes, say, 1st expression and then besides that it writes "This is for x" (same for 2nd and 3rd). How can we do this in Mathematica?
I tried with this code (not sure why 😀!):
Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},
PlotLegends -> {"Expressions", {"This is for x", "This is for 2x",
"This is for 3x"}}]
But, I am getting another set of legend down the figure:
How can one accomplish this?
Mathematica version: 12.1
Thanks in advance.