Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10439

ToString Awkwardness

From "Kevin J. McCann" <kjm@KevinMcCann.com>
Newsgroups comp.soft-sys.math.mathematica
Subject ToString Awkwardness
Date 2012-06-13 08:57 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jr9kl4$3kg$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

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

csiph-web