0
$\begingroup$

This question already has an answer here:

I am using ListPlot:

 ListPlot[dpl[[All, 1, {1, 3}]], Frame -> True,
 FrameLabel -> {SubsuperscriptBox["\[Xi]", "in", ""] // DisplayForm,
 "Inefficiency \[CapitalDelta]"}, 
 Joined -> True,
 PlotLabel -> {SubsuperscriptBox["\[Xi]", "out", ""] // DisplayForm} ~~
 ToString[dpl[[1, 2, 2]]]] 

However this gives me a poor y-label: '$\{\xi_{out}\} \~\~ 7$'. How do I get this code to display '$\xi_{out}=7$'?

$\endgroup$

marked as duplicate by Jens, Bob Hanlon, MarcoB, Oleksandr R., J. M. is away Jun 30 '15 at 3:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ I don't understand the question. Please show a self-contained example, explain what you expect and how that differs from what you get. The PlotLabel -> { ... // DisplayForm} ~~ ToString[...] part of the code doesn't seem to make sense, and it's not clear to me what you are trying to achieve with ~~, which is an operator for use with string patterns. $\endgroup$ – Szabolcs Jun 29 '15 at 15:33
  • 1
    $\begingroup$ Maybe you are looking for PlotLabel -> (TraditionalForm@HoldForm[Subscript[\[Xi], out] = #] &)[ 7]. $\endgroup$ – Szabolcs Jun 29 '15 at 15:36
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$ – bbgodfrey Jun 29 '15 at 15:48
  • $\begingroup$ As well as Szabolcs does I do not understand the question, but what I understand is that you (a) use the BoxLanguage incorrectly and (b) in the place where it is easier not to use it, but to make use of more simple tools. In particular, instead of {SubsuperscriptBox["\[Xi]", "in", ""] // DisplayForm you may type Esc+x+Esc then Ctrl+- and then in . You will get what you need, no difficulties. Or also PlotLabel->Style["y=7"] where y=Esc+x+Esc then Ctrl+- and then out You did not explain what is dpl, hence I cannot help more. $\endgroup$ – Alexei Boulbitch Jun 29 '15 at 16:18
1
$\begingroup$

I think you are working too hard; i.e, using lower-level forms than you need to. Let Mathematica do the heavy lifting.

plt = Range @ 10;
ListPlot[plt,
  Frame -> True,
  FrameLabel -> {Subscript["ξ", "in"], "Inefficiency Δ"}, 
  Joined -> True,
  PlotLabel -> Row[{Subscript["ξ", "out"], "  ", plt}]]

plot

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.