0

I am plotting a 3d plot in MATHEMATICA using plot3d . On the z-axis, I am getting numbers like 2.*10^5. How to get rid of this decimal point just after 2? Below is the part of the code, I think I need to change something there, but I don't know how exactly (maybe somewhere in ticks statement):

ticks[min_, max_, n_] := Transpose[Function[z, {z, Function[x,
       ScientificForm[N@x]] /@ z}]@FindDivisions[{min, max}, n]]

m = 50;
n = 5;

po = Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -m, m}, {y, -m, m}, 
  Boxed -> False, Ticks -> {Automatic, Automatic, ticks[#1, #2, n] &},
   ColorFunction -> "LightTemperatureMap", 
  AxesLabel -> {Style[\[Xi], Bold, Black], 
    Style[\[Tau], Bold, Black]}, LabelStyle -> {Black, Bold, 14}, 
  PlotLabel -> Style["(d)", Bold, 24], PlotRange -> All, Mesh -> None]
Chris Degnen
  • 8,443
  • 2
  • 23
  • 40
Miracles
  • 21
  • 7
  • Already asked an answered on [Mathematica.SE]: http://mathematica.stackexchange.com/q/5369/121 -- please ask your future *Mathematica* questions there. – Mr.Wizard Feb 18 '14 at 22:27

1 Answers1

0
ticks[min_, max_, n_] := Transpose[Function[z, {z, Function[x,
       ScientificForm[N@x /. (0. -> 0), 
        NumberPoint -> If[IntegerQ[x] &&
           Union[Rest@IntegerDigits@x] == {0}, "", "."]]] /@ z}]@
   FindDivisions[{min, max}, n]]

m = 50;
n = 5;

po = Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -m, m}, {y, -m, m}, 
  Boxed -> False, Ticks -> {Automatic, Automatic, ticks[#1, #2, n] &},
   ColorFunction -> "LightTemperatureMap", 
  AxesLabel -> {Style[\[Xi], Bold, Black], 
    Style[\[Tau], Bold, Black]}, LabelStyle -> {Black, Bold, 14}, 
  PlotLabel -> Style["(d)", Bold, 24], PlotRange -> All, Mesh -> None]

enter image description here

Chris Degnen
  • 8,443
  • 2
  • 23
  • 40