changeset 11183:ac6a199be45e

Leave zlim unchanged during 'axis tight' on 2D plots
author Konstantinos Poulios <logari81@googlemail.com>
date Wed, 03 Nov 2010 09:34:07 +0100
parents cb9c475b335f
children d9a8a008c116
files scripts/ChangeLog scripts/plot/axis.m
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Wed Nov 03 03:37:59 2010 -0400
+++ b/scripts/ChangeLog	Wed Nov 03 09:34:07 2010 +0100
@@ -1,3 +1,7 @@
+2010-11-03  Konstantinos Poulios  <logari81@googlemail.com>
+
+	* plot/axis.m: Leave zlim unchanged during "axis tight" on 2D plots
+
 2010-11-03  Ben Abbott <bpabbott@mac.com>
 
 	* miscellaneous/getappdata.m, miscellaneous/isappdata.m,
--- a/scripts/plot/axis.m	Wed Nov 03 03:37:59 2010 -0400
+++ b/scripts/plot/axis.m	Wed Nov 03 09:34:07 2010 +0100
@@ -338,8 +338,10 @@
 
   set (ca,
        "xlim", __get_tight_lims__ (ca, "x"),
-       "ylim", __get_tight_lims__ (ca, "y"),
-       "zlim", __get_tight_lims__ (ca, "z"));
+       "ylim", __get_tight_lims__ (ca, "y"));
+  if __calc_dimensions__ (ca) > 2
+    set (ca, "zlim", __get_tight_lims__ (ca, "z"));
+  endif
 
 endfunction