# HoldForm gives tick labels in Plot without multiplication sign

When plotting in Mathematica, HoldForm[-5*10^6] gives $-5\: 10^6$ as the label of the axis, i.e. without the multiplication sign. How can I get $-5*10^6$ as output?

Edit: This problem only occurs due to the minus sign, without the minus sign the output is as desired.

There is a dilemma here: You want the * which can easily be done by displaying an expression as InputForm but then, even the ^ will be displayed because it is the way you input it.

So what you can use is

HoldForm[InputForm[-5*10^6]]


to display the multiplication. If this does not satisfy your needs, then simply use a string where you have typed the ^6 with Ctrl+Shift+6. This looks awful when I paste it here

"-5*\!$$\*SuperscriptBox[\(10$$, $$6$$]\)"


but it works in a plot. So when you want to use this as axes label in a plot, just do something like

Plot[x, {x, 0, 1},
AxesLabel -> {"-5*\!$$\*SuperscriptBox[\(10$$, $$6$$]\)", "NoMatter"}]


• I don't think this answers the posers question, as the particular values he wants to display will be generated automatically, not individually "by hand." – David G. Stork May 3 '15 at 16:24
• @LCF I have added an example on how to use it. Please, is it possible that you give a very small snippet of code where we see what you try to do? – halirutan May 3 '15 at 16:37
• Thank you very much, that solved my problem. – Thomas May 3 '15 at 16:38
• @David. Thanks for your help as well! And I am a "she", not a "he". ;) – Thomas May 3 '15 at 16:45
• On my Mac cmd+shift+6 doesn't work, whereas ctrl+^+6 works. I have no idea why, but thought I should mention it. +1 – C. E. May 3 '15 at 16:45

This works in v. 10.1:

Plot[Sin[x/1000], {x, 1, 20000},
Ticks -> {{{3000,
Text[Style["3 * \!$$\*SuperscriptBox[\(10$$, $$3$$]\)",
Italic]]}, {6000,
Text[Style["6 * \!$$\*SuperscriptBox[\(10$$, $$3$$]\)",
Italic]]}}, Automatic}]


though I must say I find the asterisk ugly, useless and old fashioned.