Following with our online Scilab's tutorial, let's learn how to make grids, like the figure:

The first step is to define each point.
Look the example:
(1, 5) - (2, 5) - (3, 5) - (4, 5) - (5, 5)
(1, 4) - (2, 4) - (3, 4) - (4, 4) - (5, 4)
(1, 3) - (2, 3) - (3, 3) - (4, 3) - (5, 3)
(1, 2) - (2, 2) - (3, 2) - (4, 2) - (5, 2)
(1, 1) - (2, 1) - (3, 1) - (4, 1) - (5, 1)
The x-coordinates are the matrix:
X = [1, 2, 3, 4, 5;
1, 2, 3, 4, 5;
1, 2, 3, 4, 5;
1, 2, 3, 4, 5;
1, 2, 3, 4, 5]
And the y-coordinates are the matrix:
Y = [5, 5, 5, 5, 5;
4, 4, 4, 4, 4;
3, 3, 3, 3, 3;
2, 2, 2, 2, 2;
1, 1, 1, 1, 1]
So, we can use the meshgrid function, like presented in the following script:
-->x = meshgrid(1:5)
x =
1. 2. 3. 4. 5.
1. 2. 3. 4. 5.
1. 2. 3. 4. 5.
1. 2. 3. 4. 5.
1. 2. 3. 4. 5.
-->y = meshgrid(5:-1:1)'
y =
5. 5. 5. 5. 5.
4. 4. 4. 4. 4.
3. 3. 3. 3. 3.
2. 2. 2. 2. 2.
1. 1. 1. 1. 1.
-->plot(x, y, 'k.-');
-->plot(x', y', 'k.-');
The result:

Now, I think it's interesting to upgrade our example.
Look the script:
-->t = 1:20;
-->x = meshgrid(t);
-->y = meshgrid(t($:-1:1))';
-->w = %pi/5;
-->s = sin(w*x);
-->plot(x, s + y, 'b.-');
-->plot(x', (s + y)', 'b.-');
The result:

Try to change the grid and look what happens.