Mercurial > hg > octave-nkf
changeset 6266:e5c3839f9403
[project @ 2007-02-01 10:25:37 by jwe]
author | jwe |
---|---|
date | Thu, 01 Feb 2007 10:25:37 +0000 |
parents | 598c2be12ab9 |
children | 0078497b3b0b |
files | scripts/ChangeLog scripts/plot/__uiobject_draw_axes__.m |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2007-02-01 John W. Eaton <jwe@octave.org> + * plot/__uiobject_draw_axes__.m: + Don't try to set axis limits unless we have data. + * plot/__plt1__.m, plot/__plt2__.m, plot/__plt2mm__.m, plot/__plt2mv__.m, plot/__plt2ss__.m, plot/__plt2vm__.m, plot/__plt2vv__.m, plot/__plt__.m, plot/__pltopt1__.m,
--- a/scripts/plot/__uiobject_draw_axes__.m +++ b/scripts/plot/__uiobject_draw_axes__.m @@ -468,7 +468,9 @@ endfor - if (xautoscale) + have_data = ! isempty (data); + + if (xautoscale && have_data) xlim = get_axis_limits (xmin, xmax, xminp, xlogscale); set (h, "xlim", xlim); else @@ -476,7 +478,7 @@ endif fprintf (plot_stream, "set xrange [%g:%g];\n", xlim); - if (yautoscale) + if (yautoscale && have_data) ylim = get_axis_limits (ymin, ymax, yminp, ylogscale); set (h, "ylim", ylim); else @@ -485,7 +487,7 @@ fprintf (plot_stream, "set yrange [%g:%g];\n", ylim); if (nd == 3) - if (zautoscale) + if (zautoscale && have_data) zlim = get_axis_limits (zmin, zmax, zminp, zlogscale); set (h, "zlim", zlim); else