Mercurial > hg > octave-nkf
comparison scripts/plot/__go_draw_axes__.m @ 7865:b74039822fd2
Add support for hggroup
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Fri, 25 Apr 2008 16:44:59 +0200 |
parents | 1b954fdaf4ff |
children | 02b590f46a29 |
comparison
equal
deleted
inserted
replaced
7864:56f781f38f0b | 7865:b74039822fd2 |
---|---|
323 && strcmpi (view_fcn, "gnuplot_internal")); | 323 && strcmpi (view_fcn, "gnuplot_internal")); |
324 | 324 |
325 ximg_data = {}; | 325 ximg_data = {}; |
326 ximg_data_idx = 0; | 326 ximg_data_idx = 0; |
327 | 327 |
328 for i = 1:length (kids) | 328 while (! isempty (kids)) |
329 | 329 |
330 obj = get (kids(i)); | 330 obj = get (kids(1)); |
331 kids = kids(2:end); | |
331 | 332 |
332 switch (obj.type) | 333 switch (obj.type) |
333 case "image" | 334 case "image" |
334 img_data = obj.cdata; | 335 img_data = obj.cdata; |
335 img_xdata = obj.xdata; | 336 img_xdata = obj.xdata; |
990 undo_string_escapes (label), units, | 991 undo_string_escapes (label), units, |
991 lpos(1), lpos(2), halign, angle, fontspec, | 992 lpos(1), lpos(2), halign, angle, fontspec, |
992 __do_enhanced_option__ (enhanced, obj), colorspec); | 993 __do_enhanced_option__ (enhanced, obj), colorspec); |
993 endif | 994 endif |
994 | 995 |
996 case "hggroup" | |
997 # push group children into the kid list | |
998 kids = [obj.children kids]; | |
999 | |
995 otherwise | 1000 otherwise |
996 error ("__go_draw_axes__: unknown object class, %s", | 1001 error ("__go_draw_axes__: unknown object class, %s", |
997 obj.type); | 1002 obj.type); |
998 endswitch | 1003 endswitch |
999 | 1004 |
1000 endfor | 1005 endwhile |
1001 | 1006 |
1002 ## This is need to prevent warnings for rotations in 3D plots, while | 1007 ## This is need to prevent warnings for rotations in 3D plots, while |
1003 ## allowing colorbars with contours.. | 1008 ## allowing colorbars with contours.. |
1004 if (nd == 2 || data_idx > 1) | 1009 if (nd == 2 || data_idx > 1) |
1005 fputs (plot_stream, "set pm3d implicit;\n"); | 1010 fputs (plot_stream, "set pm3d implicit;\n"); |
1419 if (! isempty (obj.zdata)) | 1424 if (! isempty (obj.zdata)) |
1420 nd = 3; | 1425 nd = 3; |
1421 endif | 1426 endif |
1422 case "surface" | 1427 case "surface" |
1423 nd = 3; | 1428 nd = 3; |
1429 case "hggroup" | |
1430 obj_nd = __calc_dimensions__ (obj); | |
1431 if (obj_nd == 3) | |
1432 nd = 3; | |
1433 endif | |
1424 endswitch | 1434 endswitch |
1425 endfor | 1435 endfor |
1426 endfunction | 1436 endfunction |
1427 | 1437 |
1428 function __gnuplot_write_data__ (plot_stream, data, nd, parametric, cdata) | 1438 function __gnuplot_write_data__ (plot_stream, data, nd, parametric, cdata) |