Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to print the expression $A[x] = 8020.6596 \times 1.055^x$ as is on a 2D graphic. I included the line

Graphics[Text[HoldForm[A[x] = 8020.6596 \[Times] 1.055^x],{2,0}]]

in the graphics call, but the first constant insists on printing as $8020.66$. How can I fix this problem?

share|improve this question

Using NumberForm:

Graphics[{Inset[A[x] = NumberForm[8020.6596, 10]*1.055^x, {0, 0}]}]
share|improve this answer
    
This works, but you can't really use it along with, say, HoldForm. So if for example I wanted to output $x^{1/3} + 8020.6596\times 1.055^x$, I can't enclose the whole thing inside a HoldForm and still put the number inside a NumberForm. Why does this have to be so difficult, he whined? – rogerl Dec 19 '13 at 22:54

You can use strings for such things. You can use fractional spaces to adjust spacing, style text using the Format menu, etc. This does't copy here very well but it is simple in a Notebook:

enter image description here

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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