AxesLabel from expression
- To: mathgroup at smc.vnet.net
- Subject: [mg103838] AxesLabel from expression
- From: Elmar Nubbemeyer <elmar.nubbemeyer at googlemail.com>
- Date: Thu, 8 Oct 2009 07:52:53 -0400 (EDT)
Hi,
I am trying to construct an AxesLabel by using a combination of
strings and previously defined variables. I have:
mode = 1 (*this is changed ever so often*)
Switch[mode,
0, sscript = "cert",
1, sscript = "auc",
2, sscript = "muc",
3, sscript = "adist",
4, sscript = "mdist"]
plabel=Superscript["p",sscript]
olabel=Superscript["o",sscript]
I do this so I can, in this case, place the label "E(p^auc), E(o^auc)"
on the Y-axis, where "^" of course means that the contents of the
variable sscript is shown as a superscript of p or o.
To do this in the Plot (2D), I tried different ways to define
AxesLabel, and none of them worked:
AxesLabel -> {"x", Print["E(", plabel, "),E(", olabel, ")"]}
gives me what I want, but three times, row by row, like in a loop.
AxesLabel -> {"x", "E(" <> ToString[plabel] <> "),E(" <> ToString
[plabel] <>")"}
removes the superscript formatting, and leads to a label: E(auc p), E
(auc o)
AxesLabel -> {"x", "E("plabel] "),E("olabel ")"}
doesn't work either, it returns: )), E(E(p^auc o^auc
Now I have run out of ideas on how to accomplish this. Any help is
greatly appreciated.