1
$\begingroup$

I'm plotting an hemisphere with

radius = 5;
Height = 0.2;
SphericalPlot3D[ radius, { θ, 0, π/2}, { ϕ, 0, 2 π}, 
                 BoxRatios -> { 1, 1, ((0.5 Height)/(radius) + 0.03)}]

and I'm using BoxRatios to flatten the hemisphere so that it has a "height" of 0.2.
Is it possible to manually write/show the $z$-axis values so the visible range is not { 0, radius}
but { 0, 0.2}?

$\endgroup$
  • 1
    $\begingroup$ Why not just plot the ellipsoid? SphericalPlot3D[h r/Sqrt[r^2 Cos[θ]^2 + h^2 Sin[θ]^2], {θ, 0, π/2}, {ϕ, 0, 2 π}] $\endgroup$ – Simon Woods Apr 14 '14 at 16:09
  • $\begingroup$ @SimonWoods: thank you, what you've written is very interessing. I don't know much about formulas with polar coordinates, that's why I can't use well SphericalPlot3D...is there a site where they're all listed? So that I can learn more... $\endgroup$ – Lory Lory Apr 15 '14 at 7:55
  • $\begingroup$ @Kuba : yes, I've just confirmed the answers. They're what I need. No matter if it looks flattened, it's more important to show certain values on the z-axis...I know I was asking for "strange" things...but it's the first time I've approached to mathematica and I'm making a mess! thank you anyway $\endgroup$ – Lory Lory Apr 15 '14 at 7:58
  • $\begingroup$ @LoryLory ok, thank you ;) $\endgroup$ – Kuba Apr 15 '14 at 8:02
  • $\begingroup$ @LoryLory, MathWorld is quite good for that kind of thing, there is also Wikipedia of course. $\endgroup$ – Simon Woods Apr 15 '14 at 9:10
3
$\begingroup$

If I understand you correctly you want to show the label "0.2" at the $z$-value 5.

The option Ticks allows you to do this. Here is an example:

 Plot3D[ 5 Sin[x y], { x, 0, π}, { y, 0, π}, 
         Ticks -> { Automatic, Automatic, {-5, -3, 0, {5, "0.2"}}}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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