# writing numbers inside a plot using epilog

I need to write infidelity number $$\bar{F}=6.82\times 10^{-6}$$ inside a plot. I tried using Epilog with TeXForm but could not succeed. It prints $$\frac{1}{10^6}$$ instead of $$10^{-6}$$. Any help? Thanks.

• I didn't get why do you need TeXForm, but what you want can be done as simple as: Plot[Sin[x],{x,0,1}, Epilog -> Text[Row[{OverBar[F], "\[ThinSpace]=\[ThinSpace]", 6.82/10^6}],{0.5,0.5}]]. – Alx May 10 at 12:47
• Thanks. I was using TeXForm because it gives me a nice $\times$ sign. And I would prefer $10^{-6}$ instead of taking it into the denominator (due to lack of vertical space inside the figure). – user72617 May 10 at 14:47
• TeXForm does not output $\times$. It might output \times, but not $\times$. It is unclear what you mean. Do you want to display TeX code? TeXForm produces TeX code. Or do you want to display formatted math? I wrote my answer with the latter in mind, assuming that your question is about how to format the result, not about how to use Epilog or Text. – Szabolcs May 10 at 16:26

To expand on the other answers, using Inset and MaTeX

<< MaTeX
LaTeXStuff = MaTeX["\\bar F = 6.45\\times 10^{-6}"];
Plot[Sin[x], {x, 0, 2 Pi}, Epilog -> Inset[LaTeXStuff, {4, .5}]]


You can use Inset like this:

f = 6.82*^-6;

inset = Inset[
Style[StringForm["F = ", ScientificForm[f]], 14],
Scaled[{.65, .75}], Scaled[{.5, .5}], Scaled[.3]
];

Plot[Sin[x], {x, 0, 2 Pi}, Epilog -> inset]


Kind regards,

David

Method 1:

• Type in a string such as "x".
• Select the x only. Convert to TraditionalForm (on macOS, Command-Shift-T)
• Press Left-Arrow, then delete the x and start typing: F Ctrl-7 _ Right-Arrow 6.82 Esc * Esc 10 Ctrl-6 -6 Right-Arrow

Method 2:

TraditionalForm@HoldForm[OverBar[F] == 6.45*^-6]


Method 3:

Use MaTeX.

<< MaTeX

MaTeX["\\bar F = 6.45\\times 10^{-6}"]