Mercurial > hg > octave-nkf
diff scripts/plot/axis.m @ 17564:234731d524c2
axis.m: Fix 'axis tight' with pcolor plots.
* libinterp/corefcn/graphics.cc(calc_dimensions): Use if/else if tree to avoid
unnecessary comparisons once object has been determined to be 3-D.
* libinterp/corefcn/graphics.cc(F__calc_dimensions__): Put input validation first.
* scripts/plot/axis.m: Check for 2D view (elevation = 90) before setting Z limits.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 04 Oct 2013 06:59:31 -0700 |
parents | 15d592c82abc |
children |
line wrap: on
line diff
--- a/scripts/plot/axis.m +++ b/scripts/plot/axis.m @@ -364,7 +364,9 @@ ylim = ylim .* (1 + eps () * [-1, 1]); endif set (ca, "xlim", xlim, "ylim", ylim) - if (__calc_dimensions__ (ca) > 2) + nd = __calc_dimensions__ (ca); + is3dview = (get (ca, "view")(2) != 90); + if (nd > 2 && is3dview) zlim = __get_tight_lims__ (ca, "z"); if (all (zlim == 0)) zlim = eps () * [-1 1];