Mercurial > hg > octave-nkf
comparison scripts/plot/mesh.m @ 6172:2de853a110df
[project @ 2006-11-15 22:53:47 by jwe]
author | jwe |
---|---|
date | Wed, 15 Nov 2006 22:53:48 +0000 |
parents | 57aeb18f161d |
children | 44c91c5dfe1d |
comparison
equal
deleted
inserted
replaced
6171:4508e9d73ea1 | 6172:2de853a110df |
---|---|
29 ## @end deftypefn | 29 ## @end deftypefn |
30 | 30 |
31 ## Author: jwe | 31 ## Author: jwe |
32 | 32 |
33 function mesh (x, y, z) | 33 function mesh (x, y, z) |
34 | |
35 __plot_globals__; | |
36 | |
37 cf = __current_figure__; | |
38 mxi = __multiplot_xi__(cf); | |
39 myi = __multiplot_yi__(cf); | |
34 | 40 |
35 if (nargin == 1) | 41 if (nargin == 1) |
36 z = x; | 42 z = x; |
37 if (ismatrix (z)) | 43 if (ismatrix (z)) |
38 [x, y] = meshgrid(0:columns(z)-1, 0:rows(z)-1); | 44 [x, y] = meshgrid(0:columns(z)-1, 0:rows(z)-1); |
77 __gnuplot_raw__ ("set hidden3d;\n"); | 83 __gnuplot_raw__ ("set hidden3d;\n"); |
78 __gnuplot_raw__ ("set data style lines;\n"); | 84 __gnuplot_raw__ ("set data style lines;\n"); |
79 __gnuplot_raw__ ("set surface;\n"); | 85 __gnuplot_raw__ ("set surface;\n"); |
80 __gnuplot_raw__ ("set nocontour;\n"); | 86 __gnuplot_raw__ ("set nocontour;\n"); |
81 __gnuplot_raw__ ("set nologscale;\n"); | 87 __gnuplot_raw__ ("set nologscale;\n"); |
82 __gnuplot_set__ parametric; | |
83 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); | 88 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); |
84 __gnuplot_raw__ ("set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); | 89 __gnuplot_raw__ ("set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); |
85 __gnuplot_raw__ ("set nocolorbox;\n"); | 90 __gnuplot_raw__ ("set nocolorbox;\n"); |
86 __plt3__ (zz, "", "", "", | 91 __plt3__ (zz, true, "", "", "", |
87 sprintf ("%s line palette", gnuplot_command_with ())); | 92 sprintf ("%s line palette", gnuplot_command_with ())); |
88 else | 93 else |
89 error ("mesh: x, y, and z must have same dimensions"); | 94 error ("mesh: x, y, and z must have same dimensions"); |
90 endif | 95 endif |
91 | 96 |