I'm trying to change to plot a sphere using RegionPlot3D and look at how the shape of the sphere changes when you use a logarithmic scale (or any nonlinear scale) for the x, y, and z axes. The code to produce a sphere on linear axes is:

RegionPlot3D[x^2 + y^2 + z^2 < 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
  Mesh -> False, PlotPoints -> 90]

This works fine, but I cannot seem to change the axes to a nonlinear scale. The CustomTicks package seems to be a good start, but I cannot seem to make it work for RegionPlot3D.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$
    – bbgodfrey
    Mar 18, 2015 at 2:23
  • $\begingroup$ It is not clear how you imagine to take the logarithm of the negative coordinates, say, in terms of x from -1 to 0? $\endgroup$ Mar 18, 2015 at 9:54

1 Answer 1


Logarithmic transformation is not a good idea, since the coordinates are varying partially in the negative domain, as I mentioned above. One can do this with the positive part of the sphere, if you like:

 x^2 + Exp[y]^2 + z^2 < 4, {x, 1, 2}, {y, 0, Log[2]}, {z, 1, 2}, 
 Mesh -> False, PlotPoints -> 90, 
 PlotRange -> {{0, 2}, {0, 2}, {0, 2}}, PlotStyle -> Opacity[0.3], 
 AxesLabel -> {"x", "y", "z"}]

where I only transformed the coordinate y. It should look as follows: enter image description here

Have fun!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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