# HG changeset patch # User jwe # Date 1192126553 0 # Node ID fa4b43705e3719fddad9a2d2a0a8faca984dc500 # Parent 4a682c7b2bd615bed97cda139019604854075f8a [project @ 2007-10-11 18:15:53 by jwe] diff -r 4a682c7b2bd6 -r fa4b43705e37 scripts/ChangeLog --- a/scripts/ChangeLog Thu Oct 11 17:54:48 2007 +0000 +++ b/scripts/ChangeLog Thu Oct 11 18:15:53 2007 +0000 @@ -1,3 +1,12 @@ +2007-10-11 John W. Eaton + + * plot/__go_draw_axes__.m (get_axis_limits): + Return lim = [] if logscale and no positive values. + (__go_draw_axes__): Skip plotting if computed axis limits are empty. + Set initial min and min positive values to Inf, max values to -Inf. + (get_data_limits): Correctly handle xminp when no positive values + are found. + 2007-10-11 Ben Abbott * polynomial/residue.m: New optional input for pole multiplicity. @@ -7,8 +16,6 @@ * toplev.cc (Foctave_config_info): Add field "mac". -2007-10-11 Thomas Treichl - * miscellaneous/ismac.m: New function. * miscellaneous/Makefile.in (SOURCES): Add it to the list. * miscellaneous/ispc.m, miscellaneous/isunix.m: Doc fix. @@ -19,12 +26,6 @@ as a scalar. Handle three argument case. Allow T, M, and N to be scalars or matrices of a common size. -2007-10-11 John W. Eaton - - * plot/__go_draw_axes__.m (get_axis_limits): - Return lim = [] if logscale and no positive values. - (__go_draw_axes__): Skip plotting if computed axis limits are empty. - 2007-10-11 Brian Gough * control/csrefcard.lt, control/system/is_detectable.m, diff -r 4a682c7b2bd6 -r fa4b43705e37 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Thu Oct 11 17:54:48 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Thu Oct 11 18:15:53 2007 +0000 @@ -202,9 +202,9 @@ data = cell (); is_image_data = []; - xminp = yminp = zminp = realmax (); - xmax = ymax = zmax = -realmax (); - xmin = ymin = zmin = realmax (); + xminp = yminp = zminp = Inf; + xmax = ymax = zmax = -Inf; + xmin = ymin = zmin = Inf; [view_cmd, view_fcn, view_zoom] = image_viewer (); use_gnuplot_for_images = (ischar (view_fcn) @@ -871,9 +871,14 @@ xmax = max (xmax, max (xdat)); if (nargin == 5) tx = tx(! isinf (xdat) & tx > 0); - xminp = min (xminp, min (tx)); + if (! isempty (tx)) + xminp = min (xminp, min (tx)); + endif else - xminp = min (xminp, min (xdat(xdat>0))); + tmp = min (xdat(xdat > 0)); + if (! isempty (tmp)) + xminp = min (xminp, tmp); + endif endif endfunction @@ -884,7 +889,7 @@ function lim = get_axis_limits (min_val, max_val, min_pos, logscale) if (logscale) - if (isinf (min_pos) || isempty (min_pos)) + if (isinf (min_pos)) lim = []; warning ("axis: logscale with no positive values to plot"); return;