Mercurial > hg > octave-lyh
changeset 7012:fa4b43705e37
[project @ 2007-10-11 18:15:53 by jwe]
author | jwe |
---|---|
date | Thu, 11 Oct 2007 18:15:53 +0000 |
parents | 4a682c7b2bd6 |
children | f943e9635115 |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 2 files changed, 20 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,12 @@ +2007-10-11 John W. Eaton <jwe@octave.org> + + * 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 <bpabbott@mac.com> * 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 <Thomas.Treichl@gmx.net> - * 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 <jwe@octave.org> - - * 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 <bjg@network-theory.co.uk> * control/csrefcard.lt, control/system/is_detectable.m,
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -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;