comparison scripts/plot/mesh.m @ 6146:1a6d826e92b5

[project @ 2006-11-09 03:13:11 by jwe]
author jwe
date Thu, 09 Nov 2006 03:15:23 +0000
parents b15a143c5607
children 08f0dabf17b9
comparison
equal deleted inserted replaced
6145:14906c2745e3 6146:1a6d826e92b5
65 zz(:,i) = x(k) * ones (ylen, 1); 65 zz(:,i) = x(k) * ones (ylen, 1);
66 zz(:,i+1) = y; 66 zz(:,i+1) = y;
67 zz(:,i+2) = z(:,k); 67 zz(:,i+2) = z(:,k);
68 k++; 68 k++;
69 endfor 69 endfor
70 unwind_protect 70 __gnuplot_raw__ ("set hidden3d;\n");
71 __gnuplot_raw__ ("set hidden3d;\n"); 71 __gnuplot_raw__ ("set data style lines;\n");
72 __gnuplot_raw__ ("set data style lines;\n"); 72 __gnuplot_raw__ ("set surface;\n");
73 __gnuplot_raw__ ("set surface;\n"); 73 __gnuplot_raw__ ("set nocontour;\n");
74 __gnuplot_raw__ ("set nocontour;\n"); 74 __gnuplot_raw__ ("set nologscale;\n");
75 __gnuplot_raw__ ("set nologscale;\n"); 75 __gnuplot_set__ parametric;
76 __gnuplot_set__ parametric; 76 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n");
77 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); 77 __gnuplot_raw__ ("set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n");
78 __gnuplot_raw__ ("set palette defined (0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"yellow\", 4 \"red\" , 5 \"dark-red\");\n"); 78 __gnuplot_raw__ ("set nocolorbox;\n");
79 __gnuplot_raw__ ("set nocolorbox;\n"); 79 __plt3__ (zz, "", "", "", [gnuplot_command_with " line palette"]);
80 __plt3__ (zz, "", "", [gnuplot_command_with " line palette"]);
81 unwind_protect_cleanup
82 __gnuplot_set__ noparametric;
83 end_unwind_protect
84 else 80 else
85 msg = "mesh: rows (z) must be the same as length (y) and"; 81 msg = "mesh: rows (z) must be the same as length (y) and";
86 msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg); 82 msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg);
87 error (msg); 83 error (msg);
88 endif 84 endif
98 zz(:,i) = x(:,k); 94 zz(:,i) = x(:,k);
99 zz(:,i+1) = y(:,k); 95 zz(:,i+1) = y(:,k);
100 zz(:,i+2) = z(:,k); 96 zz(:,i+2) = z(:,k);
101 k++; 97 k++;
102 endfor 98 endfor
103 unwind_protect 99 __gnuplot_raw__ ("set data style lines;\n");
104 __gnuplot_raw__ ("set data style lines;\n"); 100 __gnuplot_raw__ ("set surface;\n");
105 __gnuplot_raw__ ("set surface;\n"); 101 __gnuplot_raw__ ("set nocontour;\n");
106 __gnuplot_raw__ ("set nocontour;\n"); 102 __gnuplot_raw__ ("set nologscale;\n");
107 __gnuplot_raw__ ("set nologscale;\n"); 103 __gnuplot_set__ parametric;
108 __gnuplot_set__ parametric; 104 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n");
109 __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); 105 __plt3__ (zz, "");
110 __plt3__ (zz, "");
111 unwind_protect_cleanup
112 __gnuplot_set__ noparametric;
113 end_unwind_protect
114 else 106 else
115 error ("mesh: x, y, and z must have same dimensions"); 107 error ("mesh: x, y, and z must have same dimensions");
116 endif 108 endif
117 else 109 else
118 error ("mesh: x and y must be vectors and z must be a matrix"); 110 error ("mesh: x and y must be vectors and z must be a matrix");