Skip to main content
3 of 12
-2 bytes
R. Kap
  • 4.9k
  • 2
  • 15
  • 37

Gnuplot 4, 64 62 bytes

se t png;se is 80;se xyp 0;sp exp(-(x**2+y**2)/(2*$0**2)) w pm

Save the above code into a file named A.gp and invoke it with the following:

gnuplot -e 'call "A.gp" $1'>GnuPlot3D.png

where the $1 is to be replaced with the value of σ. This will save a .png file named GnuPlot3D.png containing the desired output in the current working directory.

Note that this only works with the latest distribution of Gnuplot 4 since in Gnuplot 5 the $n references to arguments were deprecated and replaced with the unfortunately more verbose ARGn.

Sample output with σ = 2:

Sample Output

R. Kap
  • 4.9k
  • 2
  • 15
  • 37