Mercurial > hg > octave-nkf
comparison scripts/plot/__go_draw_axes__.m @ 7271:c18512d0ddb6
[project @ 2007-12-10 06:52:51 by jwe]
author | jwe |
---|---|
date | Mon, 10 Dec 2007 06:52:51 +0000 |
parents | 3fade00a6ac7 |
children | 44fdc33e5207 |
comparison
equal
deleted
inserted
replaced
7270:20b3ac39ee40 | 7271:c18512d0ddb6 |
---|---|
266 nd = 0; | 266 nd = 0; |
267 data_idx = 0; | 267 data_idx = 0; |
268 data = cell (); | 268 data = cell (); |
269 is_image_data = []; | 269 is_image_data = []; |
270 hidden_removal = NaN; | 270 hidden_removal = NaN; |
271 view_map = false; | |
271 | 272 |
272 xlim = axis_obj.xlim; | 273 xlim = axis_obj.xlim; |
273 ylim = axis_obj.ylim; | 274 ylim = axis_obj.ylim; |
274 zlim = axis_obj.zlim; | 275 zlim = axis_obj.zlim; |
275 clim = axis_obj.clim; | 276 clim = axis_obj.clim; |
303 img_xdata = obj.xdata; | 304 img_xdata = obj.xdata; |
304 img_ydata = obj.ydata; | 305 img_ydata = obj.ydata; |
305 | 306 |
306 if (use_gnuplot_for_images) | 307 if (use_gnuplot_for_images) |
307 | 308 |
309 fputs (plot_stream, "set border front;\n"); | |
308 data_idx++; | 310 data_idx++; |
309 is_image_data(data_idx) = true; | 311 is_image_data(data_idx) = true; |
310 parametric(data_idx) = false; | 312 parametric(data_idx) = false; |
311 have_cdata(data_idx) = false; | 313 have_cdata(data_idx) = false; |
312 | 314 |
787 endif | 789 endif |
788 endfor | 790 endfor |
789 | 791 |
790 case "surface" | 792 case "surface" |
791 nd = 3; | 793 nd = 3; |
794 view_map = true; | |
792 if (! (strncmp (obj.edgecolor, "none", 4) | 795 if (! (strncmp (obj.edgecolor, "none", 4) |
793 && strncmp (obj.facecolor, "none", 4))) | 796 && strncmp (obj.facecolor, "none", 4))) |
794 data_idx++; | 797 data_idx++; |
795 is_image_data(data_idx) = false; | 798 is_image_data(data_idx) = false; |
796 parametric(data_idx) = false; | 799 parametric(data_idx) = false; |
1168 rot_z = axis_obj.view(1); | 1171 rot_z = axis_obj.view(1); |
1169 while (rot_z < 0) | 1172 while (rot_z < 0) |
1170 rot_z += 360; | 1173 rot_z += 360; |
1171 endwhile | 1174 endwhile |
1172 fputs (plot_stream, "set ticslevel 0;\n"); | 1175 fputs (plot_stream, "set ticslevel 0;\n"); |
1173 fprintf (plot_stream, "set view %.15g, %.15g;\n", rot_x, rot_z); | 1176 if (view_map && rot_x == 0 && rot_z == 0) |
1177 fputs (plot_stream, "set view map;\n"); | |
1178 else | |
1179 fprintf (plot_stream, "set view %.15g, %.15g;\n", rot_x, rot_z); | |
1180 endif | |
1174 endif | 1181 endif |
1175 fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, | 1182 fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, |
1176 usingclause{1}, titlespec{1}, withclause{1}); | 1183 usingclause{1}, titlespec{1}, withclause{1}); |
1177 for i = 2:data_idx | 1184 for i = 2:data_idx |
1178 fprintf (plot_stream, ", \"-\" %s %s %s \\\n", | 1185 fprintf (plot_stream, ", \"-\" %s %s %s \\\n", |
1187 have_cdata(i)); | 1194 have_cdata(i)); |
1188 endif | 1195 endif |
1189 endfor | 1196 endfor |
1190 else | 1197 else |
1191 fputs (plot_stream, "plot \"-\";\nInf Inf\ne\n"); | 1198 fputs (plot_stream, "plot \"-\";\nInf Inf\ne\n"); |
1199 endif | |
1200 | |
1201 ## Needed to allow mouse rotation with pcolor | |
1202 if (view_map) | |
1203 fputs (plot_stream, "unset view;\n"); | |
1192 endif | 1204 endif |
1193 | 1205 |
1194 fflush (plot_stream); | 1206 fflush (plot_stream); |
1195 | 1207 |
1196 else | 1208 else |