MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: make 1. x 10^-10 read 10^-1

Rob Peterson  wrote:
||That silly "1 x" in front of a power of ten sure does waste graphics
||space.  Can anyone tell me how to format the numbers along an axis?
||Thanks for any help, Rob
|Something like the following might help:
|Plot[funct,  {x, xmin, xmax}, ticks->{{10^3, Superscript[10,3]}, {10^6,
|Superscript[10,6]}, {10^9, Superscript[10,9]}} ]
|Ted, thanks a lot for the suggestion.  I have actually read a lot in the
|mma book but mostly the book tells me nothing.  The little they mention 
about labels
|and tick marks, I simply can't understand.  Anyhow, I attempted your 
suggestion and
|here is what I got:
|   ..........
|   ..........
|   ..........
|The last paragraph is the error message from mma.  I tried LogPlot, no
|help.  Can you tell what I did wrong?

Yeh I had some syntax errors in  "ticks->.........."

Well I couldn't find a simple solution.
However, I think I found a some what long way to do just what you want.
see below:

              (*  Make a Plot. *)
plt=Plot[x^2/Log[x], {x, 10^9, 10^23}, DisplayFunction->Identity];

             (*  This tests wether (x) of the form 1. 10^n_Integer.  *)
If[Part[MantissaExponent[x], 1]==0.1, True, False]

             (*  I will use this new label when PowerTenQ is True.  *)
Superscript[10, Part[MantissaExponent[x], 2]-1]

             (*  This ensures I don't show a coefficient for (1.x 10^n)   *)
(*  Make a plot with new numbers on tick marks.  *)
Show[plt,Ticks->newtks, DisplayFunction->$DisplayFunction]

Out[]=  -Graphics-
             ------ figure not shown ---------

If you really like this you can put it in a package.

If you don't understand how it works let me know.
I can explain.

Ted Ersek
ersek_ted%pax1a at

  • Prev by Date: Mma 3.0 printing
  • Next by Date: ListPlot3D
  • Previous by thread: RE: make 1. x 10^-10 read 10^-1
  • Next by thread: Mathematica Development Opportunities