# Surface command in Julia

**URL:** <https://discourse.julialang.org/t/surface-command-in-julia/66378>\
**Category:** Performance\
**Tags:** plotting\
**Created:** [August 14, 2021, 8:10am UTC](https://discourse.julialang.org/t/surface-command-in-julia/66378 "2021-08-14T08:10:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![genkuroki](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/genkuroki/32/18030_2.png) [@genkuroki](https://discourse.julialang.org/u/genkuroki)\
**Post date:** [August 15, 2021, 6:51am UTC](https://discourse.julialang.org/t/surface-command-in-julia/66378/4 "2021-08-15T06:51:10Z")

</div>

The questioner must provide all information to reproduce the error, in particular, the minimal working code that can be simply copy-and-pasted and executed.

The following code probably reproduces the error. See [Mesh grid in Julia - #3 by genkuroki](https://discourse.julialang.org/t/mesh-grid-in-julia/66363/3)

```julia
using Plots

f(t, x) = exp(-x^2/(2t))/√(2π*t)
u(t, x) = f(t+0.1, x+2) + 2f(t+0.2, x-2)
t = range(0, 3; length=101)
x = range(-5, 5; length=101)
T = u.(t', x)

surface(t, x, T; colorbar=false,
    xlabel="t", ylabel="x", zlabel="T",
    camera=(30, 70), color=reverse(cgrad(:RdYlBu_11)))

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/0/d09ef6399ccbd401969257a15ccbc60c1ec47f7e.jpeg)

The code above works fine in my Windows 10 environment.

Versions of packages:

```julia
@show VERSION
using Pkg
Pkg.status("Plots")
Pkg.status("PlotUtils"; mode=PKGMODE_MANIFEST)
Pkg.status("GR"; mode=PKGMODE_MANIFEST)

```

```julia
VERSION = v"1.6.2"
      Status `D:\OneDrive\public\0015\Surrogates\Project.toml`
  [91a5bcdd] Plots v1.20.1
      Status `D:\OneDrive\public\0015\Surrogates\Manifest.toml`
  [995b91a9] PlotUtils v1.0.11
      Status `D:\OneDrive\public\0015\Surrogates\Manifest.toml`
  [28b8d3ca] GR v0.58.1

```

cf. [Mesh grid in Julia - #7 by Manisha\_07](https://discourse.julialang.org/t/mesh-grid-in-julia/66363/7)

---

_[View the full topic](https://discourse.julialang.org/t/surface-command-in-julia/66378)._
