I am given the following code in my notes:
Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3},
PlotLabel -> "Plot of Sin[x y]", AxesLabel -> {"x", "y"},
ColorFunction -> (GrayLevel[#] &)]
Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3},
PlotLabel -> "Plot of Sin[x y]", AxesLabel -> {"x", "y"},
ColorFunction -> (GrayLevel[#1] &)]
Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3},
PlotLabel -> "Plot of Sin[x y]", AxesLabel -> {"x", "y"},
ColorFunction -> (GrayLevel[#2] &)]
Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3},
PlotLabel -> "Plot of Sin[x y]", AxesLabel -> {"x", "y"},
ColorFunction -> (GrayLevel[#3] &)]
I dont understand what the # values in the above context is. What values are being put in each case in the above code.
In general context the hash is called a slot and it is where the values are plugged in to the function
ColorFunction
are (internally) the value of the point being plotted. For functions such asPlot3D
, the values are two-dimensional vectors, so #1 and #2 are the coordinates. $\endgroup$#3
. $\endgroup$