Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10439 > unrolled thread
| Started by | "Kevin J. McCann" <kjm@KevinMcCann.com> |
|---|---|
| First post | 2012-06-13 08:57 +0000 |
| Last post | 2012-06-14 09:28 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
ToString Awkwardness "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-06-13 08:57 +0000
Re: ToString Awkwardness Peter Breitfeld <phbrf@t-online.de> - 2012-06-14 09:28 +0000
| From | "Kevin J. McCann" <kjm@KevinMcCann.com> |
|---|---|
| Date | 2012-06-13 08:57 +0000 |
| Subject | ToString Awkwardness |
| Message-ID | <jr9kl4$3kg$1@smc.vnet.net> |
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?
Thanks,
Kevin
[toc] | [next] | [standalone]
| From | Peter Breitfeld <phbrf@t-online.de> |
|---|---|
| Date | 2012-06-14 09:28 +0000 |
| Message-ID | <jrcas5$do6$1@smc.vnet.net> |
| In reply to | #10439 |
"Kevin J. McCann" wrote:
> "f(x) = " <> ToString[8.71 10^-15]
Best (?) I think, is to use Row:
Row[{"f(x) = ", 8.71 10^-15}]
--
_________________________________________________________________
Peter Breitfeld | Bad Saulgau, Germany | http://www.pBreitfeld.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web