Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10456 > unrolled thread
| Started by | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| First post | 2012-06-14 09:33 +0000 |
| Last post | 2012-06-14 09:33 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: ToString Awkwardness Bill Rowe <readnews@sbcglobal.net> - 2012-06-14 09:33 +0000
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Date | 2012-06-14 09:33 +0000 |
| Subject | Re: ToString Awkwardness |
| Message-ID | <jrcb4p$drm$1@smc.vnet.net> |
On 6/13/12 at 4:55 AM, kjm@KevinMcCann.com (Kevin J. McCann) wrote:
>I have several plots with annotation that includes parameter values.
>I am using ToString inside a Text command to do this, and all is
>well unless the values are small so that the results are in
>scientific notation. When this happens, I get something like this:
>"f(x) = " <> ToString[8.71 10^-15]
>f(x) = -15
>8.71 10
>Which is a bit awkward looking in the plot. Upon further
>investigation, I looked at the FullForm of the above and got:
>"f(x) = -15\n8.71 10"
>So, I see why the output "looks funny". The exponent is treated
>separately from the 10. Any suggestions for nicer looking output?
Try something like:
Plot[x, {x, 0, 1}, Frame -> True, FrameTicks -> None,
Epilog -> {Text["f(x)=", {.6, .5}, {1, 0}],
Text[TraditionalForm[8.71 10^-15], {.61, .5}, {-1, 0}], Red,
PointSize[.02], Point@{.5, .5}}]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web