Mesh with Curtain
Examples
- Plotting the peaks function with curtain below.
::
let x = linspace(-3.0, 3.0, num: 50)
let (X, Y, Z) = meshgrid(x, x, peaks)
meshz(X, Y, Z)
Result:
.. image:: ../../../tests/imgs/mesh_curtain/mesh_curtain_1.png :align: center :width: 360
- Plotting the peaks function with color set by gradient in the :math:
x-direction, with color-bar shown.
::
let x = linspace(-3.0, 3.0, num: 50)
let (X, Y, Z) = meshgrid(x, x, peaks)
let (FX, FY) = gradient(Z, spacing_x: 6.0 / 49.0, spacing_y: 6.0 / 49.0)
meshz(X, Y, Z, FX)
colorbar()
Result:
.. image:: ../../../tests/imgs/mesh_curtain/mesh_curtain_2.png :align: center :width: 360
- Plotting with custom edge color.
::
let x = linspace(-5.0, 5.0, num: 30)
let (X, Y, Z) = meshgrid(x, x, {x: Float64, y: Float64 => y * sin(x) - x * cos(y)})
meshz(X, Y, Z).edge_color("b")
Result:
.. image:: ../../../tests/imgs/mesh_curtain/mesh_curtain_3.png :align: center :width: 360