Smoothing Discontinuities in 3D Plots

Another way is to use a parametric surface.

S(x,z) = (x, sin(z)/sin(x), z)
x = 1e-3:.02:π/2
z = 0:.02:π/2
xs, ys, zs = [[p[i] for p in S.(x, z')] for i in 1:3];
using Plots; plotlyjs()
Plots.surface(xs,ys,zs, xlabel="x",ylabel="y",zlabel="z"; ylims=(0,2),colorbar=false)


.
.
In Makie this works but the y-axis cannot be properly tamed with ylims:

using Makie
fig = Makie.surface(xs,ys,zs, backgroundcolor=:black)
Makie.ylims!(fig.axis.scene, 0, 2.0)  # ylims not really working as expected

4 Likes