Mercurial > hg > octave-nkf
diff scripts/plot/__go_draw_axes__.m @ 10917:888c75785221
Improvements to FLTK backend rotation
* Don't rotate past the top and bottom
* Implement __calc_dimensions__ in C++ so that it's available to graphics object ctors
* Make rotation the default mode in 3d plots
* Replace an instance of m-script __calc_dimensions__ with C++ version
author | Jordi Guti?rrez Hermoso <jordigh@gmail.com> |
---|---|
date | Fri, 27 Aug 2010 15:11:35 -0400 |
parents | dd6b90f44ae5 |
children | 91ff0d7ee94b |
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -45,7 +45,8 @@ ymirror = true; endif - nd = __calc_dimensions__ (axis_obj); + nd = __calc_dimensions__ (h); + if (strcmpi (axis_obj.plotboxaspectratiomode, "manual")) pos = __actual_axis_position__ (axis_obj); else @@ -1786,29 +1787,6 @@ endfunction -function nd = __calc_dimensions__ (obj) - kids = obj.children; - nd = 2; - for i = 1:length (kids) - obj = get (kids(i)); - switch (obj.type) - case {"image", "text"} - ## ignore as they - case {"line", "patch"} - if (! isempty (obj.zdata)) - nd = 3; - endif - case "surface" - nd = 3; - case "hggroup" - obj_nd = __calc_dimensions__ (obj); - if (obj_nd == 3) - nd = 3; - endif - endswitch - endfor -endfunction - function __gnuplot_write_data__ (plot_stream, data, nd, parametric, cdata) ## DATA is already transposed.