# How to fix the order in which text appears in an axis label (V7) [duplicate]

One of the AxesLabel is "$:\text{log}|\Phi8b(u)|\color{Red}{\text{Red}}$".

Question: How to make it like: "$\color{Red}{\text{Red}}:\text{log}|\Phi8b(u)|$"?.

Φ8[u_] := Sin[u];

Φ8b[u_] := Sin[u] + 1/10;

Plot[{Log[Abs[Φ8[u]]], Log[Abs[Φ8b[u]]]}, {u, 0, 2*Pi},
PlotStyle -> {{Thick, Blue}, {Thick, Red, Dashed}},
AxesLabel ->
{u, {Style["Blue", {Blue, Bold}]*":log|Φ8(u)|",
Style["Red",  {Red, Bold}]*" :log|Φ8b(u)|"}}]
• Can you post the code as copy-paste-ble text. It would be easier to handle. – Mats Granvik Oct 19 '14 at 16:31
• @MatsGranvik Thanks for the reply! – mike Oct 19 '14 at 16:54
• This would be better suited at Mathematica.SE. – Ali Caglayan Oct 19 '14 at 16:55
• Try imposing order on your label (e.g. using Row): Row[{Style["Red", {Red, Bold}], ": log|f(u)|"}]. As it is, Mathematica reorders your expression by default. – Yves Klett Oct 20 '14 at 9:09
• As nobody has mentioned the elephant in the room, I will. You have expressed your label text as a multiplication and Mathematica is doing its normal lexical reordering on it. – m_goldberg Oct 20 '14 at 15:57

Plot[{Log[Abs[\[CapitalPhi]8[u]]], Log[Abs[\[CapitalPhi]8b[u]]]}, {u, 0, 2*Pi},
PlotStyle -> {{Thick, Blue}, {Thick, Red, Dashed}},
AxesLabel -> Row[{
Style["Blue", {Blue, Bold}], ":log|\[CapitalPhi]8(u)|",
Style["  Red", {Red, Bold}], ":log|\[CapitalPhi]8b(u)|"}]]

• Thanks a lot. It worked with Mathematica V7.0. – mike Oct 20 '14 at 16:30

I am not sure what the ultimate aim is but for motivation:

p = Plot[{Log[Abs[\[CapitalPhi]8[u]]],
Log[Abs[\[CapitalPhi]8b[u]]]}, {u, 0, 2*Pi},
PlotStyle -> {{Thick, Blue}, {Thick, Red, Dashed}},
PlotLegends -> LineLegend["Expressions"]];
rp = ReplacePart[
p, {2, 1, 2} ->
Inner[Style[#1, #2] &, p[[2, 1, 2]], {Blue, Red}, List]]

• Will this work with V7? – Yves Klett Oct 20 '14 at 12:10
• @YvesKlett doh...was too focused on changing LabelStyle completely missed the point...v7...in short NO...perhaps will motivate similar 'looking under hood':) – ubpdqn Oct 20 '14 at 12:15
• Eek... the old legends package was not all that easy to work with :D – Yves Klett Oct 20 '14 at 12:19
• This is exactly what I want. But it did not work for V7. Thanks a lot! – mike Oct 20 '14 at 16:32