Changing the z-scale in plots3d

Please format your code properly and make sure you read: Please read: make it easier to help you

Why not just restrict your z-axis to a different range?

using Plots; pyplot()

plot(size=(600,500))
X(r,theta) = r * cos(theta) 
Y(r,theta) = r * sin(theta)
Z(r,theta) = -r * r
my_cg = cgrad([:blue,:red,:yellow]);

thetas = range(0, stop=2*pi,   length=50)
rs       = range(0, stop=1, length=50)

xs = [X(r, theta) for theta in thetas, r in rs] 
ys = [Y(r, theta) for theta in thetas, r in rs]
zs = [Z(r, theta) for theta in thetas, r in rs]

surface!(xs, ys, zs,
label=false,xlims=(-1.5, 1.5), aspect_ratio=:auto,
xlabel="x", ylims=(-1.5,1.5), zlims=(-1.0, 0),c=my_cg)

1 Like