changeset 10941:97294dd3ccd4

graphics.cc: Fix axes limits underflow to zero for logscale.
author Ben Abbott <bpabbott@mac.com>
date Wed, 01 Sep 2010 20:22:48 -0400
parents 306e40d773a9
children 48a1812fcc3a
files src/ChangeLog src/graphics.cc
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Sep 01 13:48:10 2010 +0200
+++ b/src/ChangeLog	Wed Sep 01 20:22:48 2010 -0400
@@ -1,3 +1,7 @@
+2010-09-01  Marco Caliari <marco.caliari@univr.it>
+
+	* graphics.cc: Fix axes limits underflow to zero for logscale.
+
 2010-09-01  Jaroslav Hajek  <highegg@gmail.com>
 
 	* pt-mat.cc (single_type_concat (Array<T>&, ...)): Optimize all
--- a/src/graphics.cc	Wed Sep 01 13:48:10 2010 +0200
+++ b/src/graphics.cc	Wed Sep 01 20:22:48 2010 -0400
@@ -3949,6 +3949,8 @@
         {
           tmp_lims(0) = std::pow (10.,tmp_lims(0));
           tmp_lims(1) = std::pow (10.,tmp_lims(1));
+          if (tmp_lims(0) <= 0)
+            tmp_lims(0) = std::pow (10., lo);
         }
       lims = tmp_lims;
     }