changeset 11206:83d268af65cb

__go_draw_axes__.m: Check for z/y/zdata before converting negative values to NaNs.
author Ben Abbott <bpabbott@mac.com>
date Mon, 08 Nov 2010 23:19:37 +0800
parents abee8cc4820f
children 51e6ac3e5afc
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Nov 08 16:59:25 2010 +0800
+++ b/scripts/ChangeLog	Mon Nov 08 23:19:37 2010 +0800
@@ -1,5 +1,7 @@
 2010-11-08  Ben Abbott <bpabbott@mac.com>
 
+	* plot/__go_draw_axes__.m: Check for z/y/zdata before converting
+	negative values to NaNs. Bug fix for changeset 11201.
 	* plot/daspect.m: Fix demo using both daspect and pbaspect.
 
 2010-11-08  David Bateman  <dbateman@free.fr>
--- a/scripts/plot/__go_draw_axes__.m	Mon Nov 08 16:59:25 2010 +0800
+++ b/scripts/plot/__go_draw_axes__.m	Mon Nov 08 23:19:37 2010 +0800
@@ -406,13 +406,13 @@
         continue;
       endif
 
-      if (xlogscale)
+      if (xlogscale && isfield (obj, "xdata"))
         obj.xdata(obj.xdata<=0) = NaN;
       endif
-      if (ylogscale)
+      if (ylogscale && isfield (obj, "ydata"))
         obj.ydata(obj.ydata<=0) = NaN;
       endif
-      if (zlogscale)
+      if (zlogscale && isfield (obj, "zdata"))
         obj.zdata(obj.zdata<=0) = NaN;
       endif